/* Dojilyzer global search (common header) */

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-search-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #162033;
    cursor: pointer;
}

.mobile-search-button svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
}

.search-strip {
    border-bottom: 1px solid #edf0f6;
    background: #fff;
    padding: 14px 26px;
}

.global-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 920px;
}

.platform-select {
    position: relative;
    flex: 0 0 auto;
}

.platform-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 148px;
    height: 46px;
    padding: 0 14px;
    color: #162033;
    background: #fff;
    border: 1px solid #d7dce8;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
}

.platform-trigger .chevron {
    margin-left: auto;
    color: #98a2b3;
    font-size: 0.75rem;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.platform-badge.dlsite { background: #5b3fe8; }
.platform-badge.fanza { background: #e11d48; }

.platform-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    min-width: 180px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e4e7ef;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 33, 57, 0.12);
}

.platform-select.is-open .platform-menu { display: block; }

.platform-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #162033;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
}

.platform-option:hover,
.platform-option.is-selected {
    background: #f3f0ff;
}

.platform-option .check {
    margin-left: auto;
    color: #4f37e8;
    font-weight: 900;
    opacity: 0;
}

.platform-option.is-selected .check { opacity: 1; }

.search-field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.search-field .search-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #98a2b3;
    pointer-events: none;
}

.search-field input {
    width: 100%;
    height: 46px;
    padding: 0 40px 0 42px;
    border: 1px solid #d7dce8;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #162033;
    outline: none;
    background: #fff;
}

.search-field input:focus {
    border-color: #b8aef5;
    box-shadow: 0 0 0 3px rgba(79, 55, 232, 0.12);
}

.search-field .clear-btn {
    display: none;
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: #e8ebf2;
    color: #667085;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}

.search-field.has-value .clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-submit {
    flex: 0 0 auto;
    height: 46px;
    min-width: 88px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: #4f37e8;
    font-size: 0.95rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(79, 55, 232, 0.2);
}

.search-suggest {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 70;
    max-height: 420px;
    overflow: auto;
    padding: 10px 0;
    background: #fff;
    border: 1px solid #e4e7ef;
    border-radius: 12px;
    box-shadow: 0 16px 32px rgba(15, 33, 57, 0.14);
}

.search-suggest.is-open { display: block; }

.suggest-group-title {
    padding: 8px 16px 4px;
    color: #667085;
    font-size: 0.75rem;
    font-weight: 900;
}

.suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    color: #162033;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
}

.suggest-item:hover { background: #f7f5ff; }
.suggest-item span { color: #c0c6d4; }

/* Mobile full-screen search modal */
.search-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: #fff;
    overflow: auto;
}

.search-modal.is-open { display: block; }

.search-modal-inner {
    max-width: 560px;
    margin: 0 auto;
    padding: 18px 16px 32px;
}

.search-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.search-modal-head h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 900;
}

.search-modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f2f4f8;
    color: #667085;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.search-modal-label {
    display: block;
    margin: 0 0 8px;
    color: #475467;
    font-size: 0.82rem;
    font-weight: 800;
}

.search-modal-platforms {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.search-modal-platform {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #d7dce8;
    border-radius: 10px;
    background: #fff;
    font-weight: 800;
    cursor: pointer;
}

.search-modal-platform.is-selected {
    border-color: #b8aef5;
    background: #f7f5ff;
}

.search-modal-platform .check {
    margin-left: auto;
    color: #4f37e8;
    opacity: 0;
}

.search-modal-platform.is-selected .check { opacity: 1; }

.search-modal .search-field {
    margin-bottom: 12px;
}

.search-modal .search-submit {
    width: 100%;
    margin-bottom: 16px;
}

.search-modal .search-suggest {
    position: static;
    display: block;
    max-height: none;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.search-modal .search-suggest:empty { display: none; }

.similar-box {
    margin-top: 22px;
    padding: 18px;
    background: #fff;
    border: 1px solid #edf0f6;
    border-radius: 12px;
}

.similar-box h3 {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 900;
}

.similar-list {
    display: grid;
    gap: 8px;
}

.similar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid #edf0f6;
    border-radius: 10px;
    background: #fafbfe;
    font-weight: 800;
}

.similar-item:hover {
    border-color: #cfc8f8;
    background: #f7f5ff;
}

.similar-item .meta {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
}

@media (max-width: 767px) {
    .mobile-search-button { display: inline-flex; }

    .search-strip {
        display: none;
    }

    .search-strip.is-top-visible {
        display: block;
        padding: 12px 16px;
    }

    .search-strip.is-top-visible .global-search {
        flex-wrap: wrap;
    }

    .search-strip.is-top-visible .platform-select,
    .search-strip.is-top-visible .platform-trigger {
        width: 100%;
    }

    .search-strip.is-top-visible .search-field {
        flex: 1 1 calc(100% - 98px);
    }
}
