/* PAGE */

.search-page {
    width: 100%;
}


/* HEADER */

.search-page-header {
    margin-bottom: 25px;
}

.search-page-header h1 {
    margin: 0;

    color: white;

    font-size: 28px;
    font-weight: 800;
}

.search-page-header p {
    margin: 7px 0 0;

    color: #666;

    font-size: 13px;
}


/* SEARCH BOX */

.advanced-search {
    padding: 20px;

    background: #0d0d0d;

    border: 1px solid #1d1d1d;

    border-radius: 12px;
}

.search-main {
    display: flex;
    align-items: center;

    gap: 8px;

    margin-bottom: 16px;
}

.search-main button,
.search-main .search-reset {
    height: 40px;

    flex-shrink: 0;

    padding: 0 14px;

    border-radius: 7px;

    font-family: inherit;

    font-size: 12px;
    font-weight: 700;
}

.search-main input {
    flex: 1;
    min-width: 0;

    height: 40px;

    padding: 0 12px;

    background: #080808;

    border: 1px solid #292929;

    border-radius: 7px;

    color: white;

    outline: none;

    font-family: inherit;
    font-size: 12px;
}

.search-main input:focus {
    border-color: var(--red);
}

.search-main input::placeholder {
    color: #555;
}

.search-main button {
    border: 0;

    background: var(--red);

    color: white;

    cursor: pointer;

    transition: .2s;
}

.search-main button:hover {
    background: var(--red-hover);
}

.search-main .search-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #292929;

    background: #171717;

    color: #999;

    text-decoration: none;

    font-weight: 600;

    transition: .2s;
}

.search-main .search-reset:hover {
    background: #222;

    color: white;
}


/* FILTERS */

.search-filters {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;
}

.filter-group {
    min-width: 0;
}

.filter-group > label {
    display: block;

    margin-bottom: 7px;

    color: #888;

    font-size: 11px;
    font-weight: 600;
}

.filter-group > input,
.filter-group > select {
    width: 100%;

    height: 40px;

    padding: 0 11px;

    background: #080808;

    border: 1px solid #292929;

    border-radius: 7px;

    color: #ddd;

    outline: none;

    font-family: inherit;

    font-size: 12px;
}

.filter-group > select:focus {
    border-color: var(--red);
}

.filter-group select {
    cursor: pointer;
}

.search-reset:hover {
    background: #222;

    color: white;
}


/* RESULTS */

.search-results {
    margin-top: 35px;
}

.results-header {
    margin-bottom: 18px;
}

.results-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.results-title > div:first-child {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.results-header h2 {
    margin: 0;

    color: white;

    font-size: 20px;
    font-weight: 700;
}

.results-header span {
    color: #666;

    font-size: 12px;
}


/* SORT */

.results-sort {
    display: flex;
    align-items: center;

    gap: 8px;
}

.results-sort label {
    color: #666;

    font-size: 11px;
}

.results-sort select {
    height: 36px;

    min-width: 145px;

    padding: 0 10px;

    background: #111;

    border: 1px solid #292929;

    border-radius: 7px;

    color: #ccc;

    outline: none;

    font-family: inherit;

    font-size: 11px;

    cursor: pointer;

    transition: .2s;
}

.results-sort select:hover {
    border-color: #3a3a3a;

    background: #161616;
}

.results-sort select:focus {
    border-color: var(--red);
}


/* GRID */

.search-video-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;
}


/* CARD */

.search-video-card {
    overflow: hidden;

    background: #0d0d0d;

    border: 1px solid #171717;

    border-radius: 9px;

    color: inherit;

    text-decoration: none;

    transition:
        transform .2s ease,
        background .2s ease,
        border-color .2s ease;
}

.search-video-card:hover {
    transform: translateY(-3px);

    background: #141414;

    border-color: #282828;
}


/* THUMBNAIL */

.search-thumbnail {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #181818;
}

.search-thumbnail img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform .3s ease;
}

.search-video-card:hover .search-thumbnail img {
    transform: scale(1.03);
}

.search-thumbnail > span {
    position: absolute;

    right: 7px;
    bottom: 7px;

    padding: 3px 5px;

    background: rgba(0, 0, 0, .85);

    border-radius: 4px;

    color: white;

    font-size: 9px;
    font-weight: 700;
}


/* INFO */

.search-video-info {
    padding: 12px;
}

.search-video-info h3 {
    margin: 0 0 7px;

    color: #eee;

    font-size: 14px;
    line-height: 1.35;

    font-weight: 650;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;
}

