/*
 * TabiPark JTB Monitor — 公開ショートコード [tabipark_jtb_availability] 用CSS。
 *
 * v0.3.3：それまでshortcode本文内へ<style>として直接埋め込んでいたが（print_styles_once()、
 * 「一度だけ出力」staticフラグ方式）、WordPress/テーマが同一リクエスト内でshortcodeを複数回
 * 評価した場合に最終出力からCSSが失われる不具合が確認されたため（Availability Hub /
 * Rakuten Monitorと同一の構造上の欠陥）、wp_enqueue_style()によるWordPress標準の
 * 読み込み方式へ変更した。このファイル自体はshortcodeの評価回数に一切依存しない。
 *
 * デザイン値（色・余白・カード等）は、旧inline版から一切変更していない。
 */

.tp-jtb-public { max-width: 100%; color: #1f2d3d; background: #fff; }
.tp-jtb-public, .tp-jtb-public * { box-sizing: border-box; }
.tp-jtb-public a { color: #12689b; }

.tp-jtb-overview-title { margin: 0.2em 0 1em; color: #16283d; }

.tp-jtb-hotel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 680px) {
    .tp-jtb-hotel-grid { grid-template-columns: 1fr; }
}

.tp-jtb-hotel-card {
    background: #fff;
    border: 1px solid #dbe6df;
    border-top: 3px solid #2f8f6b;
    border-radius: 10px;
    padding: 16px 18px;
    min-width: 0;
}
.tp-jtb-hotel-card-name { margin: 0 0 6px; color: #16283d; overflow-wrap: break-word; }
.tp-jtb-hotel-card-count { font-weight: bold; color: #2f8f6b; margin-bottom: 6px; }
.tp-jtb-upcoming { font-size: 0.9em; color: #5c6a63; }

.tp-jtb-hotel-name { margin: 0 0 4px; color: #16283d; overflow-wrap: break-word; }
.tp-jtb-section-label { font-size: 0.85em; color: #7c8894; margin-bottom: 6px; }
.tp-jtb-checked { font-size: 0.9em; color: #6b7785; margin-bottom: 10px; }
.tp-jtb-disclaimer { font-size: 0.85em; color: #6b7785; margin: 0 0 16px; line-height: 1.6; }
.tp-jtb-none-message { margin: 0.6em 0; }

.tp-jtb-day-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.tp-jtb-day-card {
    background: #f6faf8;
    border: 1px solid #dbe6df;
    border-radius: 8px;
    padding: 14px 16px;
    min-width: 0;
}
.tp-jtb-day-date { font-weight: bold; color: #16283d; margin-bottom: 4px; }
.tp-jtb-day-stock { color: #2f8f6b; font-weight: bold; font-size: 0.95em; margin-bottom: 4px; }
.tp-jtb-day-price { font-size: 0.9em; color: #4a5a68; margin-bottom: 10px; }

.tp-jtb-confirm-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: #fff;
    color: #12689b !important;
    border: 1px solid #2f8f6b;
    text-decoration: none !important;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
}
.tp-jtb-confirm-btn:hover { background: #eaf5ef; }

/*
 * v0.3.5：ホテル単独ページの日付アコーディオン。Rakuten Monitor単独ページ
 * （tp-rm-accordion / tp-rm-day-accordion 系）と同じ構造・余白・角丸を採用し、
 * 見た目を統一する。色（緑）はJTBの既存配色（.tp-jtb-hotel-card等）をそのまま使う。
 */
.tp-jtb-accordion { display: flex; flex-direction: column; gap: 10px; }

.tp-jtb-day-accordion {
    border: 1px solid #dbe6df;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}
.tp-jtb-day-accordion[open] { border-color: #2f8f6b; }

.tp-jtb-day-summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
}
.tp-jtb-day-summary::-webkit-details-marker { display: none; }
.tp-jtb-day-summary:hover { background: #f6faf8; }

.tp-jtb-day-summary-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}
.tp-jtb-dot { color: #2e9e3e; margin-right: 4px; font-size: 0.75em; vertical-align: middle; }
.tp-jtb-day-date { font-weight: bold; color: #16283d; }
.tp-jtb-day-price { color: #6b7785; font-size: 0.92em; white-space: nowrap; }

.tp-jtb-day-count {
    display: inline-block;
    background: #e6f3ec;
    color: #2f8f6b;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.88em;
    font-weight: bold;
    white-space: nowrap;
}
.tp-jtb-day-count--pending {
    background: #f1f3f0;
    color: #7c8894;
    font-weight: normal;
}

.tp-jtb-chevron {
    color: #9aa7b2;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.tp-jtb-day-accordion[open] .tp-jtb-chevron { transform: rotate(180deg); }

.tp-jtb-day-body {
    padding: 4px 14px 16px;
    border-top: 1px solid #eef3ee;
}
.tp-jtb-day-placeholder,
.tp-jtb-day-loading { font-size: 0.85em; color: #7c8894; margin: 8px 0; }
.tp-jtb-day-error { font-size: 0.85em; color: #a13f37; margin: 8px 0; }

/*
 * v0.3.5：Plan Monitor取得済みの客室・プラン詳細（Ajax Lazy Load後に挿入される）。
 * Availability Hub v0.3.2のJTBプランカード（.tp-hub-detail-card系）と同じ
 * カード構造・余白を採用する。
 */
.tp-jtb-plan-detail { display: flex; flex-direction: column; gap: 14px; }
.tp-jtb-plan-room { display: flex; flex-direction: column; gap: 8px; }
.tp-jtb-plan-room-name { font-weight: bold; color: #16283d; font-size: 0.95em; overflow-wrap: break-word; }

.tp-jtb-plan-card {
    background: #f6faf8;
    border: 1px solid #dbe6df;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tp-jtb-plan-name {
    font-size: 0.92em;
    color: #16283d;
    overflow-wrap: break-word;
    word-break: break-word;
}
.tp-jtb-plan-bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.tp-jtb-plan-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tp-jtb-plan-price { font-weight: bold; color: #2f8f6b; font-size: 0.98em; }
.tp-jtb-plan-stock { font-size: 0.85em; color: #5c6a63; }

.tp-jtb-plan-btn {
    display: inline-block;
    width: auto;
    min-width: 140px;
    max-width: 180px;
    margin-left: auto;
    text-align: center;
    background: #fff;
    color: #12689b !important;
    border: 1px solid #2f8f6b;
    text-decoration: none !important;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
}
.tp-jtb-plan-btn:hover { background: #eaf5ef; }

.tp-jtb-plan-fallback { padding-top: 4px; }
.tp-jtb-plan-fallback-text { font-size: 0.9em; color: #6b7785; margin: 0 0 10px; }
.tp-jtb-plan-fallback .tp-jtb-plan-btn { margin-left: 0; width: 100%; max-width: none; }

@media (max-width: 480px) {
    .tp-jtb-plan-btn { width: 100%; max-width: none; margin-left: 0; }
    .tp-jtb-plan-bottom { flex-direction: column; align-items: stretch; }
}
