/* ==========================================================================
   search-component.css
   キャスト検索コンポーネント共通スタイル（全ページ読み込み）
   ========================================================================== */

/* ---- ラッパー（PCはコンパクト幅） ---- */
.cast-search-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 1.5rem;
}

@media (min-width: 768px) {
    .cast-search-wrap {
        max-width: 560px;
    }
}

/* ---- タブボタン ---- */
.cast-search-tabbar {
    display: flex;
    gap: 0.5rem;
}

.cast-search-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1rem;
    background: rgba(255, 255, 255, 0.88) !important;
    border: 1px solid rgba(255, 0, 180, 0.28) !important;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    color: #6a1048 !important;
    letter-spacing: 0.03em;
    line-height: 1.2;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(80, 0, 50, 0.08);
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, border-radius 0.15s;
}

.cast-search-tab i {
    font-size: 0.9rem;
    color: #c4007a;
}

.cast-search-tab:hover {
    background: #fff !important;
    border-color: rgba(255, 0, 180, 0.45) !important;
    color: #4a0832 !important;
    box-shadow: 0 4px 12px rgba(255, 0, 180, 0.15);
}

.cast-search-tab.active,
.cast-search-tab.active:hover {
    background: linear-gradient(135deg, #ff00b4, #9000ff) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(255, 0, 180, 0.35);
}

.cast-search-tab.active i {
    color: #fff;
}

.cast-search-wrap.is-open .cast-search-tab.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.cast-search-tab-badge {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.92);
    color: #c4007a;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-weight: 800;
    min-width: 18px;
    text-align: center;
    line-height: 1.5;
}

.cast-search-tab.active .cast-search-tab-badge {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* ---- パネル（開閉） ---- */
.cast-search-panels {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 0, 180, 0.28);
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(80, 0, 50, 0.10);
    transition: max-height 0.3s ease, opacity 0.22s ease;
}

.cast-search-wrap.is-open .cast-search-panels {
    max-height: 900px;
    opacity: 1;
}

.cast-search-panel {
    display: none;
    padding: 1rem 1.1rem 1.1rem;
}

.cast-search-panel.active {
    display: block;
}

/* form.css 上書き：フォームパーツは白背景・ダーク文字 */
.cast-search-wrap input,
.cast-search-wrap select,
.cast-search-wrap textarea {
    background: #fff !important;
    color: #333 !important;
}

.cast-search-wrap input[type=checkbox] {
    background: transparent !important;
}

/* ---- 名前検索入力 ---- */
.cns-input-row {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(200, 120, 170, 0.45);
    border-radius: 8px;
    padding: 0 0.85rem;
    gap: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cns-input-row:focus-within {
    border-color: #ff00b4;
    box-shadow: 0 0 0 3px rgba(255, 0, 180, 0.12);
}

.cns-icon {
    color: #b06090;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.cns-input {
    flex: 1;
    background: #fff !important;
    border: none !important;
    outline: none;
    color: #333 !important;
    font-size: 0.9rem;
    padding: 0.72rem 0;
    cursor: text;
    border-radius: 0 !important;
}

.cns-input::placeholder {
    color: #999 !important;
}

.cns-clear {
    background: none !important;
    border: none !important;
    color: #999 !important;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.2s;
}

.cns-clear:hover {
    color: #ff00b4 !important;
}

/* ---- オプションカテゴリ ---- */
.ocf-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #8a3060;
    margin-bottom: 0.5rem;
    letter-spacing: 0.06em;
}

.ocf-section-label--spaced {
    margin-top: 0.75rem;
}

.ocf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.ocf-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(200, 120, 170, 0.45);
    border-radius: 20px;
    font-size: 0.78rem;
    color: #5a2848;
    background: #fff;
    cursor: pointer;
    user-select: none;
    line-height: 1.6;
    transition: border-color 0.18s, color 0.18s, background 0.18s, box-shadow 0.18s;
}

.ocf-chip input[type=checkbox] {
    display: none;
}

.ocf-chip:hover {
    border-color: rgba(255, 0, 180, 0.55);
    color: #4a0832;
    background: #fff5fb;
}

.ocf-chip.checked {
    background: linear-gradient(135deg, #ff00b4, #9000ff);
    border-color: #ff00b4;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 0, 180, 0.28);
}

/* ---- ボタン ---- */
.cast-search-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.cast-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.6rem;
    background: linear-gradient(135deg, #ff00b4, #9000ff) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 10px rgba(255, 0, 180, 0.35);
    transition: opacity 0.2s, box-shadow 0.2s;
}

.cast-search-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 18px rgba(255, 0, 180, 0.55);
}

.cast-search-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(200, 120, 170, 0.45);
    border-radius: 8px;
    font-size: 0.78rem;
    color: #6a4060;
    background: #fff;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.cast-search-reset:hover {
    border-color: #ff00b4;
    color: #c4007a;
    background: #fff5fb;
}

/* ---- 空のスケジュール ---- */
.schedule-empty {
    color: #6a4060;
    font-size: 0.82rem;
    padding: 2.5rem 0;
    text-align: center;
    width: 100%;
}

/* PC：タブをさらに大きく */
@media (min-width: 768px) {
    .cast-search-tab {
        padding: 1.05rem 1.2rem;
        font-size: 1rem;
    }
    .cast-search-tab i {
        font-size: 0.95rem;
    }
}

/* モバイル */
@media (max-width: 640px) {
    .cast-search-tab {
        padding: 0.8rem 0.6rem;
        font-size: 0.82rem;
        gap: 0.35rem;
    }
    .cast-search-tab span:not(.cast-search-tab-badge) {
        white-space: nowrap;
    }
    .ocf-chip {
        font-size: 0.72rem;
        padding: 0.25rem 0.65rem;
    }
    .cast-search-btn {
        padding: 0.55rem 1.2rem;
        font-size: 0.8rem;
    }
    .cast-search-panel {
        padding: 0.85rem 0.9rem 0.95rem;
    }
}
