
.sidebar-search__form {
    max-width: 669px;
    width: 100%;
    background: var(--sidebar-background);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    position: relative;
    margin: 0 auto 20px;
    padding-block: var(--sidebar-padding-block);
    padding-inline: var(--sidebar-padding-inline);
    container-type: inline-size;
    container-name: search-form-container;
}

/** Custom style for handling expansion when search box is expanded */
.sidebar-search__form > .checkbox-group {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}

.sidebar-search__form .btn {
    flex-shrink: 0;
}

.dm-player__btn-actions {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 54px;
    z-index: 100;
    display: none;
    gap: 8px;
    align-items: center;
}

.dm-player__holder:has(.dailymotion-player-root) .dm-player__btn-actions {
    display: flex;
}

.btn-open-post-player {
    z-index: 100;
    --button-width: 178px;
    --button-padding: 8px 12px;
    --button-height: 40px;
    --button-surface-color: #f8f8f8;
    --button-surface-hover: var(--grey-91);
    font-family: DailySans, Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 20px;
    position: absolute;
    left: calc(50% - var(--button-width) / 2);
    bottom: 54px;
    border: var(--blue-violet) 4px solid;
    border-radius: 8px;
    display: none;
    color: var(--grey-14);
    justify-content: center;
    align-items: center;
}

.dm-player__btn-actions .btn-open-post-player {
    position: static;
    display: flex;
    z-index: auto;
    left: auto;
    bottom: auto;
}

.btn-open-post-player svg {
    width: 22px;
    height: 22px;
}

.btn-select-video {
    --button-width: auto;
    --button-padding: 8px 12px;
    --button-height: 40px;
    --button-surface-color: #f8f8f8;
    --button-surface-hover: var(--grey-91);
    font-family: DailySans, Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 20px;
    border: var(--blue-violet) 4px solid;
    border-radius: 8px;
    color: var(--grey-14);
    justify-content: center;
    align-items: center;
}

.btn-select-video svg {
    width: 22px;
    height: 22px;
}

.input-group--wrapper {
    position: relative;
    display: flex;
    flex: 1;
}

.input-group--wrapper.input-wrapper .input-form {
    --input-border: var(--border-input-group);
    --input-font-size: 12px;
    width: calc(100% - 42px);
    border-radius: 8px 0 0 8px;
    display: inline-block;
    vertical-align: middle;
    border-color: var(--border-input-group, #e8e8e8);

    &::placeholder {
        color: var(--grey-66);
    }
}

#searchWrapper:focus-within .input-form.search-input {
    --input-border: var(--blue-violet, #4f3afd);
    border-color: var(--blue-violet, #4f3afd);
    outline: none;
}

.input-group--wrapper .btn {
    --button-radius: 0 8px 8px 0;
    --button-padding: 10px;
    vertical-align: middle;
    margin-left: -4px;
}

.input-group--wrapper .btn-icon svg, .btn.drop-down svg {
    width: 16px;
    height: 16px;
}

.input-group--wrapper .btn svg path {
    fill: var(--button-branded-icon-color);
}

@container search-form-container (max-width: 600px) {
    #searchWrapper:focus-within ~ .btn.hidden-on-focus {
        display: none;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
    }
}

.btn.drop-down {
    --button-surface-color: #fff;
    --button-surface-hover: #fff;
    --button-border: var(--input-border);
    --button-radius: 8px;
    --button-padding: 10px;
    --button-width: 42px;
    --button-height: 42px;
}

.btn.drop-down.is-active {
    --button-border: var(--blue-violet, #4f3afd);
    border-color: var(--blue-violet, #4f3afd);
}

.drop-down-wrapper {
    display: block;
    width: 264px;
    padding: var(--spacing-sm);
    flex-direction: column;
    border-radius: 6px;
    overflow: hidden;
    background: var(--btn-bg-theme);
    box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.20), 0px 12px 28px 0px rgba(96, 96, 96, 0.18);
    position: absolute;
    top: calc(100% - 20px);
    right: var(--spacing-xs);
    font-family: "ABC Favorit", Arial, Helvetica, sans-serif;
    z-index: 60;
}

/* Sort by — compact list (Figma) */
.drop-down-wrapper.sort-panel {
    width: auto;
    min-width: 109px;
    max-width: 160px;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
}

.sort-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    gap: 8px;
}

.sort-panel__title {
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: #606060;
}

.sort-panel__icon {
    display: flex;
    flex-shrink: 0;
}

.sort-panel__divider {
    height: 1px;
    background: #e8e8e8;
    width: 100%;
}

.sort-panel__option {
    display: block;
    width: 100%;
    margin: 0;
    padding: 14px 16px;
    border: none;
    background: transparent;
    text-align: left;
    font-family: inherit;
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
    color: #767676;
    cursor: pointer;
}

.sort-panel__option:hover {
    background: #fafafa;
}

.sort-panel__option.is-selected {
    background: #f1e8fd;
    color: var(--blue-violet, #4f3afd);
    font-weight: 700;
}

/* Channel & language panels */
.drop-down-wrapper.channel-panel,
.drop-down-wrapper.language-panel {
    width: 264px;
    padding: 12px;
    border-radius: 12px;
    overflow: visible;
}

.dropdown-panel__stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dropdown-panel__intro h6 {
    margin-block: 0 6px;
}

.dropdown-panel__intro p {
    margin: 0;
}

.dropdown-panel__selection-summary {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 16px;
    color: #a8a8a8;
}

.dropdown-panel__list-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.dropdown-panel__filter-row {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-panel__filter-input {
    width: 100%;
    padding: 6px 36px 6px 12px;
    border: none;
    font-family: inherit;
    font-size: 12px;
    line-height: 16px;
}

.dropdown-panel__filter-input:focus {
    outline: none;
}

.dropdown-panel__filter-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    pointer-events: none;
}

.dropdown-panel__filter-icon svg {
    width: 20px;
    height: 20px;
}

.dropdown-panel__divider {
    height: 1px;
    background: #e8e8e8;
}

.dropdown-panel__scroll {
    max-height: 260px;
    overflow-y: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #606060 #f0f0f0;
}

.dropdown-panel__scroll::-webkit-scrollbar {
    width: 4px;
}

.dropdown-panel__scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 20px;
}

.dropdown-panel__scroll::-webkit-scrollbar-thumb {
    background: #606060;
    border-radius: 20px;
}

.dropdown-panel__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin: 0;
    cursor: pointer;
    font-size: 12px;
    line-height: 16px;
    color: #606060;
}

