/* Ticketta! 座席おまかせ予約（券種と枚数を選ぶ画面、Application/step1.php）。案A「静かな受付」。 */
/* Standalone stylesheet; deliberately valid CSS as well as SCSS. */
/* 購入手続きの共通部分（.tk-flow-page）は checkout.css、値は buyer.css を使う。 */

/* 選ばずに進もうとしたときの注意 */
.tk-flow-page .tk-auto-seat-error {
    width: 100%;
    margin: 0 0 var(--space-16);
    padding: var(--space-12) var(--space-16);
    border-radius: var(--radius-sm);
    background: var(--danger-bg);
    color: var(--danger-ink);
    font-size: 14px;
    font-weight: 700;
}

.tk-auto-seat {
    width: 100%;
    margin: 0;
}

/* 公演: バナー（全体を見せ、余白は同じ画像のぼかしで埋める）と公演名、日時・会場 */
.tk-flow-page .tk-auto-seat-head {
    overflow: hidden;
}

.tk-auto-seat-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: var(--banner-max-height);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: var(--banner-letterbox);
    cursor: zoom-in;
}

.tk-auto-seat-banner .tk-auto-seat-banner-blur {
    position: absolute;
    top: -32px;
    left: -32px;
    width: calc(100% + 64px);
    max-width: none;
    height: calc(100% + 64px);
    max-height: none;
    object-fit: cover;
    filter: blur(28px) saturate(0.85);
    opacity: 0.55;
}

.tk-auto-seat-banner .tk-auto-seat-banner-img {
    position: relative;
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: var(--banner-max-height);
}

.tk-auto-seat-banner:focus-visible {
    outline: var(--focus-width) solid var(--action);
    outline-offset: -3px;
}

.tk-auto-seat-head-text {
    padding: var(--space-16) var(--space-24);
}

.tk-flow-page .tk-auto-seat-title {
    margin: 0;
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.tk-flow-page .tk-auto-seat-date {
    margin: var(--space-4) 0 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.tk-flow-page .tk-auto-seat-info {
    margin: 0 0 var(--space-16);
    padding: var(--space-12) var(--space-16);
    border-radius: var(--radius-sm);
    background: var(--info-bg);
    color: var(--info-ink);
    font-size: 14px;
    line-height: 1.6;
}

/* 券種ごとの行: 券種名と料金、空席状況、枚数 */
.tk-flow-page .tk-auto-seat-list {
    padding: var(--space-8) var(--space-24);
}

.tk-auto-seat-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 112px;
    align-items: center;
    gap: var(--space-12);
    min-height: 64px;
    padding: var(--space-8) 0;
}

.tk-auto-seat-row + .tk-auto-seat-row {
    border-top: 1px solid var(--border-subtle);
}

.tk-auto-seat-type {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-wrap: anywhere;
}

.tk-auto-seat-type b {
    font-size: 16px;
    line-height: 1.5;
}

.tk-auto-seat-price {
    color: var(--text-muted);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.tk-auto-seat-status {
    padding: 2px var(--space-8);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.tk-auto-seat-status.is-ok {
    background: var(--avail-ok-bg);
    color: var(--avail-ok-ink);
}

.tk-auto-seat-status.is-few {
    background: var(--avail-few-bg);
    color: var(--avail-few-ink);
}

.tk-auto-seat-status.is-full {
    background: var(--avail-full-bg);
    color: var(--avail-full-ink);
}

.tk-flow-page .tk-auto-seat-num .form-control {
    width: 100%;
    margin: 0;
}

.tk-flow-page .tk-auto-seat-empty {
    margin: var(--space-12) 0;
    color: var(--text-muted);
}

.tk-flow-page .tk-auto-seat-notice {
    max-height: none;
    margin: 0 0 var(--space-16);
    overflow: visible;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.6;
}

/* 合計と「次へ進む」 */
.tk-auto-seat-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-8);
}

.tk-flow-page .tk-auto-seat-sum {
    margin: 0;
    color: var(--text);
    font-size: 16px;
}

.tk-auto-seat-sum b {
    margin-left: var(--space-4);
    font-size: 22px;
    font-variant-numeric: tabular-nums;
}

.tk-flow-page .tk-auto-seat-summary .tk-auto-seat-next {
    width: 100%;
    max-width: 360px;
    min-height: 52px;
    margin: 0;
}

/* バナーの拡大表示 */
.tk-auto-seat-dialog:not([open]) {
    display: none;
}

.tk-auto-seat-dialog {
    width: fit-content;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-float);
    overflow: auto;
}

.tk-auto-seat-dialog::backdrop {
    background: var(--scrim);
}

.tk-auto-seat-dialog img {
    display: block;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    object-fit: contain;
}

.tk-auto-seat-dialog-close {
    position: absolute;
    top: var(--space-8);
    right: var(--space-8);
    z-index: 1;
    display: grid;
    place-items: center;
    width: var(--control-height);
    height: var(--control-height);
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.tk-auto-seat-dialog-close:focus-visible {
    outline: var(--focus-width) solid var(--action);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .tk-auto-seat-head-text {
        padding: var(--space-12) var(--space-16);
    }

    .tk-flow-page .tk-auto-seat-title {
        font-size: 17px;
    }

    .tk-flow-page .tk-auto-seat-list {
        padding: var(--space-4) var(--space-16);
    }

    .tk-auto-seat-row {
        grid-template-columns: minmax(0, 1fr) 96px;
        gap: var(--space-4) var(--space-12);
    }

    .tk-auto-seat-status {
        grid-row: 2;
        justify-self: start;
    }

    .tk-auto-seat-num {
        grid-row: 1 / span 2;
        grid-column: 2;
    }

    .tk-auto-seat-summary {
        align-items: stretch;
    }

    .tk-flow-page .tk-auto-seat-sum {
        text-align: right;
    }

    .tk-flow-page .tk-auto-seat-summary .tk-auto-seat-next {
        max-width: none;
    }
}
