/**
 * =====================================================
 * ATLAS SETTINGS PANEL STYLES
 * =====================================================
 */

/* Panel Container */
.atlas-settings-panel {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 999998;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.atlas-settings-panel.active {
    right: 0;
}

/* Overlay */
.atlas-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999997;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.atlas-settings-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Header */
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
    color: white;
}

.settings-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-header-left i {
    font-size: 24px;
}

.settings-header-left h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.settings-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
}

.settings-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Tabs */
.settings-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    overflow-x: auto;
}

.settings-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.settings-tab:hover {
    background: rgba(59, 130, 246, 0.05);
    color: #3B82F6;
}

.settings-tab.active {
    color: #1E40AF;
    border-bottom-color: #1E40AF;
    background: white;
}

.settings-tab i {
    font-size: 16px;
}

/* Content */
.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Sections */
.settings-section {
    margin-bottom: 32px;
}

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

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.settings-section-title i {
    color: #3B82F6;
}

/* Form Elements */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-control {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Toggle Switch */
.form-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.toggle-info {
    flex: 1;
}

.toggle-info label {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    display: block;
    margin-bottom: 4px;
}

.toggle-description {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #3B82F6;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Subscription Card */
.subscription-card {
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
    border-radius: 12px;
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
}

.subscription-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.subscription-info h5 {
    margin: 0 0 8px 0;
    font-size: 20px;
}

.subscription-info p {
    margin: 0 0 16px 0;
    opacity: 0.9;
}

.subscription-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.subscription-price .price {
    font-size: 32px;
    font-weight: 700;
}

.subscription-price .period {
    font-size: 16px;
    opacity: 0.8;
}

/* Usage Stats */
.usage-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.usage-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.usage-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6 0%, #1E40AF 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.usage-text {
    font-size: 12px;
    color: #6b7280;
}

/* Payment Method */
.payment-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.payment-method i {
    font-size: 24px;
    color: #3B82F6;
}

.payment-method span {
    flex: 1;
    font-size: 14px;
    color: #374151;
}

.btn-link {
    background: none;
    border: none;
    color: #3B82F6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

.btn-link:hover {
    color: #1E40AF;
}

/* Footer */
.settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.btn-secondary,
.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
}

.btn-primary {
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Notification Toast */
.settings-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: #10b981;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    z-index: 999999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.settings-notification.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.settings-notification.error {
    background: #ef4444;
}

.settings-notification.warning {
    background: #f59e0b;
}

/* Responsive */
@media (max-width: 768px) {
    .atlas-settings-panel {
        width: 100%;
        right: -100%;
    }

    .settings-tabs {
        overflow-x: auto;
    }

    .settings-tab span {
        display: none;
    }

    .settings-tab {
        flex: 0 0 auto;
        padding: 16px;
    }
}