.search-video-author {
    margin-bottom: 4px;

    color: #777;

    font-size: 11px;
}

.search-video-meta {
    color: #555;

    font-size: 10px;
}


/* CATEGORIES */

.search-categories {
    display: flex;

    flex-wrap: wrap;

    gap: 4px;

    margin-top: 9px;
}

.search-categories span {
    padding: 3px 6px;

    background: #191919;

    border: 1px solid #242424;

    border-radius: 4px;

    color: #777;

    font-size: 9px;
}


/* EMPTY */

.search-empty {
    padding: 80px 20px;

    text-align: center;

    background: #0d0d0d;

    border: 1px solid #1d1d1d;

    border-radius: 10px;
}

.search-empty-icon {
    margin-bottom: 12px;

    color: #555;

    font-size: 30px;
}

.search-empty h3 {
    margin: 0 0 6px;

    color: #aaa;

    font-size: 16px;
}

.search-empty p {
    margin: 0;

    color: #555;

    font-size: 12px;
}


/* PAGINATION */

.search-pagination {
    display: flex;
    justify-content: center;

    margin-top: 30px;
}

.search-pagination nav {
    display: flex;
    justify-content: center;
}

.search-pagination .pagination {
    margin: 0;
}

.search-pagination .page-link {
    background: #111;

    border-color: #292929;

    color: #888;

    font-size: 12px;
}

.search-pagination .page-link:hover {
    background: #1d1d1d;

    color: white;
}

.search-pagination .page-item.active .page-link {
    background: var(--red);

    border-color: var(--red);

    color: white;
}


/* RESPONSIVE */

@media (max-width: 1100px) {

    .search-filters {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .search-video-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 700px) {

    .search-page-header h1 {
        font-size: 23px;
    }

    .search-filters {
        grid-template-columns: 1fr;
    }

    .search-video-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }

    .advanced-search {
        padding: 15px;
    }
}


@media (max-width: 480px) {

    /* ================================
    SEARCH RESPONSIVE
    ================================ */

    .search-main {
        display: grid;

        grid-template-columns:
            1fr 1fr;

        gap: 8px;

        width: 100%;
    }

    .search-main input {
        grid-column: 1 / -1;

        width: 100%;

        height: 42px;

        box-sizing: border-box;
    }

    .search-main button,
    .search-main .search-reset {
        width: 100%;

        height: 40px;

        box-sizing: border-box;
    }


    /* ================================
    VIDEO GRID
    ================================ */

    .search-video-grid {
        grid-template-columns: 1fr;
    }


    /* ================================
    RESULTS HEADER
    ================================ */

    .results-header h2 {
        display: block;
    }

    .results-header span {
        display: block;

        margin: 5px 0 0;
    }

}


@media (max-width: 600px) {

    .results-title {
        align-items: flex-start;

        flex-direction: column;

        gap: 12px;
    }

    .results-title > div:first-child {
        display: block;
    }

    .results-title h2 {
        display: block;
    }

    .results-title span {
        display: block;

        margin-top: 4px;
    }

    .results-sort {
        width: 100%;
    }

    .results-sort select {
        flex: 1;

        min-width: 0;
    }
}

/* =========================================
CATEGORY MULTI SELECT
========================================= */

.category-filter-group {
    grid-column: span 2;
}

.category-selector {
    position: relative;

    height: 390px;

    background: #080808;
    border: 1px solid #292929;
    border-radius: 8px;

    overflow: hidden;
}


/* SEARCH */

.category-selector-header {
    padding: 8px;

    border-bottom: 1px solid #202020;
}

.category-search-wrapper {
    display: flex;
    align-items: center;

    gap: 8px;

    height: 34px;

    padding: 0 10px;

    background: #111;

    border: 1px solid #242424;

    border-radius: 6px;

    color: #555;
}

.category-search-wrapper:focus-within {
    border-color: var(--red);

    color: #aaa;
}

.category-search-wrapper input {
    width: auto;

    min-width: 0;

    flex: 1;

    height: 100%;

    margin: 0;
    padding: 0;

    background: transparent;

    border: 0;

    outline: 0;

    color: #ddd;

    font-family: inherit;

    font-size: 11px;
}

.category-search-wrapper input::placeholder {
    color: #555;
}

.category-search-wrapper input:focus {
    border: 0;
    outline: 0;
}


/* SELECTED */

.selected-categories {
    position: absolute;

    top: 51px;
    left: 0;
    right: 0;

    height: 74px;

    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;

    gap: 5px;

    padding: 8px;

    box-sizing: border-box;

    overflow-y: auto;

    background: #080808;

    border-bottom: 1px solid #202020;

    z-index: 5;
}

