/* preferences.css - User preferences modal styles */

.preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preferences-modal.hidden {
    display: none;
}

.preferences-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.preferences-modal-content {
    position: relative;
    background: var(--surface-color, #ffffff);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.preferences-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border-color, #e3e1d6);
}

.preferences-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color, #262626);
}

.close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-secondary, #5f6368);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--surface-light, #f5f6f7);
    color: var(--text-color, #262626);
}

.preferences-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.preferences-description {
    color: var(--text-secondary, #5f6368);
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
}

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

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

.section-label {
    display: block;
    font-weight: 600;
    color: var(--text-color, #262626);
    margin-bottom: 8px;
    font-size: 16px;
}

.section-help {
    font-size: 13px;
    color: var(--text-secondary, #5f6368);
    margin-bottom: 12px;
}

.preference-field {
    margin-bottom: 16px;
}

.preference-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color, #262626);
    margin-bottom: 6px;
}

.preference-input,
.preference-select,
.preference-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color, #dadce0);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-color, #262626);
    background: var(--surface-light, #f9f8f6);
    transition: all 0.2s;
}

.preference-input:focus,
.preference-select:focus,
.preference-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #4e8a78);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(78, 138, 120, 0.1);
}

.preference-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

.preference-select {
    cursor: pointer;
}

.preferences-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color, #e3e1d6);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: var(--surface-warm, #f9f8f6);
    border-radius: 0 0 16px 16px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--primary-color, #4e8a78);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover, #3a7563);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 138, 120, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary, #5f6368);
    border: 2px solid var(--border-color, #dadce0);
}

.btn-secondary:hover {
    background: var(--surface-light, #f5f6f7);
    border-color: var(--text-secondary, #5f6368);
}

.preference-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

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

.preference-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.preference-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.preference-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive design */
@media (max-width: 640px) {
    .preferences-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .preferences-modal-header {
        padding: 20px 16px 12px;
    }

    .preferences-modal-header h2 {
        font-size: 20px;
    }

    .preferences-modal-body {
        padding: 16px;
    }

    .preferences-modal-footer {
        padding: 12px 16px;
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}
