/* Email Settings Page Styles */

/* Container */
.email-settings-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

/* Back Button */
.back-btn {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: opacity 0.3s ease;
}

.back-btn:hover {
    opacity: 0.9;
    color: white;
}

/* Settings Card */
.settings-card {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 2.5rem;
    animation: slideUp 0.5s ease-out;
}

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

/* Card Header */
.card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.card-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.card-header h1 {
    font-size: 1.75rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.card-header p {
    color: #666;
    margin: 0;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #e2e8f0;
}

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

.settings-section h2 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Current Email Display */
.current-email {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.email-info {
    flex: 1;
}

.current-email .email {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

.verification-badge.verified {
    background: #d4edda;
    color: #155724;
}

.verification-badge.not-verified {
    background: #fff3cd;
    color: #856404;
}

/* Warning Message */
.warning-message {
    padding: 1rem;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.warning-message i {
    color: #ffc107;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.warning-message strong {
    display: block;
    margin-bottom: 0.5rem;
}

.warning-message p {
    margin: 0;
    line-height: 1.4;
}

/* Change Email Section */
.change-email-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-top: 1.5rem;
}

.change-email-section.expanded {
    max-height: 600px;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    border-color: #667eea;
    outline: none;
}

/* Password Input Container */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #333;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Notification Options */
.notification-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.notification-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.3s ease;
    cursor: pointer;
}

.notification-option:hover {
    background: #e9ecef;
}

.notification-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
    margin-top: 0.1rem;
}

.notification-option label {
    cursor: pointer;
    flex: 1;
}

.option-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.option-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Email Frequency Options */
.frequency-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.frequency-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.frequency-option:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.frequency-option.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.frequency-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
    margin-top: 0.1rem;
}

.frequency-option label {
    cursor: pointer;
    flex: 1;
}

/* Button Styles */
.btn-primary {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #333;
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.btn-link:hover {
    color: #764ba2;
}

.btn-link i {
    transition: transform 0.3s ease;
}

.btn-link.expanded i {
    transform: rotate(180deg);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary.loading,
.btn-secondary.loading {
    pointer-events: none;
}

.btn-primary.loading i,
.btn-secondary.loading i {
    animation: spin 1s linear infinite;
}

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

/* Info Message */
.info-message {
    padding: 1rem;
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    border-radius: 6px;
    color: #0c5460;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.info-message i {
    color: #17a2b8;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.info-message p {
    margin: 0;
    line-height: 1.4;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    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);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.success-content {
    text-align: center;
}

.success-content > i {
    font-size: 3rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.success-content h4 {
    color: #333;
    margin-bottom: 1rem;
}

.success-content p {
    color: #666;
    margin-bottom: 1rem;
}

.new-email {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 1rem 0;
}

.instructions {
    text-align: left;
    margin-top: 1.5rem;
}

.instructions p {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.instructions ol {
    margin: 0.5rem 0 0 1rem;
    color: #666;
}

.instructions li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease-out;
}

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

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.info {
    border-left: 4px solid #17a2b8;
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: #28a745;
}

.toast.error i {
    color: #dc3545;
}

.toast.info i {
    color: #17a2b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .email-settings-container {
        padding: 1rem;
    }
    
    .settings-card {
        padding: 1.5rem;
    }
    
    .current-email {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .notification-option {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .toast {
        min-width: auto;
        width: calc(100vw - 2rem);
        margin: 0 1rem 1rem;
    }
}

@media (max-width: 480px) {
    .card-header i {
        font-size: 2.5rem;
    }
    
    .card-header h1 {
        font-size: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .notification-option,
    .frequency-option {
        padding: 1rem;
    }
    
    .success-content > i {
        font-size: 2.5rem;
    }
}
