/**
 * NS Tour Price Calendar - Frontend Styles
 * Base44風のデザインを採用
 */

/* ==== 年間価格概要 ==== */
.tpc-annual-view {
    max-width: 1000px;
    margin: 0;
    font-family: inherit;
    background: #ffffff;
    padding: 20px;
    color: #1f2937;
}

.tpc-annual-header {
    margin-bottom: 0;
    text-align: center;
}

.tpc-annual-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.tpc-annual-stats {
    font-size: 0.9em;
    color: #6b7280;
}

.tpc-section-title {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #1f2937;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

/* ヒートマップ凡例 */
.tpc-heatmap-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.tpc-heatmap-legend .legend-label {
    color: #1f2937;
    font-weight: 600;
    font-size: 0.9em;
    margin-right: 8px;
}

.tpc-heatmap-legend .legend-item {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ミニカレンダー */
.tpc-mini-calendars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .tpc-mini-calendars {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.tpc-mini-calendar {
    background: #f9fcfd;
    padding: 0 6px 6px 6px;
    border: 1px solid #e2e8f0;
}

.tpc-mini-header {
    text-align: center;
    margin-bottom: 0;
}

.tpc-mini-month {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9em;
}

.tpc-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.tpc-mini-weekday {
    font-size: 0.7em;
    text-align: center;
    color: #718096;
    font-weight: 600;
    padding: 2px;
}

.tpc-mini-day {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    border-radius: 2px;
    color: #6b7280;
    cursor: help;
    background: #f9fafb;
}

.tpc-mini-day.tpc-mini-empty {
    background: transparent;
}

.tpc-mini-day.has-price .day-number {
    font-size: 12px;
    font-weight: normal;
    color: #333;
}

.tpc-mini-day.tpc-today {
    box-shadow: 0 0 0 2px #3182ce;
}

.tpc-mini-day.tpc-weekend {
    opacity: 0.9;
}

.tpc-mini-stats {
    color: #6b7280;
    font-size: 0.8em;
    margin-left: 8px;
}

/* シーズン料金表 */
.tpc-season-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.tpc-season-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.tpc-season-table th {
    background: #f7fafc;
    color: #4a5568;
    font-weight: 600;
    padding: 6px 12px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.tpc-season-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    font-size: 12px;
}

.tpc-season-table tr:last-child td {
    border-bottom: none;
}

/* 価格表用のCSSカスタムプロパティ（ブルー系グラデーション） */
:root {
    --ns-pricetable-color-0: #e3f2fd;
    --ns-pricetable-color-1: #bbdefb;
    --ns-pricetable-color-2: #90caf9;
    --ns-pricetable-color-3: #64b5f6;
    --ns-pricetable-color-4: #42a5f5;
    --ns-pricetable-color-5: #2196f3;
    --ns-pricetable-color-6: #1e88e5;
    --ns-pricetable-color-7: #1976d2;
    --ns-pricetable-color-8: #1565c0;
    --ns-pricetable-color-9: #0d47a1;
}

/* 価格ベースヒートマップクラス */
.tpc-season-table tr.hp-pricetable-0 {
    background: var(--ns-pricetable-color-0);
    color: #333;
}
.tpc-season-table tr.hp-pricetable-1 {
    background: var(--ns-pricetable-color-1);
    color: #333;
}
.tpc-season-table tr.hp-pricetable-2 {
    background: var(--ns-pricetable-color-2);
    color: #333;
}
.tpc-season-table tr.hp-pricetable-3 {
    background: var(--ns-pricetable-color-3);
    color: #fff;
}
.tpc-season-table tr.hp-pricetable-4 {
    background: var(--ns-pricetable-color-4);
    color: #fff;
}
.tpc-season-table tr.hp-pricetable-5 {
    background: var(--ns-pricetable-color-5);
    color: #fff;
}
.tpc-season-table tr.hp-pricetable-6 {
    background: var(--ns-pricetable-color-6);
    color: #fff;
}
.tpc-season-table tr.hp-pricetable-7 {
    background: var(--ns-pricetable-color-7);
    color: #fff;
}
.tpc-season-table tr.hp-pricetable-8 {
    background: var(--ns-pricetable-color-8);
    color: #fff;
}
.tpc-season-table tr.hp-pricetable-9 {
    background: var(--ns-pricetable-color-9);
    color: #fff;
}

/* フォールバック: 価格クラスなしまたは価格なしの行 */
.tpc-season-table tr:not([class*="hp-pricetable-"]):not([class*="hp-"]) {
    background: #f8f9fa;
    color: #6c757d;
}

.tpc-season-chip {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.tpc-season-label {
    font-weight: 600;
    color: #1f2937;
}

.tpc-season-periods {
    color: #6b7280;
    font-family: 'Courier New', monospace;
}

.tpc-season-price {
    font-weight: 600;
    color: #1f2937;
    text-align: right;
}

/* 年間ビューのシーズン色（凡例と同一色を使用） */
.tpc-annual-view .hp-0 { background-color: var(--hp-0); color: #ffffff; }
.tpc-annual-view .hp-1 { background-color: var(--hp-1); color: #ffffff; }
.tpc-annual-view .hp-2 { background-color: var(--hp-2); color: #ffffff; }
.tpc-annual-view .hp-3 { background-color: var(--hp-3); color: #ffffff; }
.tpc-annual-view .hp-4 { background-color: var(--hp-4); color: #ffffff; }
.tpc-annual-view .hp-5 { background-color: var(--hp-5); color: #000000; }
.tpc-annual-view .hp-6 { background-color: var(--hp-6); color: #000000; }
.tpc-annual-view .hp-7 { background-color: var(--hp-7); color: #000000; }
.tpc-annual-view .hp-8 { background-color: var(--hp-8); color: #ffffff; }
.tpc-annual-view .hp-9 { background-color: var(--hp-9); color: #ffffff; }
.tpc-annual-view .hp-10 { background-color: var(--hp-10); color: #ffffff; }

/* Season Table HP Classes */
.tpc-season-table .hp-0 { background-color: var(--hp-0); color: #ffffff; }
.tpc-season-table .hp-1 { background-color: var(--hp-1); color: #ffffff; }
.tpc-season-table .hp-2 { background-color: var(--hp-2); color: #ffffff; }
.tpc-season-table .hp-3 { background-color: var(--hp-3); color: #ffffff; }
.tpc-season-table .hp-4 { background-color: var(--hp-4); color: #ffffff; }
.tpc-season-table .hp-5 { background-color: var(--hp-5); color: #000000; }
.tpc-season-table .hp-6 { background-color: var(--hp-6); color: #000000; }
.tpc-season-table .hp-7 { background-color: var(--hp-7); color: #000000; }
.tpc-season-table .hp-8 { background-color: var(--hp-8); color: #ffffff; }
.tpc-season-table .hp-9 { background-color: var(--hp-9); color: #ffffff; }
.tpc-season-table .hp-10 { background-color: var(--hp-10); color: #ffffff; }

/* 年間ビューの価格ある日は白テキスト */
.tpc-annual-view .calendar-day.has-price .day-number { 
    color: #fff; 
}

/* 年間ビュー内の.day-number */
.tpc-annual-view .day-number {
    font-size: 12px;
    font-weight: normal;
    color: #666;
}

/* 年間ビュー内の.tpc-mini-day */
.tpc-annual-view .tpc-mini-day {
    width: 100%;
}

/* 年間ビューのシーズン料金テーブル */
.tpc-annual-view .tpc-season-table th, 
.tpc-annual-view .tpc-season-table td { 
    color: #1f2937; 
}

/* ==== 予約パネル ==== */
.tpc-booking-panel {
    max-width: 320px;
    margin: 20px 0 20px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
    font-family: inherit;
}

/* 出発日エリア */
.tpc-booking-date {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.tpc-booking-date__label {
    font-size: 14px;
    color: #718096;
    margin-bottom: 4px;
}

.tpc-booking-date__value {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.tpc-booking-date__season {
    font-size: 12px;
    color: #4a5568;
}

/* 期間タブ */
.tpc-duration-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: #f7fafc;
    border-radius: 8px;
    padding: 4px;
}

.tpc-duration-tab {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 6px;
    font-size: 14px;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tpc-duration-tab:hover {
    background: #e6f3ff;
    color: #2b6cb0;
    border-color: #3182ce;
}

.tpc-duration-tab.is-active {
    background: #4299e1;
    color: #ffffff;
    font-weight: 500;
}

/* 参加人数エリア */
.tpc-booking-group {
    margin-bottom: 20px;
}

.tpc-booking-group label {
    display: block;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 0;
    font-weight: 500;
}

.tpc-booking-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    color: #1a202c;
    background: #ffffff;
}

.tpc-booking-group select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* オプションエリア */
.tpc-booking-options {
    margin-bottom: 24px;
}

.tpc-booking-options__label {
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 12px;
    font-weight: 500;
}

.tpc-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4a5568;
    cursor: pointer;
}

.tpc-option input[type="checkbox"] {
    margin: 0;
}

/* 見積エリア */
.tpc-quote {
    margin-bottom: 20px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.tpc-quote__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    font-size: 14px;
}

.tpc-quote__row:last-of-type {
    margin-bottom: 0;
}

.tpc-quote__row span {
    color: #4a5568;
}

.tpc-quote__row strong {
    color: #1a202c;
    font-weight: 600;
}

.tpc-quote__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 2px solid #4299e1;
    font-size: 16px;
    font-weight: 600;
}

.tpc-quote__total span {
    color: #2d3748;
}

.tpc-quote__total strong {
    color: #4299e1;
    font-size: 18px;
}

.tpc-quote__note {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #718096;
    line-height: 1.4;
}

/* 申込ボタン */
.tpc-submit {
    width: 100%;
    padding: 12px 16px;
    background: #4299e1;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tpc-submit:hover:not(:disabled) {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.tpc-submit:disabled {
    background: #cbd5e0;
    color: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 年カレンダー非インタラクティブ化 */
.tpc-annual-view .tpc-mini-day {
    pointer-events: none;
    cursor: default;
}

.tpc-annual-view .tpc-mini-day:hover {
    transform: none;
    box-shadow: none;
}

/* デフォルトシーズン色 */
.season-A { background-color: #4CAF50; }
.season-B { background-color: #E91E63; }
.season-C { background-color: #FF9800; }
.season-D { background-color: #2196F3; }
.season-E { background-color: #9C27B0; }
.season-F { background-color: #795548; }

/* ==== 予約プレビューフォーム ==== */
.tpc-booking-preview {
    max-width: 800px;
    margin: 20px 0;
    font-family: inherit;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tpc-booking-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    text-align: center;
}

.tpc-booking-title {
    margin: 0 0 8px 0;
    font-size: 1.6em;
    font-weight: 600;
}

.tpc-booking-subtitle {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.9;
}

.tpc-booking-form {
    padding: 20px 30px;
}

.tpc-booking-section {
    margin-bottom: 30px;
}

.tpc-booking-section:last-child {
    margin-bottom: 0;
}

.tpc-section-title {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

/* 選択済み情報 */
.tpc-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.tpc-info-item {
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #4299e1;
}

.tpc-info-item label {
    display: block;
    font-size: 0.9em;
    color: #718096;
    margin-bottom: 5px;
    font-weight: 600;
}

.tpc-info-value {
    font-size: 1.1em;
    color: #2d3748;
}

.tpc-weekday {
    color: #718096;
    font-size: 0.9em;
    margin-left: 8px;
}

.tpc-season-badge {
    display: inline-block;
    background: #4299e1;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

/* 日数タブ */
.tpc-duration-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tpc-duration-tab-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 20px;
    background: white;
    transition: all 0.2s ease;
}

.tpc-duration-tab-radio input[type="radio"] {
    display: none;
}

.tpc-duration-tab-radio.active {
    background: #4299e1;
    border-color: #4299e1;
    color: white;
}

.tpc-duration-tab-radio:hover {
    border-color: #4299e1;
    background: #f7fafc;
}

.tpc-duration-tab-radio.active:hover {
    background: #3182ce;
}

.tpc-tab-text {
    font-weight: 600;
    font-size: 0.95em;
}

/* 出発地選択 */
.tpc-departure-select {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    color: #2d3748;
}

.tpc-departure-select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* 人数コントロール */
.tpc-pax-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tpc-pax-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tpc-pax-btn:hover {
    border-color: #4299e1;
    background: #f7fafc;
}

.tpc-pax-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tpc-pax-input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
}

.tpc-pax-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.tpc-pax-unit {
    color: #718096;
    font-weight: 600;
    margin-left: 4px;
}

.tpc-pax-notice {
    margin: 10px 0 0 0;
    color: #e53e3e;
}

/* オプション */
.tpc-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tpc-option-item {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    background: white;
    transition: all 0.2s ease;
}

.tpc-option-item:hover {
    border-color: #4299e1;
    background: #f7fafc;
}

.tpc-option-item input[type="checkbox"] {
    margin: 2px 12px 0 0;
    transform: scale(1.2);
}

.tpc-option-info {
    flex: 1;
}

.tpc-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.tpc-option-label {
    font-weight: 600;
    color: #2d3748;
}

.tpc-option-price {
    color: #4299e1;
    font-weight: 600;
    font-size: 0.95em;
}

.tpc-option-description {
    margin: 0;
    color: #718096;
    font-size: 0.9em;
}

/* 料金表示 */
.tpc-pricing-breakdown {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.tpc-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.tpc-price-row:last-child {
    border-bottom: none;
}

.tpc-total-row {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #4299e1;
    font-size: 1.1em;
    font-weight: 700;
}

.tpc-price-label {
    color: #4a5568;
    font-weight: 600;
}

.tpc-price-label small {
    color: #718096;
    font-weight: 400;
    margin-left: 8px;
}

.tpc-price-value {
    color: #2d3748;
    font-weight: 600;
}

.tpc-total-price {
    color: #4299e1;
    font-size: 1.2em;
    font-weight: 700;
}

.tpc-pricing-note {
    margin: 15px 0 0 0;
    color: #718096;
    text-align: center;
}

/* 申込ボタン */
.tpc-submit-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.tpc-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.tpc-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.tpc-submit-arrow {
    transition: transform 0.2s ease;
}

.tpc-submit-btn:hover .tpc-submit-arrow {
    transform: translateX(4px);
}

.tpc-submit-note {
    margin: 15px 0 0 0;
    color: #718096;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .tpc-booking-preview {
        margin: 10px;
    }

    .tpc-booking-header,
    .tpc-booking-form {
        padding: 20px;
    }

    .tpc-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tpc-duration-tabs {
        flex-direction: column;
    }

    .tpc-duration-tab {
        justify-content: center;
    }

    .tpc-pax-controls {
        justify-content: center;
    }

    .tpc-option-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .tpc-price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .tpc-total-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* ==== カレンダー全体 ==== */
.ns-tour-price-calendar {
    max-width: 800px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
}

/* エラー表示 */
.ns-tour-price-calendar.error {
    padding: 20px;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
}

.ns-tour-price-calendar .error-message h3 {
    margin-top: 0;
    color: #c53030;
}

.ns-tour-price-calendar .error-message details {
    margin-top: 15px;
}

.ns-tour-price-calendar .error-message summary {
    cursor: pointer;
    font-weight: 600;
    color: #2d3748;
}

.ns-tour-price-calendar .error-message ul {
    margin-top: 10px;
    padding-left: 20px;
}

.ns-tour-price-calendar .error-message li {
    margin-bottom: 5px;
    color: #4a5568;
}

/* ==== ヘッダー ==== */
.calendar-header {
    
    background-color: #4a9f64;
    color: white;
    padding: 20px 24px;
    text-align: center;
}

.calendar-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.calendar-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.calendar-meta {
    font-size: 14px;
    opacity: 0.9;
}

.tour-id {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* ==== カレンダーグリッド ==== */
.calendar-grid {
    padding: 0;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.weekday-header {
    padding: 10px 6px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-weeks {
    background: white;
}

.calendar-week {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1px;
}

.calendar-week:last-child {
    border-bottom: none;
}

/* ==== 日付セル ==== */
.calendar-day {
    min-height: 50px;
    border-right: 1px solid #e2e8f0;
    position: relative;
    transition: all 0.2s ease;
    cursor: default;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day.empty {
    background: #fff;
}

.calendar-day.hidden {
    opacity: 0.3;
    background: #f9fafb;
}

.calendar-day.today {
    background: #ebf8ff;
    box-shadow: inset 0 0 0 2px #3182ce;
}

.calendar-day.weekend {
    background: #fefefe;
}

.calendar-day.no-price {
    background: #f7fafc;
    color: #a0aec0;
}

/* 日付セルのコンテンツ */
.day-content {
    padding: 12px 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    position: relative;
}

.day-number {
    font-size: 14px;
    font-weight: 600;
    color: #e9ebee;
    margin-bottom: 4px;
    line-height: 1;
}

.day-price {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    word-break: break-all;
    /* margin-top: auto; */
}

.day-price.no-data {
    color: #a0aec0;
    font-size: 10px;
    font-style: italic;
}

/* 催行確定バッジ */
.confirmed-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #48bb78;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    z-index: 10;
}

/* ==== ヒートマップ色 (知覚均等Turboパレット) ==== */
:root {
    --hp-0: #2d4f8e;
    --hp-1: #336dbd;
    --hp-2: #3a89d1;
    --hp-3: #49a5d1;
    --hp-4: #64c0bf;
    --hp-5: #8bd18f;
    --hp-6: #c4dd5e;
    --hp-7: #f2c03f;
    --hp-8: #f28f32;
    --hp-9: #e34a33;
    --hp-10: #d32f2f;
}

.ns-tour-price-calendar .hp-0 {
    background-color: var(--hp-0);
    color: #ffffff;
}

.ns-tour-price-calendar .hp-1 {
    background-color: var(--hp-1);
    color: #ffffff;
}

.ns-tour-price-calendar .hp-2 {
    background-color: var(--hp-2);
    color: #ffffff;
}

.ns-tour-price-calendar .hp-3 {
    background-color: var(--hp-3);
    color: #ffffff;
}

.ns-tour-price-calendar .hp-4 {
    background-color: var(--hp-4);
    color: #ffffff;
}

.ns-tour-price-calendar .hp-5 {
    background-color: var(--hp-5);
    color: #000000;
}

.ns-tour-price-calendar .hp-6 {
    background-color: var(--hp-6);
    color: #000000;
}

.ns-tour-price-calendar .hp-7 {
    background-color: var(--hp-7);
    color: #000000;
}

.ns-tour-price-calendar .hp-8 {
    background-color: var(--hp-8);
    color: #ffffff;
}

.ns-tour-price-calendar .hp-9 {
    background-color: var(--hp-9);
    color: #ffffff;
}

.ns-tour-price-calendar .hp-10 {
    background-color: var(--hp-10);
    color: #ffffff;
}

/* 汎用 hp-* クラス（凡例・表等で使用） */
.hp-0 { background-color: var(--hp-0); color: #ffffff; }
.hp-1 { background-color: var(--hp-1); color: #ffffff; }
.hp-2 { background-color: var(--hp-2); color: #ffffff; }
.hp-3 { background-color: var(--hp-3); color: #ffffff; }
.hp-4 { background-color: var(--hp-4); color: #ffffff; }
.hp-5 { background-color: var(--hp-5); color: #000000; }
.hp-6 { background-color: var(--hp-6); color: #000000; }
.hp-7 { background-color: var(--hp-7); color: #000000; }
.hp-8 { background-color: var(--hp-8); color: #ffffff; }
.hp-9 { background-color: var(--hp-9); color: #ffffff; }
.hp-10 { background-color: var(--hp-10); color: #ffffff; }

/* ヒートマップセルのホバー効果 */
.calendar-day.has-price:hover {
    /*transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;*/
    box-sizing: border-box;
    border: 5px #a7e14a solid;
}

/* ==== 凡例 ==== */
.calendar-legend {
    padding: 20px 24px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

.calendar-legend h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #4a5568;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.legend-label {
    font-weight: 500;
    white-space: nowrap;
}

/* ==== レスポンシブデザイン ==== */
@media (max-width: 768px) {
    .ns-tour-price-calendar {
        margin: 10px 0;
        border-radius: 8px;
    }
    
    .calendar-header {
        padding: 16px 20px;
    }
    
    .calendar-title-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .calendar-title {
        font-size: 20px;
        text-align: center;
    }
    
    .tpc-nav__btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .calendar-day {
        min-height: 60px;
    }
    
    .day-content {
        padding: 8px 4px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .day-price {
        font-size: 16px;
    }
    
    .weekday-header {
        padding: 12px 4px;
        font-size: 12px;
    }
    
    .legend-items {
        gap: 8px;
    }
    
    .legend-item {
        font-size: 11px;
    }
    
    .legend-color {
        width: 16px;
        height: 16px;
    }
    
    .tpc-alert {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .calendar-title {
        font-size: 18px;
    }
    
    .calendar-day {
        min-height: 50px;
    }
    
    .day-content {
        padding: 6px 2px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .day-price {
        font-size: 9px;
    }
    
    .confirmed-badge {
        width: 14px;
        height: 14px;
        font-size: 8px;
    }
    
    .weekday-header {
        padding: 10px 2px;
        font-size: 11px;
    }
}

/* ==== プレビュー表示用 ==== */
.ns-tour-price-calendar.preview {
    max-width: 400px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.ns-tour-price-calendar.preview .calendar-header {
    padding: 12px 16px;
}

.ns-tour-price-calendar.preview .calendar-title {
    font-size: 16px;
}

.ns-tour-price-calendar.preview .calendar-day {
    min-height: 50px;
}

.ns-tour-price-calendar.preview .day-content {
    padding: 6px 4px;
}

.preview-more {
    text-align: center;
    padding: 8px;
    color: #a0aec0;
    font-size: 14px;
    font-weight: 500;
}

/* ==== アクセシビリティ ==== */
@media (prefers-reduced-motion: reduce) {
    .calendar-day {
        transition: none;
    }
    
    .calendar-day.has-price:hover {
        transform: none;
    }
}

.calendar-day:focus {
    outline: 2px solid #3182ce;
    outline-offset: -2px;
}

/* ==== 月送りナビゲーション ==== */
.tpc-nav {
    display: flex;
    gap: 8px;
}

.tpc-nav__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 16px;
    line-height: 1;
}

.tpc-nav__btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.tpc-nav__btn:active {
    transform: translateY(0);
}

.tpc-nav__arrow {
    font-size: 14px;
    font-weight: bold;
}

/* ==== 警告表示 ==== */
.tpc-alert {
    padding: 12px 20px;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    border-left: 4px solid;
}

.tpc-alert--warn {
    background: #fffbf0;
    border-color: #f6ad55;
    color: #744210;
}

/* 印刷用スタイル */
@media print {
    .ns-tour-price-calendar {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
    
    .calendar-header {
        background: #f7fafc !important;
        color: #2d3748 !important;
    }
    
    .calendar-day.has-price:hover {
        transform: none;
        box-shadow: none;
    }
    
    .tpc-nav,
    .tpc-duration-tabs {
        display: none;
    }
}

/* ==== Duration タブ ==== */
.tpc-duration-tabs {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.tpc-duration-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    transition: all 0.2s ease;
    min-width: 44px;
    white-space: nowrap;
}

/* 期間別の背景色設定 */
.tpc-duration-tab[data-duration="4"] {
    background: #f58195;
    border-color: #f58195;
}

.tpc-duration-tab[data-duration="5"] {
    background: #2cb1b1;
    border-color: #2cb1b1;
}

.tpc-duration-tab[data-duration="6"] {
    background: #b09221;
    border-color: #b09221;
}

.tpc-duration-tab[data-duration="7"] {
    background: #29aa29;
    border-color: #29aa29;
}

.tpc-duration-tab[data-duration="8"] {
    background: #d62a20;
    border-color: #d62a20;
}

/* ホバー時は20%薄い色 */
.tpc-duration-tab[data-duration="4"]:hover {
    background: #f7a1b1;
    border-color: #f7a1b1;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.tpc-duration-tab[data-duration="5"]:hover {
    background: #4dbbbb;
    border-color: #4dbbbb;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.tpc-duration-tab[data-duration="6"]:hover {
    background: #c4a644;
    border-color: #c4a644;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.tpc-duration-tab[data-duration="7"]:hover {
    background: #4bb84b;
    border-color: #4bb84b;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.tpc-duration-tab[data-duration="8"]:hover {
    background: #dd5246;
    border-color: #dd5246;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.tpc-duration-tab:active {
    transform: translateY(0);
}

.tpc-duration-tab.is-active {
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tpc-duration-tab.is-active:hover {
    transform: none;
}

/* フォーカス表示 */
.tpc-duration-tab:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .tpc-duration-tabs {
        gap: 4px;
        margin-top: 10px;
    }
    
    .tpc-duration-tab {
        padding: 5px 10px;
        font-size: 13px;
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .tpc-duration-tabs {
        gap: 3px;
        margin-top: 8px;
    }
    
    .tpc-duration-tab {
        padding: 4px 8px;
        font-size: 12px;
        min-width: 36px;
    }
}

/* ============================================
   年間価格概要（Annual View）
============================================ */

/* 年間ビュートグル */
.tpc-annual-toggle {
    margin: 15px 0 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.tpc-annual-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.tpc-annual-toggle input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
}

/* 年間ビューコンテナ */
.tpc-annual-root {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.tpc-annual-view {
    color: #1f2937;
}

/* 年間ビューヘッダー */


.tpc-annual-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1f2937;
}

.tpc-annual-stats {
    font-size: 14px;
    color: #6b7280;
}

/* セクションタイトル */
.tpc-section-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 15px;
    color: #333;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

/* ============================================
   12ヶ月ミニカレンダー
============================================ */

.tpc-annual-calendars {
    margin-bottom: 30px;
}



.tpc-mini-header {
    text-align: center;
    margin-bottom: 0;
}

.tpc-mini-month {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.tpc-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    font-size: 11px;
}

.tpc-mini-weekday {
    padding: 2px;
    text-align: center;
    font-size: 10px;
    color: #444;
    background: #eee;
}

.tpc-mini-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    position: relative;
}

.tpc-mini-day.tpc-mini-empty {
    background: transparent;
}

.tpc-mini-day.tpc-has-season {
    color: #fff;
    font-weight: 500;
}

.tpc-mini-day.tpc-today {
    border: 2px solid rgba(255, 255, 255, 0.8);
    font-weight: bold;
}

.tpc-mini-day:hover {
    transform: scale(1.1);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.5);
}


.tpc-mini-day.has-season .day-number {
    color:#333;
}


/* ============================================
   シーズン料金表
============================================ */

.tpc-annual-seasons {
    margin-top: 25px;
}

.tpc-season-table-container {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.tpc-season-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
}



.tpc-season-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.tpc-season-table td {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.tpc-season-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* シーズンチップ */
.tpc-season-chip {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.tpc-season-label {
    vertical-align: middle;
}

.tpc-season-periods {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.tpc-season-price {
    font-weight: 600;
    text-align: right;
}

/* エラー表示 */
.tpc-annual-error {
    padding: 15px;
    text-align: center;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 6px;
    font-size: 14px;
}

/* ============================================
   レスポンシブ対応（年間ビュー）
============================================ */

@media (max-width: 768px) {
    .tpc-annual-root {
        padding: 15px;
        margin-top: 15px;
    }
    
    .tpc-annual-title {
        font-size: 18px;
    }
    
    .tpc-mini-calendars {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .tpc-mini-calendar {
        padding: 8px;
    }
    
    .tpc-season-table th,
    .tpc-season-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .tpc-annual-root {
        padding: 12px;
        margin-top: 12px;
    }
    
    .tpc-annual-title {
        font-size: 16px;
    }
    
    .tpc-mini-calendars {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .tpc-mini-calendar {
        padding: 6px;
    }
    
    .tpc-mini-grid {
        font-size: 10px;
        gap: 0.5px;
    }
    
    .tpc-mini-day {
        font-size: 9px;
    }
    
    /* シーズン表をカード表示に変更 */
    .tpc-season-table-container {
        display: none;
    }
    
    .tpc-annual-seasons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .tpc-section-title {
        grid-column: 1 / -1;
    }
    
    .tpc-season-card {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        padding: 12px;
    }
    
    .tpc-season-card-header {
        display: flex;
        align-items: center;
        margin-bottom: 0;
    }
    
    .tpc-season-card-periods {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.7);
        margin-bottom: 4px;
    }
    
    .tpc-season-card-price {
        font-size: 14px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.9);
    }
}


.tpc-booking-container {
      display: flex;
      gap: 20px;
      align-items: flex-start;
      max-width: 1400px;
      margin: 0 auto;
  }

  .ns-tour-price-calendar {
      flex: 1;
      min-width: 800px;
  }

  .tpc-booking-panel {
      flex-shrink: 0;
      width: 320px;
  }

  @media (max-width: 1200px) {
      .tpc-booking-container {
          max-width: 1200px;
      }
      
      .ns-tour-price-calendar {
          min-width: 600px;
      }
  }

  @media (max-width: 768px) {
      .tpc-booking-container {
          flex-direction: column;
          gap: 15px;
          margin: 10px;
      }
      
      .ns-tour-price-calendar {
          min-width: unset;
      }
      
      .tpc-booking-panel {
          width: 100%;
          max-width: none;
      }
  }