/**
 * FriendlyForce Preferences Modal Styles
 */

/* Overlay */
.ff-prefs-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ff-prefs-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.ff-prefs-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.ff-prefs-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Content Container */
.ff-prefs-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

/* Header */
.ff-prefs-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.ff-prefs-header h2 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.ff-prefs-header p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.ff-prefs-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.ff-prefs-close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Body */
.ff-prefs-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}

/* Sections */
.ff-prefs-section {
    margin-bottom: 24px;
}

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

.ff-prefs-section h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.ff-prefs-hint {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: #9ca3af;
}

/* Location */
.ff-prefs-location {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

#ff-prefs-location-text {
    flex: 1;
    font-size: 14px;
    color: #374151;
}

.ff-prefs-btn-small {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #3b82f6;
    background: #eff6ff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ff-prefs-btn-small:hover {
    background: #dbeafe;
}

/* Interests Grid */
.ff-prefs-interests {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ff-prefs-interest {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ff-prefs-interest:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.ff-prefs-interest.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.ff-prefs-interest input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ff-prefs-interest-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.ff-prefs-interest-label {
    font-size: 11px;
    font-weight: 500;
    color: #374151;
    text-align: center;
    line-height: 1.2;
}

/* Checkboxes */
.ff-prefs-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ff-prefs-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ff-prefs-checkbox:hover {
    background: #f3f4f6;
}

.ff-prefs-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.ff-prefs-checkbox span {
    font-size: 14px;
    color: #374151;
}

/* Radio Buttons */
.ff-prefs-radios {
    display: flex;
    gap: 8px;
}

.ff-prefs-radio {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ff-prefs-radio:hover {
    border-color: #93c5fd;
}

.ff-prefs-radio:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

.ff-prefs-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.ff-prefs-radio span {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

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

.ff-prefs-btn-secondary {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.ff-prefs-btn-primary {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ff-prefs-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
}

.ff-prefs-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .ff-prefs-modal {
        width: 95%;
        max-height: 85vh;
    }

    .ff-prefs-header {
        padding: 20px 16px 12px;
    }

    .ff-prefs-body {
        padding: 12px 16px;
    }

    .ff-prefs-footer {
        padding: 12px 16px;
    }

    .ff-prefs-interests {
        grid-template-columns: repeat(2, 1fr);
    }

    .ff-prefs-radios {
        flex-direction: column;
    }

    .ff-prefs-radio {
        justify-content: flex-start;
        padding: 10px 12px;
    }
}