.dropdown-panel__row--indented {
    padding-left: 24px;
}

.dropdown-panel__checkbox {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin: 0;
    appearance: none;
    border: 2px solid #606060;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.dropdown-panel__checkbox:checked {
    background-color: var(--blue-violet, #4f3afd);
    border-color: var(--blue-violet, #4f3afd);
    background-image: url("../Assets/CheckmarkSquare.svg");
    background-repeat: no-repeat;
    background-position: center;
}
input[type="checkbox"].dropdown-panel__checkbox:checked::before {
    content: "";
}

.dropdown-panel__row-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-panel__apply {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 6px;
    background: #232323;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
}

.dropdown-panel__apply:hover {
    opacity: 0.92;
}
.drop-down-wrapper p {
    color: #606060;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 16px;
}

.drop-down-wrapper h6 {
    margin-block: 0 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1 0 0;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
    color: #1E1E1E;
}

.options-wrapper {
    padding: 6px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: scroll;
    border-top: none;
}
.option-wrapper {
    position: relative;
    margin-bottom: var(--spacing-xs);
}
.option-wrapper.sub-options label {
    margin-left: 36px;
}
.option-wrapper label {
    cursor: pointer;
    margin-left: 24px;
    font-size: 12px;
    line-height: 16px;
    color: #606060;
    overflow: hidden;
    display: list-item;
    text-overflow: ellipsis;
}
.option-wrapper input {
    display: none;
}
.option-wrapper label::before {
    content: "";
    display: inline-block;
    border: solid 2px #606060;
    width: 16px;
    height: 16px;
    position: absolute;
    left: 0;
    top: 1px;
    border-radius: 4px;
}
.option-wrapper.sub-options label::before {
    left: 12px;
}
.option-wrapper input:checked + label::before {
    background-image: url("../Assets/CheckmarkSquare.svg");
    background-color: var(--blue-violet);
    border: none;
    background-repeat: no-repeat;
    background-position: center;
}

.drop-down-wrapper .input-form__finder {
    padding: 6px 30px 6px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px 8px 0 0;
    width: 100%;
}
.clear-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    --button-padding: 5px;
    --button-height: auto;
    --button-width: auto;
    line-height: 1em;
}

.clear-button:hover {
    color: #333;
}
