/* Account Settings Styles */

.settings-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: fit-content;
}

.tab-btn:hover {
    color: #374151;
    background: #f9fafb;
}

.tab-btn.active {
    color: #2563eb;
    background: #eff6ff;
    border-bottom: 2px solid #2563eb;
    margin-bottom: -2px;
}

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

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Settings Sections */
.settings-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.settings-section h2 {
    color: #111827;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.section-description {
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 14px;
}

/* Forms */
.settings-form {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #374151;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:read-only {
    background: #f9fafb;
    color: #6b7280;
}

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

/* Password Requirements */
.password-requirements {
    margin-top: 8px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.password-requirements small {
    color: #6b7280;
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    color: #dc2626;
    font-size: 12px;
    margin-bottom: 4px;
    position: relative;
    padding-left: 20px;
}

.password-requirements li:before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #dc2626;
}

.password-requirements li.valid {
    color: #059669;
}

.password-requirements li.valid:before {
    content: "✓";
    color: #059669;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: #f9fafb;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

/* Current Plan Card */
.current-plan-card {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.plan-header h3 {
    color: #1e40af;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.plan-price {
    color: #1e40af;
    font-size: 24px;
    font-weight: 700;
}

.plan-features {
    color: #374151;
    margin-bottom: 20px;
}

.plan-actions {
    display: flex;
    gap: 12px;
}

/* Sessions */
.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
}

.session-info {
    flex: 1;
}

.session-device {
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.session-details {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
}

/* Integrations */
.integration-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.integration-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.integration-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.integration-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.integration-details h4 {
    color: #374151;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.integration-details p {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 8px 0;
}

.integration-status {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.integration-status.connected {
    background: #d1fae5;
    color: #065f46;
}

.integration-status:not(.connected) {
    background: #fee2e2;
    color: #991b1b;
}

/* API Section */
.api-section {
    max-width: 600px;
}

.api-key-item {
    margin-bottom: 20px;
}

.api-key-item label {
    display: block;
    color: #374151;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.api-key-display {
    display: flex;
    gap: 8px;
    align-items: center;
}

.api-key-display input {
    flex: 1;
    font-family: monospace;
    font-size: 12px;
}

/* Preferences */
.preferences-form {
    max-width: 600px;
}

.preference-group {
    margin-bottom: 32px;
}

.preference-group h4 {
    color: #374151;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.preference-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-info {
    flex: 1;
}

.preference-title {
    display: block;
    color: #374151;
    font-weight: 500;
    margin-bottom: 4px;
}

.preference-desc {
    color: #6b7280;
    font-size: 14px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

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

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

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

input:checked + .slider {
    background-color: #2563eb;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Danger Zone */
.danger-zone {
    border-color: #fecaca;
    background: #fef2f2;
}

.danger-zone h2 {
    color: #dc2626;
}

.danger-actions {
    max-width: 600px;
}

.danger-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

.danger-info {
    flex: 1;
    margin-right: 20px;
}

.danger-info h4 {
    color: #dc2626;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.danger-info p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-overlay p {
    color: white;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Message Container */
#message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.message {
    background: white;
    color: #111827;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #2563eb;
    min-width: 260px;
    max-width: 400px;
    font-weight: 600;
    line-height: 1.4;
    animation: slideIn 0.3s ease-out;
}

.message.success {
    border-left-color: #059669;
}

.message.error {
    border-left-color: #dc2626;
}

.message.warning {
    border-left-color: #d97706;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-container {
        padding: 16px;
    }
    
    .settings-section {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .integration-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .danger-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .session-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .api-key-display {
        flex-direction: column;
        align-items: stretch;
    }
}

/* =========================================================
   Artist AMP Theme Override - Account Settings
   ========================================================= */

.settings-container {
    max-width: 1400px;
    padding: 24px;
}

.settings-tabs {
    border-bottom: 1px solid rgba(255,255,255,0.10);
    padding-bottom: 0;
}

.tab-btn {
    color: #b7aea1;
    background: transparent;
    border: 1px solid transparent;
}

.tab-btn:hover {
    color: #f3f0e8;
    background: rgba(255,255,255,0.04);
}

.tab-btn.active {
    color: #f3f0e8;
    background: rgba(241, 102, 35, 0.12);
    border: 1px solid rgba(241, 102, 35, 0.35);
    border-bottom: 2px solid #F16623;
}

.settings-section,
.current-plan-card {
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.settings-section h2,
.settings-section h3,
.settings-section h4,
.plan-header h3,
.plan-header h4 {
    color: #f3f0e8;
}

.section-description,
.form-help,
.password-requirements small,
.settings-section p,
.settings-section li,
.settings-section span:not(.status-badge):not(.plan-price) {
    color: #b7aea1;
}

.form-group label {
    color: #f3f0e8;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: #111111;
    color: #f3f0e8;
    border: 1px solid rgba(255,255,255,0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #8a7f73;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #F16623;
    box-shadow: 0 0 0 3px rgba(241, 102, 35, 0.16);
    background: #111111;
    color: #f3f0e8;
}

.form-group input:read-only {
    background: #202020;
    color: #b7aea1;
    border-color: rgba(255,255,255,0.08);
}

.password-requirements {
    background: #111111;
    border: 1px solid rgba(255,255,255,0.08);
}

.form-actions {
    border-top: 1px solid rgba(255,255,255,0.08);
}

.btn-primary {
    background: linear-gradient(135deg, #F16623, #FF8A50);
    color: #ffffff;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #d95a1e, #f27c42);
    box-shadow: 0 8px 20px rgba(241, 102, 35, 0.28);
}

.btn-secondary {
    background: #232323;
    color: #f3f0e8;
    border: 1px solid rgba(255,255,255,0.12);
}

.btn-secondary:hover {
    background: #2d2d2d;
    border-color: rgba(241, 102, 35, 0.35);
    color: #ffffff;
}

.btn-danger {
    box-shadow: none;
}

.current-plan-card {
    background: linear-gradient(180deg, rgba(241,102,35,0.12) 0%, rgba(26,26,26,1) 100%);
    border: 1px solid rgba(241,102,35,0.35);
}

.current-plan-card .plan-price,
.current-plan-card .plan-name,
.current-plan-card strong {
    color: #f3f0e8;
}

.danger-zone {
    border-color: rgba(220, 38, 38, 0.35);
    background: linear-gradient(180deg, rgba(220,38,38,0.08) 0%, rgba(26,26,26,1) 100%);
}

@media (max-width: 768px) {
    .settings-container {
        padding: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .settings-section {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }
}


/* Account Settings layout expansion */
.settings-form-wide {
    max-width: 100%;
}

.settings-form-wide .settings-section + .settings-section {
    margin-top: 24px;
}

.settings-form-wide textarea {
    min-height: 120px;
    resize: vertical;
}

.payout-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.payout-status-row > div {
    min-width: 0;
    flex: 1;
}

@media (max-width: 640px) {
    .payout-status-row {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Final Account Settings toast override */
#message-container {
    position: fixed !important;
    top: 24px !important;
    right: 24px !important;
    z-index: 99999 !important;
}

#message-container .message {
    background: #111827 !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    min-width: 260px !important;
    max-width: 400px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

#message-container .message.success {
    border-left: 4px solid #059669 !important;
}

#message-container .message.error {
    border-left: 4px solid #dc2626 !important;
}

#message-container .message.warning {
    border-left: 4px solid #d97706 !important;
}

/* Final toast colors: success/error/warning with white text */
#message-container {
    position: fixed !important;
    top: 24px !important;
    right: 24px !important;
    z-index: 99999 !important;
}

#message-container .message {
    color: #ffffff !important;
    border: none !important;
    border-left: none !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    margin-bottom: 12px !important;
    min-width: 260px !important;
    max-width: 400px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28) !important;
}

#message-container .message.success {
    background: #059669 !important;
    color: #ffffff !important;
}

#message-container .message.error {
    background: #dc2626 !important;
    color: #ffffff !important;
}

#message-container .message.warning {
    background: #d97706 !important;
    color: #ffffff !important;
}

#message-container .message.info {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Profile picture upload block */
.profile-image-setting {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    margin: 18px 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.profile-image-preview {
    width: 84px;
    height: 84px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: #111827;
}

.profile-image-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-image-actions p {
    margin: 0 0 8px;
    opacity: 0.8;
}

.profile-image-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: fit-content;
}


/* Account owner timezone control */
.timezone-control-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.timezone-control-row select {
    flex: 1;
    min-width: 0;
}

.timezone-control-row button {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .timezone-control-row {
        align-items: stretch;
        flex-direction: column;
    }

    .timezone-control-row button {
        width: 100%;
    }
}
