/* BasisLogin Admin Styles */

.basislogin-admin {
    background: #f8fafc;
    margin: 0 -20px;
    padding: 20px;
    min-height: calc(100vh - 32px);
}

/* Header */
.basislogin-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.basislogin-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.basislogin-subtitle {
    color: #64748b;
    font-size: 16px;
    margin: 0 0 32px 0;
    font-weight: 400;
}

/* Tab Navigation */
.basislogin-nav-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 8px;
    margin-bottom: 24px;
    border: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.basislogin-nav-tabs .nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    min-height: auto;
}

.basislogin-nav-tabs .nav-tab:hover {
    background: #f1f5f9;
    color: #334155;
    transform: translateY(-1px);
}

.basislogin-nav-tabs .nav-tab.nav-tab-active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.tab-icon {
    font-size: 16px;
    line-height: 1;
}

.tab-title {
    font-size: 14px;
    font-weight: 500;
}

/* Tab Description */
.basislogin-tab-description {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.basislogin-tab-description p {
    margin: 0;
    font-size: 15px;
    opacity: 0.95;
}

/* Form Container */
.basislogin-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Tab Content */
.basislogin-tab-content {
    padding: 32px;
}

/* Tab Panels */
.tab-panel {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.basislogin-section {
    margin-bottom: 40px;
}

.basislogin-section:last-child {
    margin-bottom: 0;
}

.basislogin-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.basislogin-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #3b82f6;
}

/* Form Fields */
.basislogin-form .form-table {
    margin: 0;
    background: transparent;
}

.basislogin-form .form-table th {
    padding: 16px 0;
    width: 200px;
    font-weight: 600;
    color: #374151;
    vertical-align: top;
}

.basislogin-form .form-table td {
    padding: 16px 0 16px 24px;
    vertical-align: top;
}

.basislogin-form .form-table tr {
    border-bottom: 1px solid #f1f5f9;
}

.basislogin-form .form-table tr:last-child {
    border-bottom: none;
}

/* Input Styles */
.basislogin-form input[type="text"],
.basislogin-form input[type="number"],
.basislogin-form input[type="url"],
.basislogin-form textarea,
.basislogin-form select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    width: 100%;
    max-width: 400px;
}

.basislogin-form input[type="text"]:focus,
.basislogin-form input[type="number"]:focus,
.basislogin-form input[type="url"]:focus,
.basislogin-form textarea:focus,
.basislogin-form select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.basislogin-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Checkbox Styles */
.basislogin-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: #3b82f6;
}

/* Color Picker */
.wp-picker-container {
    margin-top: 4px;
}

.wp-picker-container .wp-color-result {
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    height: 40px;
    transition: all 0.2s ease;
}

.wp-picker-container .wp-color-result:hover {
    border-color: #3b82f6;
}

/* Media Upload */
.basislogin-form .button.button-secondary {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #374151;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.basislogin-form .button.button-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* Descriptions */
.basislogin-form .description {
    color: #64748b;
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.4;
}

/* Form Footer */
.basislogin-form-footer {
    background: #f8fafc;
    padding: 24px 32px;
    border-top: 1px solid #e2e8f0;
}

.basislogin-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Save Button */
.basislogin-save-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.basislogin-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Reset Button */
.basislogin-reset-btn {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.basislogin-reset-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
    transform: translateY(-1px);
}

/* Additional Styles */
.basislogin-form .form-table tr.focused {
    background: #f8fafc;
    border-radius: 8px;
}

.basislogin-form input.error,
.basislogin-form textarea.error,
.basislogin-form select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.basislogin-save-btn.has-changes {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Loading States */
.basislogin-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.basislogin-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success States */
.basislogin-field-success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Help Text */
.basislogin-help {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    color: #1e40af;
}

.basislogin-help h4 {
    margin: 0 0 8px 0;
    color: #1e3a8a;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .basislogin-admin {
        margin: 0 -10px;
        padding: 16px;
    }

    .basislogin-nav-tabs {
        flex-direction: column;
        gap: 2px;
    }

    .basislogin-nav-tabs .nav-tab {
        justify-content: center;
        padding: 16px;
    }

    .basislogin-tab-content {
        padding: 24px 16px;
    }

    .basislogin-form .form-table th,
    .basislogin-form .form-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
    }

    .basislogin-form .form-table td {
        padding-left: 0;
    }

    .basislogin-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .basislogin-save-btn,
    .basislogin-reset-btn {
        justify-content: center;
    }
}


/* ===== Autosave Toast (bottom-right) ===== */
.basislogin-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    background: #111827; /* slate-900 */
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    z-index: 999999;
    display: none; /* shown via jQuery fadeIn */
}
.basislogin-toast.is-saving { background: #111827; }
.basislogin-toast.is-saved  { background: #059669; } /* emerald-600 */
.basislogin-toast.is-error  { background: #b91c1c; } /* red-800 */