.selected-categories:empty {
    display: none;
}

.selected-categories::-webkit-scrollbar {
    width: 4px;
}

.selected-categories::-webkit-scrollbar-track {
    background: transparent;
}

.selected-categories::-webkit-scrollbar-thumb {
    background: #292929;
    border-radius: 10px;
}


/* Etiketlerin kendi satır düzeni */

.selected-category {
    display: inline-flex;
    align-items: center;

    vertical-align: middle;

    margin: 0 5px 5px 0;

    padding: 4px 7px;

    background: rgba(229, 9, 20, .10);

    border: 1px solid rgba(229, 9, 20, .25);

    border-radius: 5px;

    color: #ddd;

    font-size: 9px;
    font-weight: 600;
}



.remove-category {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 14px;
    height: 14px;

    padding: 0;

    background: transparent;

    border: 0;

    color: #777;

    font-size: 14px;

    line-height: 1;

    cursor: pointer;
}

.remove-category:hover {
    color: #ff4a52;
}


/* LIST */

.category-list {
    position: absolute;

    top: 125px;
    left: 0;
    right: 0;
    bottom: 0;

    max-height: none;

    overflow-y: auto;
}

.category-list::-webkit-scrollbar {
    width: 5px;
}

.category-list::-webkit-scrollbar-track {
    background: #080808;
}

.category-list::-webkit-scrollbar-thumb {
    background: #292929;

    border-radius: 10px;
}

.category-list-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 7px 9px;

    border-bottom: 1px solid #1b1b1b;

    background: #0d0d0d;
}

.category-list-actions button {
    padding: 0;

    background: transparent;

    border: 0;

    color: #666;

    font-family: inherit;

    font-size: 9px;
    font-weight: 600;

    cursor: pointer;
}

.category-list-actions button:hover {
    color: #ddd;
}


/* OPTIONS */

.category-options {
    display: flex;
    flex-direction: column;

    gap: 2px;

    padding: 4px;
}

.category-option {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;

    width: 100%;

    min-height: 34px;

    box-sizing: border-box;

    padding: 5px 7px;

    gap: 8px;

    border-radius: 5px;

    cursor: pointer;

    transition:
        background .15s ease,
        color .15s ease;
}

.category-option.category-hidden {
    display: none !important;
}

.category-option:hover {
    background: #151515;
}

.category-option input {
    position: absolute;

    width: 1px;
    height: 1px;

    margin: 0;
    padding: 0;

    opacity: 0;
    pointer-events: none;
}

.category-check {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 15px !important;
    height: 15px !important;

    min-width: 15px;
    min-height: 15px;

    flex: 0 0 15px;

    box-sizing: border-box;

    background: #111;

    border: 1px solid #333;

    border-radius: 4px;

    color: transparent;

    transition: .15s ease;
}

.category-option input:checked + .category-check {
    background: var(--red);

    border-color: var(--red);

    color: white;
}

.category-option .category-count {
    display: block;

    flex: 0 0 auto;

    margin-left: auto;

    color: #444;

    font-size: 9px;

    line-height: 1;
}

