/*
 * TPH Video Access Manager - フロントエンドスタイル
 * Mana Flowデザインシステムに準拠
 * カラー: Deep Ocean Teal (#1B4F5A) / Living Coral (#E8856A) / Sand Ivory (#F5EDD8)
 * v1.2.0: タブUI（ダンス / カルチャーレッスン）追加
 */

/* ─── ベース ────────────────────────────────────────────── */
.tph-va-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: inherit;
}

/* ─── タブナビゲーション ────────────────────────────────── */
.tph-va-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e8dfc8;
    padding-bottom: 0;
}

.tph-va-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 1rem;
    font-weight: 600;
    color: #7a9aa0;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px 8px 0 0;
}

.tph-va-tab:hover {
    color: #1B4F5A;
    background: #f0f8f9;
}

.tph-va-tab.is-active {
    color: #1B4F5A;
    border-bottom-color: #1B4F5A;
    background: transparent;
}

.tph-va-tab-icon {
    font-size: 1.1rem;
}

/* ─── タブパネル ────────────────────────────────────────── */
.tph-va-tab-panel {
    animation: tph-fade-in 0.25s ease;
}

/* ─── セクション説明 ────────────────────────────────────── */
.tph-va-section-desc {
    background: #f9f6ef;
    border-left: 4px solid #1B4F5A;
    padding: 0.875rem 1.25rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.75rem;
}
.tph-va-section-desc p {
    margin: 0;
    font-size: 0.875rem;
    color: #5a7a80;
    line-height: 1.6;
}

/* ─── ログイン必須 ──────────────────────────────────────── */
.tph-va-login-required {
    text-align: center;
    padding: 4rem 2rem;
    background: #f9f6ef;
    border-radius: 16px;
    border: 1px solid #e8dfc8;
}
.tph-va-login-required .tph-va-lock-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.tph-va-login-required h2 {
    color: #1B4F5A;
    margin-bottom: 0.75rem;
}

/* ─── コレクショングリッド ──────────────────────────────── */
.tph-va-collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ─── コレクションカード ────────────────────────────────── */
.tph-va-collection-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(27, 79, 90, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}
.tph-va-collection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(27, 79, 90, 0.15);
}
.tph-va-collection-card.is-locked {
    opacity: 0.85;
}

/* サムネイル */
.tph-va-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1B4F5A;
}
.tph-va-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.tph-va-collection-card:hover .tph-va-card-thumb img {
    transform: scale(1.05);
}
.tph-va-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, #1B4F5A 0%, #2d7a8a 100%);
}

/* カルチャーレッスンのプレースホルダーは別色 */
[data-category="culture"] .tph-va-card-thumb-placeholder {
    background: linear-gradient(135deg, #7a4f3a 0%, #b87a5a 100%);
}

/* ロックオーバーレイ */
.tph-va-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}
.tph-va-lock-overlay .tph-va-lock-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* 動画数バッジ */
.tph-va-video-count {
    position: absolute;
    bottom: 8px;
    right: 10px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* カード情報 */
.tph-va-card-info {
    padding: 1.25rem;
}
.tph-va-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1B4F5A;
    margin: 0 0 0.25rem;
    line-height: 1.4;
}
.tph-va-card-date {
    font-size: 0.8rem;
    color: #7a9aa0;
    margin: 0 0 1rem;
}

/* ロック情報 */
.tph-va-locked-msg {
    font-size: 0.85rem;
    color: #8a7a6a;
    margin: 0 0 0.75rem;
}

/* ─── ボタン ────────────────────────────────────────────── */
.tph-va-btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
}
.tph-va-btn-primary {
    background: #1B4F5A;
    color: #F5EDD8;
}
.tph-va-btn-primary:hover {
    background: #2d7a8a;
    color: #F5EDD8;
    transform: translateY(-1px);
}
.tph-va-btn-purchase {
    background: #E8856A;
    color: #fff;
}
.tph-va-btn-purchase:hover {
    background: #d46e53;
    color: #fff;
    transform: translateY(-1px);
}
.tph-va-btn-ghost {
    background: transparent;
    color: #1B4F5A;
    border: 2px solid #1B4F5A;
}
.tph-va-btn-ghost:hover {
    background: #1B4F5A;
    color: #F5EDD8;
}

/* ─── 動画プレーヤーパネル ──────────────────────────────── */
.tph-va-player-panel {
    animation: tph-fade-in 0.3s ease;
}
@keyframes tph-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tph-va-player-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e8dfc8;
}
.tph-va-back-btn {
    background: none;
    border: none;
    color: #1B4F5A;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.2s;
    white-space: nowrap;
}
.tph-va-back-btn:hover {
    background: #e8f4f6;
}
.tph-va-player-title {
    font-size: 1.4rem;
    color: #1B4F5A;
    margin: 0;
}

/* 動画リスト */
.tph-va-videos-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tph-va-video-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(27, 79, 90, 0.08);
}
.tph-va-video-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}
.tph-va-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.tph-va-video-meta {
    padding: 1rem 1.25rem;
}
.tph-va-video-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1B4F5A;
    margin: 0;
}

/* ─── ローディング ──────────────────────────────────────── */
.tph-va-loading {
    text-align: center;
    padding: 3rem;
    color: #7a9aa0;
    font-size: 1rem;
}
.tph-va-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e8dfc8;
    border-top-color: #1B4F5A;
    border-radius: 50%;
    animation: tph-spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}
@keyframes tph-spin {
    to { transform: rotate(360deg); }
}

/* ─── 購入モーダル ──────────────────────────────────────── */
.tph-va-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    backdrop-filter: blur(4px);
}
.tph-va-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: min(480px, 90vw);
    animation: tph-modal-in 0.3s ease;
}
@keyframes tph-modal-in {
    from { opacity: 0; transform: translate(-50%, -48%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}
.tph-va-modal-inner {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.tph-va-modal-inner h2 {
    color: #1B4F5A;
    margin: 0 0 0.75rem;
}
.tph-va-modal-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1B4F5A;
    background: #f0f8f9;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}
.tph-va-modal-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #E8856A;
    margin: 0.5rem 0;
}
.tph-va-modal-desc {
    font-size: 0.875rem;
    color: #7a9aa0;
    margin-bottom: 1.5rem;
}
.tph-va-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ─── 結果ページ ────────────────────────────────────────── */
.tph-va-result-page {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 480px;
    margin: 0 auto;
}
.tph-va-result-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}
.tph-va-result-page h2 {
    color: #1B4F5A;
    margin-bottom: 1rem;
}
.tph-va-muted {
    color: #7a9aa0;
    font-size: 0.875rem;
}

/* ─── レスポンシブ ──────────────────────────────────────── */
@media (max-width: 640px) {
    .tph-va-tabs {
        gap: 0;
    }
    .tph-va-tab {
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
    }
    .tph-va-collections-grid {
        grid-template-columns: 1fr;
    }
    .tph-va-player-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
