/* ================================================
   plan.css — プラン比較・変更（企画書14-1）
   旧 テストページ/css/style.css のプラン比較テーブル・
   プラン変更モーダル部分を切り出したもの。
   ================================================ */

/* === プラン比較テーブル === */
.plan-comparison-section {
    margin-bottom: 24px;
}

.plan-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.plan-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    table-layout: fixed;
}

.plan-table thead tr {
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2f6 100%);
}

.plan-feature-col {
    width: 40%;
    padding: 16px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    vertical-align: bottom;
    border-bottom: 2px solid var(--border-color);
}

.plan-col {
    width: 20%;
    padding: 14px 8px;
    text-align: center;
    vertical-align: bottom;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

/* Proプランのハイライト列 */
.plan-col-highlight {
    background: linear-gradient(180deg, #fffde7 0%, #fff9c4 100%);
    border-left: 2px solid #f1c40f;
    border-right: 2px solid #f1c40f;
    border-top: 2px solid #f1c40f;
}

.plan-recommend-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f1c40f, #e0a800);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.plan-header-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.plan-header-price {
    font-size: 18px;
    font-weight: 700;
    color: #3ca2e0;
}

.plan-header-price span {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* テーブルボディ */
.plan-feature-cell {
    padding: 14px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    line-height: 1.4;
}

.plan-check-cell {
    padding: 14px 8px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 18px;
}

.plan-cell-highlight {
    background-color: #fffef5;
    border-left: 2px solid #f1c40f;
    border-right: 2px solid #f1c40f;
}

/* 最終行のハイライトセルに下ボーダーを付ける */
.plan-table tbody tr:last-child .plan-cell-highlight {
    border-bottom: 2px solid #f1c40f;
}

.plan-circle {
    color: #27ae60;
    font-weight: 700;
}

.plan-cross {
    color: #ccc;
    font-weight: 400;
}

/* 行のホバー効果 */
.plan-table tbody tr:hover {
    background-color: #f9fbfd;
}

.plan-table tbody tr:hover .plan-cell-highlight {
    background-color: #fffce8;
}

/* === 現在のプラン表示 === */
.current-plan-section {
    margin-bottom: 24px;
}

.current-plan-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 2px;
}

.current-plan-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #3ca2e0;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 10px rgba(60, 162, 224, 0.12);
}

.current-plan-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
}

.current-plan-icon .material-icons-round {
    font-size: 24px;
    color: #3ca2e0;
}

.current-plan-info {
    flex: 1;
}

.current-plan-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.current-plan-detail {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.current-plan-badge {
    background-color: #3ca2e0;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* === プラン変更ボタン === */
.plan-change-section {
    text-align: center;
    margin-bottom: 30px;
}

.plan-change-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: linear-gradient(135deg, #f1c40f, #e0a800);
    color: #333;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(241, 196, 15, 0.3);
}

.plan-change-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(241, 196, 15, 0.4);
    background: linear-gradient(135deg, #f5d442, #e0a800);
}

.plan-change-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(241, 196, 15, 0.3);
}

.plan-change-btn .material-icons-round {
    font-size: 20px;
}

.plan-change-note {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .plan-feature-col {
        width: 35%;
        padding: 12px 8px;
        font-size: 11px;
    }

    .plan-col {
        padding: 10px 4px;
    }

    .plan-header-name {
        font-size: 13px;
    }

    .plan-header-price {
        font-size: 14px;
    }

    .plan-header-price span {
        font-size: 10px;
    }

    .plan-feature-cell {
        padding: 10px 8px;
        font-size: 11px;
    }

    .plan-check-cell {
        padding: 10px 4px;
        font-size: 16px;
    }

    .current-plan-card {
        padding: 12px 14px;
    }

    .current-plan-name {
        font-size: 16px;
    }

    .plan-change-btn {
        padding: 12px 28px;
        font-size: 14px;
    }
}

/* === プラン変更モーダル === */
.plan-modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.plan-modal-overlay.active {
    display: flex;
}

.plan-modal {
    background: #fff;
    border-radius: 16px;
    padding: 30px 24px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    animation: plan-modal-in 0.25s ease-out;
    position: relative;
}

@keyframes plan-modal-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.plan-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.plan-modal-close:hover {
    color: #333;
}

.plan-modal-icon {
    margin-bottom: 8px;
}

.plan-modal-icon .material-icons-round {
    font-size: 40px;
    color: #3ca2e0;
}

.plan-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.plan-modal-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

/* ラジオボタングループ */
.plan-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    text-align: left;
}

.plan-radio-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.plan-radio-item:hover {
    border-color: #b8d8f0;
    background-color: #f8fcff;
}

/* ラジオボタンを隠す */
.plan-radio-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* 選択時のスタイル */
.plan-radio-item:has(input:checked) {
    border-color: #3ca2e0;
    background-color: #f0f8ff;
    box-shadow: 0 2px 8px rgba(60, 162, 224, 0.15);
}

.plan-radio-content {
    flex: 1;
}

.plan-radio-name {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.plan-radio-price {
    font-size: 18px;
    font-weight: 700;
    color: #3ca2e0;
}

.plan-radio-price span {
    font-size: 12px;
    font-weight: 400;
    color: #999;
}

/* カスタムラジオチェックマーク */
.plan-radio-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ccc;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.plan-radio-item:has(input:checked) .plan-radio-check {
    border-color: #3ca2e0;
    background-color: #3ca2e0;
}

.plan-radio-item:has(input:checked) .plan-radio-check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #fff;
}

/* 「現在のプラン」タグ */
.plan-current-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background-color: #3ca2e0;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* 「おすすめ」タグ */
.plan-recommend-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f1c40f, #e0a800);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* 変更ボタン */
.plan-modal-submit {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3ca2e0, #2d8bc7);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.plan-modal-submit:hover {
    background: linear-gradient(135deg, #4ab0ef, #3ca2e0);
    box-shadow: 0 3px 10px rgba(60, 162, 224, 0.3);
}

/* キャンセルボタン */
.plan-modal-cancel {
    display: block;
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    color: #999;
    font-size: 13px;
    cursor: pointer;
}

.plan-modal-cancel:hover {
    color: #666;
}

/* --- 変更予約中・変更不可の案内 --- */
.plan-scheduled-note,
.plan-unavailable-note {
    margin-bottom: 24px;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.7;
}

.plan-scheduled-note {
    background: #fff8e1;
    color: #7a5900;
}

.plan-unavailable-note {
    background: #f5f5f5;
    color: #666;
}

/* 現在のプランは選び直せないので、ラジオごと押せなくする。 */
.plan-radio-item.is-current {
    opacity: 0.6;
    cursor: default;
}

.plan-modal-submit[disabled] {
    opacity: 0.5;
    cursor: default;
}

/* 変更内容の確認文（即時課金／翌月1日適用の別）。 */
.plan-modal-effect {
    margin: 0 0 16px;
    padding: 10px 12px;
    background: #f5f9fc;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.7;
    color: #446;
    text-align: left;
}

/* 一部のみ利用できる機能（Liteの「サマリーまで」）。◯・✕ と字面を揃える。 */
.plan-partial {
    color: #f0a020;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    display: inline-block;
}