.category-option .category-name {
    display: block;

    flex: 1 1 auto;

    min-width: 0;

    width: auto;

    color: #999;

    font-size: 10px;

    line-height: 1.2;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.category-option input[type="checkbox"]:checked ~ .category-count {
    color: #777;
}


/* MOBILE */

@media (max-width: 700px) {

    .category-filter-group {
        grid-column: span 1;
    }

    .category-list {
        max-height: 200px;
    }

}

/* =========================================
ACTOR MULTI SELECT
========================================= */

.actor-filter-group {
    grid-column: span 2;
}

.actor-selector {
    position: relative;

    height: 390px;

    background: #080808;

    border: 1px solid #292929;

    border-radius: 8px;

    overflow: hidden;
}


/* SEARCH */

.actor-selector-header {
    padding: 8px;

    border-bottom: 1px solid #202020;
}

.actor-search-wrapper {
    display: flex;
    align-items: center;

    gap: 8px;

    height: 34px;

    padding: 0 10px;

    background: #111;

    border: 1px solid #242424;

    border-radius: 6px;

    color: #555;
}

.actor-search-wrapper:focus-within {
    border-color: var(--red);

    color: #aaa;
}

.actor-search-wrapper input {
    width: auto;

    min-width: 0;

    flex: 1;

    height: 100%;

    margin: 0;

    padding: 0;

    background: transparent;

    border: 0;

    outline: 0;

    color: #ddd;

    font-family: inherit;

    font-size: 11px;
}

.actor-search-wrapper input::placeholder {
    color: #555;
}

.actor-search-wrapper input:focus {
    border: 0;
    outline: 0;
}


/* SELECTED */

.selected-actors {
    position: absolute;

    top: 51px;

    left: 0;
    right: 0;

    height: 74px;

    display: flex;

    flex-wrap: wrap;

    align-content: flex-start;

    gap: 5px;

    padding: 8px;

    box-sizing: border-box;

    overflow-y: auto;

    background: #080808;

    border-bottom: 1px solid #202020;

    z-index: 5;
}

.selected-actors:empty {
    display: none;
}

.selected-actors::-webkit-scrollbar {
    width: 4px;
}

.selected-actors::-webkit-scrollbar-track {
    background: transparent;
}

.selected-actors::-webkit-scrollbar-thumb {
    background: #292929;

    border-radius: 10px;
}


/* TAG */

.selected-actor {
    display: inline-flex;

    align-items: center;

    vertical-align: middle;

    margin: 0 5px 5px 0;

    padding: 4px 7px;

    background: rgba(229, 9, 20, .10);

    border: 1px solid rgba(229, 9, 20, .25);

    border-radius: 5px;

    color: #ddd;

    font-size: 9px;

    font-weight: 600;
}


.remove-actor {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 14px;

    height: 14px;

    padding: 0;

    background: transparent;

    border: 0;

    color: #777;

    font-size: 14px;

    line-height: 1;

    cursor: pointer;
}

.remove-actor:hover {
    color: #ff4a52;
}


/* LIST */

.actor-list {
    position: absolute;

    top: 125px;

    left: 0;
    right: 0;
    bottom: 0;

    max-height: none;

    overflow-y: auto;
}

.actor-list::-webkit-scrollbar {
    width: 5px;
}

.actor-list::-webkit-scrollbar-track {
    background: #080808;
}

.actor-list::-webkit-scrollbar-thumb {
    background: #292929;

    border-radius: 10px;
}


/* ACTIONS */

.actor-list-actions {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 7px 9px;

    border-bottom: 1px solid #1b1b1b;

    background: #0d0d0d;
}

.actor-list-actions button {
    padding: 0;

    background: transparent;

    border: 0;

    color: #666;

    font-family: inherit;

    font-size: 9px;

    font-weight: 600;

    cursor: pointer;
}

.actor-list-actions button:hover {
    color: #ddd;
}


/* OPTIONS */

.actor-options {
    display: flex;

    flex-direction: column;

    gap: 2px;

    padding: 4px;
}

.actor-option {
    display: flex !important;

    flex-direction: row !important;

    align-items: center !important;

    width: 100%;

    min-height: 34px;

    box-sizing: border-box;

    padding: 5px 7px;

    gap: 8px;

    border-radius: 5px;

    cursor: pointer;

    transition:
        background .15s ease,
        color .15s ease;
}

.actor-option.actor-hidden {
    display: none !important;
}

.actor-option:hover {
    background: #151515;
}

.actor-option input {
    position: absolute;

    width: 1px;

    height: 1px;

    margin: 0;

    padding: 0;

    opacity: 0;

    pointer-events: none;
}


/* CHECK */

.actor-check {
    display: inline-flex !important;

    align-items: center !important;

    justify-content: center !important;

    width: 15px !important;

    height: 15px !important;

    min-width: 15px;

    min-height: 15px;

    flex: 0 0 15px;

    box-sizing: border-box;

    background: #111;

    border: 1px solid #333;

    border-radius: 4px;

    color: transparent;

    transition: .15s ease;
}

.actor-option input:checked + .actor-check {
    background: var(--red);

    border-color: var(--red);

    color: white;
}


/* NAME */

.actor-option .actor-name {
    display: block;

    flex: 1 1 auto;

    min-width: 0;

    width: auto;

    color: #999;

    font-size: 10px;

    line-height: 1.2;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* COUNT */

.actor-option .actor-count {
    display: block;

    flex: 0 0 auto;

    margin-left: auto;

    color: #444;

    font-size: 9px;

    line-height: 1;
}

.actor-option input[type="checkbox"]:checked ~ .actor-count {
    color: #777;
}


/* MOBILE */

@media (max-width: 700px) {

    .actor-filter-group {
        grid-column: span 1;
    }

    .actor-list {
        max-height: 200px;
    }

}