:root {
    --wiya-primary: #f3d344;
    --wiya-primary-dark: #e0c338;
    --wiya-bg-light: #fff8e1;
    --wiya-bg-content: #fff;
    --wiya-text-dark: #111827;
    --wiya-text-muted: #6b7280;
}

/* ===== Dashboard & Tabs ===== */
.wiya-dashboard {
    display: flex;
    gap: 20px;
    font-family: Arial, sans-serif;
    background: #f9f9f9;
    padding: 10px;
}

.wiya-dashboard-content {
    flex: 1;
    padding: 25px;
    background: var(--wiya-bg-content);
    border: 1px solid #ddd;
    border-radius: 6px;
    min-height: 400px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.wiya-tabs,
.wiya-subtabs {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 80vh;
    overflow-y: auto;
}

.wiya-tabs {
    flex: 0 0 220px;
    border-right: 1px solid #ddd;
    background: var(--wiya-bg-content);
    border-radius: 6px;
    overflow: hidden;
}

.wiya-tabs li a,
.wiya-subtabs li a {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wiya-tabs li a {
    padding: 14px 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    font-size: 15px;
    position: relative;
}

.wiya-tabs li.active > a,
.wiya-tabs li a:hover {
    background: var(--wiya-primary);
    color: #000;
}

.wiya-tabs li.active > a::before,
.wiya-tabs li a:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: var(--wiya-primary-dark);
}

.wiya-subtabs {
    padding-left: 20px;
    background: var(--wiya-bg-light);
}

.wiya-subtabs li a {
    padding: 10px 16px;
    color: #555;
    font-size: 14px;
    border-left: 2px solid transparent;
}

.wiya-subtabs li.active a,
.wiya-subtabs li a:hover {
    border-left: 3px solid var(--wiya-primary-dark);
    color: var(--wiya-primary-dark);
    font-weight: bold;
    background: #fffbe0;
    border-radius: 0 4px 4px 0;
}

.wiya-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 40px;
}

.wiya-meta-card {
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 20px 50px;
    position: relative;
}

.wiya-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--wiya-text-muted);
    margin-top: 20px;
}

.wiya-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--wiya-text-dark);
    word-break: break-word;
}

.wiya-badge {
    position: absolute;
    top: 20px;
    right: 50px;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
}

.wiya-status-success {
    background: #dcfce7;
    color: #16a34a;
}

.wiya-badge-warning {
    background: #fef3c7;
    color: #d97706;
}

/* Buttons & Spinner */
.wiya-btn-primary, .button-primary {
    background-color: var(--wiya-primary);
    color: #3a2f00;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.wiya-btn-primary:hover, .button-primary:hover {
    background-color: var(--wiya-primary-dark);
}

.wiya-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error & Success */
.wiya-error {
    color: #b00020;
    background-color: #fdecea;
    border: 1px solid #f5c2c0;
    border-left: 4px solid #b00020;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.wiya-error:empty {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.success {
    color: #0f5132;
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    border-left: 4px solid #0f5132;
}

/* Responsive */
@media (max-width: 768px) {
    .wiya-dashboard {
        flex-direction: column;
    }

    .wiya-tabs {
        flex: unset;
        border-right: none;
        border-bottom: 1px solid #ddd;
        border-radius: 6px 6px 0 0;
    }

    .wiya-dashboard-content {
        margin-top: 10px;
    }
}

/* ===== WhatsApp Template Form & Preview ===== */
.wiya-template-layout {
    display: flex;
    gap: 30px;
    font-family: Arial, sans-serif;
}

.wiya-template-form-column {
    flex: 1;
    padding: 15px;
    background: var(--wiya-bg-content);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.wiya-template-preview-column {
    flex: 1;
}

/* Form Fields */
.wiya-field {
    margin-bottom: 15px;
}

.wiya-field input[type="text"],
.wiya-field input[type="file"],
.wiya-field textarea,
.wiya-field select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.2s;
}

.wiya-field input[type="text"]:focus,
.wiya-field input[type="file"]:focus,
.wiya-field textarea:focus,
.wiya-field select:focus {
    border-color: var(--wiya-primary);
    outline: none;
}

.wiya-field small.helper {
    font-size: 12px;
    color: var(--wiya-text-muted);
}

/* Button Row */
.button-row {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
    align-items: center;
}

.button-row select,
.button-row input {
    padding: 6px 8px;
    font-size: 13px;
}

.button-row button.remove-btn {
    background: #f44336;
    color: #fff;
    border-radius: 3px;
    padding: 5px 8px;
    cursor: pointer;
}

.button-row button.remove-btn:hover {
    background: #d32f2f;
}

/* Add Button */
#add-button {
    margin-top: 5px;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
}

/* Preview */
.wiya-preview-wrapper {
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 8px;
    background: #f8f8f8;
}

.wiya-preview-phone {
    max-width: 400px;
    margin: auto;
    font-family: sans-serif;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

.preview-header {
    font-weight: bold;
    margin-bottom: 5px;
}

.preview-media {
    margin-bottom: 10px;
}

.preview-body {
    margin-bottom: 5px;
}

.preview-footer {
    font-size: 12px;
    color: var(--wiya-text-muted);
    margin-bottom: 5px;
}

.preview-buttons button {
    background-color: var(--wiya-primary);
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 13px;
    margin: 2px 2px 2px 0;
}

.preview-buttons button:hover {
    background-color: var(--wiya-primary-dark);
}

.wiya-notice {
    display: flex;
    align-items: flex-start;
    background: #fff8e1;
    border-left: 4px solid #ffba00;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.wiya-notice-icon {
    margin-right: 12px;
    font-size: 18px;
    color: #ff9800;
}

.wiya-notice-content strong {
    display: block;
    margin-bottom: 5px;
}

.wiya-notice-content p {
    margin: 0;
}

/* Remove bullets */
.wcfm_products_menus {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-block;
}

/* Make horizontal */
.wcfm_products_menus li {
    display: inline-block;
    margin-right: 8px;
}

/* Remove extra spacing from separator */
.wcfm_products_menus li a {
    text-decoration: none;
    padding: 4px 6px;
}

/* Active styling */
.wcfm_products_menus li a.active {
    font-weight: 600;
    color: #f3d344;
}


/* Responsive */
@media (max-width: 900px){
    .wiya-template-layout {
        flex-direction: column;
    }
}
