/* Settings Page Styles */

.settings-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    background: var(--bg-primary);
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;      /* Vertical centering */
    justify-content: center;  /* Horizontal centering of inner wrapper */
}

/* Allow pages to opt-out of vertical centering by adding body.no-center */
body.no-center .settings-container {
    align-items: flex-start;
    justify-content: flex-start;
}

.settings-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    padding: 40px;
    width: 100%;
}

.settings-wrapper h2 {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-family: 'Playfair Display', serif;
    font-size: 2.2em;
    font-weight: 700;
    border-bottom: 3px solid var(--brand-accent-orange);
    padding-bottom: 15px;
}

.settings-wrapper > p {
    margin: 0 0 30px 0;
    color: var(--text-color-light);
    font-size: 1.1em;
    line-height: 1.5;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

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

.settings-section h3 {
    margin: 0 0 20px 0;
    color: var(--text-color);
    font-family: 'Playfair Display', serif;
    font-size: 1.5em;
    font-weight: 600;
}

/* Profile Information */
.profile-info {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 25px;
}

.profile-avatar {
    flex-shrink: 0;
    position: relative;
    width: 100px;
    height: 100px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.avatar-initials {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--brand-accent-orange);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    font-weight: bold;
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-medium);
}

.profile-details {
    flex: 1;
    min-width: 0;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-color);
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand-accent-orange);
    box-shadow: 0 0 0 3px rgba(235, 129, 50, 0.1);
}

.form-group input[readonly] {
    background: var(--bg-secondary);
    color: var(--text-color-light);
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-color-light);
    font-size: 12px;
}

/* Form Actions */
.form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

.form-actions .btn-primary {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
}

/* Save Status */
#save-status {
    font-size: 14px;
    font-weight: 500;
}

#save-status.success {
    color: var(--color-success);
}

#save-status.error {
    color: var(--color-error);
}

/* Account Actions */
.account-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.account-actions .btn-secondary {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 8px;
}

.account-actions .btn-danger {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 8px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: var(--text-color);
    font-family: 'Playfair Display', serif;
    font-size: 1.6em;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid var(--brand-accent-orange);
    padding-bottom: 10px;
}

.modal-content p {
    margin: 0 0 20px 0;
    color: var(--text-color);
    line-height: 1.5;
    text-align: center;
}

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

.modal-content .form-actions {
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.modal-content .form-actions button {
    min-width: 120px;
}

/* Delete Confirmation Input */
#delete-confirmation {
    text-align: center;
    font-weight: bold;
    letter-spacing: 1px;
}

#delete-confirmation::placeholder {
    text-align: center;
    font-weight: normal;
    letter-spacing: normal;
}

/* Confirm Delete Button State */
#confirm-delete-btn:disabled {
    background: var(--input-border);
    border-color: var(--input-border);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-container {
        padding: 20px 15px;
        min-height: calc(100vh - 140px);
        align-items: stretch;      /* Avoid awkward vertical centering on small screens */
        justify-content: center;
    }
    
    .settings-wrapper {
        padding: 30px 25px;
    }
    
    .settings-wrapper h2 {
        font-size: 1.8em;
    }
    
    .profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
    
    .avatar-initials {
        width: 80px;
        height: 80px;
        font-size: 2em;
    }
    
    .account-actions {
        justify-content: center;
    }
    
    .modal-content {
        padding: 25px 20px;
        width: 95%;
    }
    
    .modal-content h3 {
        font-size: 1.4em;
    }
}

@media (max-width: 480px) {
    .settings-container {
        padding: 15px 10px;
    }
    
    .settings-wrapper {
        padding: 25px 20px;
    }
    
    .settings-wrapper h2 {
        font-size: 1.6em;
    }
    
    .profile-avatar {
        width: 70px;
        height: 70px;
    }
    
    .avatar-initials {
        width: 70px;
        height: 70px;
        font-size: 1.8em;
    }
    
    .form-group input {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .account-actions {
        flex-direction: column;
    }
    
    .account-actions button {
        width: 100%;
    }
}

/* Dark Mode Adjustments */
body.dark-mode .modal {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .avatar-initials {
    background: var(--brand-accent-orange);
    color: var(--color-white);
} 