/* portal.css */

/* ページ全体のコンテナ調整 */
.portal-container {
    max-width: 900px; /* 最大幅を設定し、中央に寄せる */
    margin: 40px auto;
    padding: 0 20px;
}

/* セクションカードの基本スタイル */
.section-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.section-card h2 {
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* プレミアムステータス表示 */
#premium-status {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
}

.status-detail {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}

/* プラン管理ボタン */
.portal-button {
    /* main-buttonクラスをベースに調整 */
    display: inline-block;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    color: #fff;
    background-color: #007bff; /* 青色ベース */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
    text-decoration: none;
}

.portal-button:hover {
    background-color: #0056b3;
}

.portal-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}


/* 支払い履歴テーブル */
#payment-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9em;
}

#payment-history-table th,
#payment-history-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

#payment-history-table th {
    background-color: #f8f8f8;
    color: #333;
    font-weight: bold;
}

#payment-history-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

#payment-history-table tr:hover {
    background-color: #f1f1f1;
}

/* ローディング/データなしメッセージ */
#history-loading,
#history-no-data {
    text-align: center;
    color: #666;
    padding: 20px 0;
}

/* portal.css または該当CSSファイルに追加 */

/* 支払い履歴リストのコンテナ */
#history-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px; /* 履歴アイテム間の間隔 */
    margin-top: 15px;
}

/* 個別の履歴アイテム */
.payment-history-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    background-color: #f9f9f9;
    font-size: 0.9em;
}

/* 履歴の行 */
.history-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

/* 日付と種別 (ヘッダー行) */
.history-row.header-row {
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

/* ラベル (金額や適用情報) */
.history-label {
    color: #6c757d;
    font-weight: normal;
    min-width: 80px;
    text-align: left;
}

/* 値 */
.history-value {
    text-align: right;
    font-weight: bold;
}

/* 金額を特に強調する場合 */
.history-value.amount {
    color: #007bff;
}

/* 適用情報行は詳細情報のため、フォントを少し小さく */
.history-row.detail-row {
    font-size: 0.95em;
}

/* 日付と種別のフレックス配置 */
.history-date {
    flex-grow: 1;
    text-align: left;
}
.history-type {
    text-align: right;
}

/* レスポンシブ対応 (画面幅が狭い場合) */
@media (max-width: 600px) {
    .portal-container {
        margin: 20px auto;
        padding: 0 10px;
    }

    /* テーブルのレイアウトをモバイル向けに変更 (必要に応じて) */
    #payment-history-table, 
    #payment-history-table tbody, 
    #payment-history-table td {
        display: block;
    }
    
    #payment-history-table thead {
        display: none; /* ヘッダーを非表示 */
    }

    #payment-history-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    #payment-history-table td::before {
        content: attr(data-label); /* data-label属性を使用してヘッダーをシミュレート */
        position: absolute;
        left: 10px;
        width: calc(50% - 20px);
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #555;
    }
}