/* トーナメント検索・詳細ページ */

.search-page {
    background: #f5f5f5;
    min-height: calc(100dvh - 64px);
    padding: 16px 0 48px;
}

.search-page__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 1024px) {
    .search-page__inner {
        padding: 0;
    }
}

/* 検索バー */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.search-bar__input-wrap {
    position: relative;
    flex: 1;
}

.search-bar__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #999;
}

.search-bar__input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    outline: none;
}

.search-bar__input:focus {
    border-color: var(--color-accent);
}

.search-bar__filter {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* フィルター */
.search-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.search-filters__select {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #eee;
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
}

/* 日付タブ */
.date-tabs-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px 8px 8px 0;
}

.date-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
    padding-left: 8px;
}

.date-tabs::-webkit-scrollbar {
    display: none;
}

.date-tabs__item {
    flex-shrink: 0;
    padding: 8px 12px;
    border: none;
    background: none;
    font-size: 12px;
    color: var(--color-text);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.date-tabs__item.is-active {
    font-weight: 600;
    border-bottom-color: var(--color-accent);
    color: var(--color-accent);
}

.date-tabs__item.is-saturday {
    color: #2563eb;
}

.date-tabs__item.is-sunday {
    color: #dc2626;
}

.date-tabs__item.is-active.is-saturday,
.date-tabs__item.is-active.is-sunday {
    color: var(--color-accent);
}

.date-tabs__calendar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fff;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* トーナメントカード一覧 */
.tournament-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tournament-list__empty {
    padding: 48px 16px;
    text-align: center;
    color: var(--color-text-muted);
    background: #fff;
    border-radius: 8px;
}

.tournament-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.tournament-card:hover {
    box-shadow: var(--color-card-shadow);
}

.tournament-card__main {
    min-width: 0;
    flex: 1;
}

.tournament-card__title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.tournament-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.tournament-card__store {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
}

.tournament-card__store-name {
    color: var(--color-text-muted);
}

.tournament-card__station {
    color: #999;
    font-size: 11px;
}

.tournament-card__side {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
}

.tournament-card__status {
    font-size: 13px;
    font-weight: 600;
}

.tournament-card__status--open {
    color: var(--color-accent);
}

.tournament-card__status--closed {
    color: #dc2626;
}

.tournament-card__fee {
    font-size: 14px;
    font-weight: 500;
}

.tournament-card__players {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ===== 詳細ページ ===== */
.detail-page {
    background: #f5f5f5;
    padding: 16px 0 48px;
    min-height: calc(100dvh - 64px);
}

.detail-page__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 1024px) {
    .detail-page__inner {
        padding: 0;
    }
}

.detail-header {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px 16px;
    margin-bottom: 12px;
}

.detail-header__back {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.detail-header__back:hover {
    color: var(--color-accent);
}

.detail-header__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.detail-header__store {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 500;
}

.detail-header__address,
.detail-header__station {
    margin: 0;
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.detail-header__summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.detail-header__summary-item {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.detail-header__summary-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.detail-header__players {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.detail-header__fee {
    font-size: 16px;
    font-weight: 600;
}

.detail-header__status {
    font-size: 14px;
    font-weight: 600;
}

.detail-header__status--open {
    color: var(--color-accent);
}

.detail-header__status--closed {
    color: #dc2626;
}

.detail-tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    margin-bottom: 0;
}

.detail-tabs__item {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
}

.detail-tabs__item.is-active {
    color: var(--color-accent);
    font-weight: 600;
    border-bottom-color: var(--color-accent);
}

.detail-section {
    background: #fff;
    border: 1px solid var(--color-border);
    border-top: none;
    padding: 20px 16px;
}

.detail-section:last-of-type {
    border-radius: 0 0 8px 8px;
}

.detail-section__title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
}

.detail-section__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--color-text);
    white-space: pre-line;
}

.detail-dl {
    margin: 0;
}

.detail-dl__row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.detail-dl__row:last-child {
    border-bottom: none;
}

.detail-dl__row dt {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.detail-dl__row dd {
    margin: 0;
    text-align: right;
}

.detail-store {
    margin-top: 16px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px 16px;
}

.detail-store__label {
    margin: 0 0 4px;
    font-family: 'Manrope', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

.detail-store__title {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
}

.detail-store__link {
    display: inline-block;
    margin-top: 16px;
    font-size: 13px;
    color: var(--color-accent);
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 2px;
}

.detail-action {
    margin-top: 24px;
    padding: 0 0 16px;
}

.detail-action__btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: var(--color-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.detail-action__btn:hover {
    background: var(--color-accent-dark);
}
