/* =================================================================
   History Page Styles (予約履歴ページ専用CSS)
   ================================================================= */

   .history-main .container {
    max-width: 960px;
    margin: 0 auto;
}

.history-main .entry-title {
    text-align: center;
    margin-bottom: 3rem;
}

.reservation-section {
    margin-bottom: 3rem;
}

.reservation-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-blue, #0c99ba);
    padding-bottom: 0.5rem;
}

.no-reservations {
    background: #f9f9f9;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    color: var(--text-gray, #6b7280);
}

.table-responsive {
    overflow-x: auto; /* スマホで表がはみ出す場合、横スクロール可能に */
}

.booking-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden; /* 角丸を効かせるため */
}

.booking-history-table th,
.booking-history-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-gray, #e5e7eb);
    text-align: left;
}

.booking-history-table thead th {
    background-color: #f7fafc;
    font-weight: 600;
    color: var(--text-dark, #333);
}

.booking-history-table tbody tr:last-child td {
    border-bottom: none;
}

.booking-history-table tbody tr:hover {
    background-color: var(--light-blue, #eff6ff);
}

/* 各列の幅を調整 */
.booking-history-table .col-number { width: 6%; }
.booking-history-table .col-reservation-id { width: 10%; }
.booking-history-table .col-date { width: 22%; }
.booking-history-table .col-plan { width: 46%; }
.booking-history-table .col-status { width: 16%; }


.history-toggle-button {
    /* サイトのボタンスタイルを参考に */
    display: inline-block;
    background: var(--primary-blue-lt, #66c2e0);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.history-toggle-button:hover {
    background: var(--primary-blue, #0c99ba);
}


/* レスポンシブ対応（スマホ表示） */
@media (max-width: 768px) {
    .booking-history-table {
        display: block;
        box-shadow: none;
        border-radius: 0;
    }
    .booking-history-table thead {
        display: none; /* aヘッダーを非表示に */
    }
    .booking-history-table tbody,
    .booking-history-table tr,
    .booking-history-table td {
        display: block;
        width: 100%;
    }
    .booking-history-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-gray, #e5e7eb);
        border-radius: 8px;
    }
    .booking-history-table td {
        text-align: right; /* 値を右寄せに */
        padding-left: 50%; /* 左側にラベル用のスペースを確保 */
        position: relative;
        border-bottom: 1px solid #f0f0f0;
    }
    .booking-history-table td:last-child {
        border-bottom: none;
    }
    .booking-history-table td::before {
        content: attr(data-label); /* data-label属性の内容をラベルとして表示 */
        position: absolute;
        left: 1.25rem;
        font-weight: 600;
        color: var(--text-dark, #333);
    }
}

/* 予約履歴のプラン名リンク */
.history-plan-link {
    color: var(--primary-blue, #0c99ba);
    text-decoration: none;
    font-weight: 600;
}
.history-plan-link:hover {
    text-decoration: underline;
}


/* アイコンとラベルのベーススタイル */
.status-icon {
    margin-right: 6px;
    color: #555;
    font-size: 1.2em;
  }
  .status-label {
    color: #333;
  }

  /* ベーススタイル */
.status-icon {
    margin-right: 6px;
    font-size: 1.2em;
    vertical-align: middle;
  }
  .status-label {
    vertical-align: middle;
    font-weight: bold;
  }
  
/* フレックスレイアウトで縦中央揃え＋改行抑制 */
.booking-history-table .status-cell {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }
  
  
  /* ステータス別カラー */
  .status-cell.status-pending .status-icon,
  .status-cell.status-pending .status-label {
    color: #FFC107; /* Amber */
  }
  
  .status-cell.status-approved .status-icon,
  .status-cell.status-approved .status-label {
    color: #28A745; /* Green */
  }
  
  .status-cell.status-canceled .status-icon,
  .status-cell.status-canceled .status-label {
    color: #DC3545; /* Red */
  }
  