/* district/ui/avatarlist/filters.css */

/* --- GENERAL INTERACTION STYLE --- */
.filters-sheet button, 
.filters-sheet input, 
.filters-sheet select,
.filters-sheet summary,
.filters-sheet label {
    -webkit-tap-highlight-color: transparent;
}
.filters-sheet button:focus, 
.filters-sheet input:focus, 
.filters-sheet select:focus {
    outline: none;
}

/* --- SLIDING FILTER SHEET --- */
.filters-sheet {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background: #f7f7f7; /* Light background */
    color: #1c1c1e; /* Dark text */
    
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    
    display: flex;
    flex-direction: column;
    
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 50;
}

#avatar-list-card.show-filters .filters-sheet {
    transform: translateY(0);
    pointer-events: auto;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem 1rem 1.5rem;
    flex-shrink: 0;
    /* border-bottom: 1px solid #e5e5ea; <-- REMOVED */
}

.header-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-icon {
    width: 24px;
    height: 24px;
    filter: none; /* Remove invert for light theme */
    opacity: 0.8;
}
.header-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}
.sheet-close-btn {
    width: 36px;
    height: 36px;
    background: #e5e5ea; /* Light gray background */
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.sheet-close-btn img {
    width: 16px;
    height: 16px;
}

.filters-content {
    overflow-y: auto;
    padding: 1.5rem 2rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- VIP PROMO BLOCK --- */
.vip-promo-block {
    background-color: #FF4D4D; /* Coral */
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 26px;
    text-align: center;
    margin-bottom: 1.5rem; /* Add space below promo block */
}
.vip-promo-block p {
    margin: 0 0 1rem 0;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
}
.btn-buy-vip {
    background: white;
    color: #FF4D4D;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease;
}
.btn-buy-vip:active {
    transform: scale(0.98);
}

/* --- DISABLED STATE FOR NON-VIPS --- */
.filters-content.disabled > *:not(.vip-promo-block) {
    opacity: 0.4;
    pointer-events: none;
    user-select: none;
}


/* Общий стиль для всех подложек */
.filter-pod,
.form-group-inline-toggle {
    background: #ffffff;
    padding: 1rem 1.5rem;
    box-shadow: none;
    border: none;
}

/* Переопределение для конкретных блоков */
#id-filter-pod,
.filter-details {
    border-radius: 20px;
}

.filter-pod:not(.filter-details),
.form-group-inline-toggle {
    border-radius: 26px;
}



.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Unified Label Styles */
.filter-pod > .form-group > label,
.details-summary > label,
.form-group-inline-toggle > label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1c1c1e;
}


.details-summary label {
    margin: 0;
    pointer-events: none;
}

.filters-content .form-group input {
    width: 100%;
    background: #f0f2f7;
    border-radius: 18px;
    border: 1px solid #f0f2f7;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    color: #1c1c1e;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.age-slider-container {
    padding: 1.5rem 1rem 0.5rem;
}

.form-group input::placeholder { color: #c7c7cc; }

/* --- NEW: Mood Stickers --- */
.mood-stickers-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* 8px */
}

.mood-sticker {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    background-color: #e5e5ea;
    color: #1c1c1e;
    font-size: 0.75rem; /* Уменьшен шрифт */
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.mood-sticker:hover {
    background-color: #dcdce0;
}

.mood-sticker.active {
    background-color: #FF4D4D; /* Coral */
    color: white;
}


/* --- NEW: Age Range Slider --- */
.slider-track-container {
    position: relative;
    width: 100%;
    height: 28px;
    display: flex;
    align-items: center;
}
.slider-track {
    position: absolute;
    width: 100%;
    height: 4px;
    background-color: #e5e5ea;
    border-radius: 2px;
}
.slider-progress {
    position: absolute;
    height: 4px;
    background-color: #FF4D4D; /* Coral color */
    border-radius: 2px;
}
.slider-thumb {
    position: absolute;
    width: 28px;
    height: 28px;
    background-color: #FF4D4D; /* Coral color */
    border-radius: 50%;
    cursor: grab;
    transform: translateX(-50%);
    z-index: 2;
    border: none;
    box-shadow: none;
}
.slider-thumb:active { cursor: grabbing; transform: translateX(-50%) scale(1.1); }

.thumb-value-balloon {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background-color: #FF4D4D;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}

.thumb-value-balloon::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #FF4D4D transparent transparent transparent;
}


/* --- VIP TOGGLE --- */
.form-group-inline-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-switch { position: relative; display: inline-block; width: 51px; height: 31px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #e5e5ea; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 27px; width: 27px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
input:checked + .slider { background-color: #FF4D4D; } /* Coral color */
input:checked + .slider:before { transform: translateX(20px); }

/* --- Action Buttons --- */
.filters-actions {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    gap: 0.75rem;
}
.btn-filter-action {
    flex: 1;
    padding: 0.9rem 1.2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease;
}
.btn-filter-action:active { transform: scale(0.98); }

.btn-reset {
    background: #e5e5ea;
    color: #1c1c1e;
}
.btn-apply {
    background: #FF4D4D; /* Coral color */
    color: #ffffff;
}

/* --- Collapsible Mood Filter --- */
.filter-details {
    padding: 0; /* Override pod padding, we'll control it internally */
}

.details-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem; /* Same as old pod padding */
    cursor: pointer;
    list-style: none; /* Hide default marker */
}
.details-summary::-webkit-details-marker {
    display: none; /* Hide default marker in Safari */
}

.details-summary::after {
    content: '';
    width: 10px;
    height: 10px;
    border-style: solid;
    border-color: #8a8a8e;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease-in-out;
    flex-shrink: 0;
}

.filter-details[open] > .details-summary::after {
    transform: rotate(-135deg) translateY(-2px);
}

.details-content {
    padding: 0 1.5rem 1rem; /* Padding for the content area */
}

.mood-subcategory-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1c1c1e;
    margin: 1rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e5ea;
}
.details-content .mood-subcategory-title:first-of-type {
    margin-top: 0;
}