/* Floating Preference Modal Styles */
.pref-modal {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 360px;
    max-width: calc(100% - 40px);
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #333;
    border: 1px solid #eaeaea;
}

.pref-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pref-modal-content {
    padding: 16px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Scrollbar styling */
.pref-modal-content::-webkit-scrollbar {
    width: 4px;
}
.pref-modal-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

.pref-header h3 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    font-weight: 700;
}

.pref-header p {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #555;
}

.pref-header a {
    color: var(--primary-color, #000);
    font-weight: 600;
    text-decoration: underline;
}

.pref-categories {
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pref-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fdfdfd;
    border-radius: 8px;
    border: 1px solid #f1f1f1;
}

.category-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 10px;
}

.category-info strong {
    font-size: 0.8rem;
    font-weight: 600;
}

.category-info span {
    font-size: 0.7rem;
    color: #777;
    line-height: 1.2;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

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

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

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .slider {
    background-color: var(--primary-color, #111111);
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(16px);
}

.toggle-switch.disabled .slider {
    background-color: #e9ecef;
    cursor: not-allowed;
}
.toggle-switch.disabled input:checked + .slider:before {
    background-color: #adb5bd;
    box-shadow: none;
}

.pref-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pref-actions button {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.pref-btn-outline {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
}

.pref-btn-outline:hover {
    background: #f8f9fa;
    border-color: #bbb;
}

.pref-btn-primary {
    background: var(--primary-color, #111111);
    border: 1px solid var(--primary-color, #111111);
    color: #fff;
}

.pref-btn-primary:hover {
    background: #333;
    color: #fff;
}

.pref-btn-text {
    background: transparent;
    border: none;
    color: #555;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    width: 100%;
}

.pref-btn-text:hover {
    color: var(--primary-color, #111);
}

@media (max-width: 600px) {
    .pref-modal {
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        border: none;
        border-top: 1px solid #eaeaea;
    }
    
    .pref-actions {
        flex-direction: column-reverse;
    }
}
