/* ============================================
   registration.css
   会員登録フロー共通スタイル
   対象: payment_select / credit_login / email_sent /
         credit_card / carrier / complete / complete_email
   ============================================ */

/* ─── 共通フォーム部品 ─── */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #4A90A4;
}

.form-row {
    display: flex;
    gap: 10px;
}

/* 共通ボタン（決済/登録完了等） */
.submit-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4A90A4 0%, #357a8a 100%);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin-top: 20px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #357a8a 0%, #2a6a78 100%);
}

/* グレーアウト状態 */
.submit-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

/* 同意チェックボックスエリア */
.agreement-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.agreement-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.agreement-item:last-child {
    margin-bottom: 0;
}

.agreement-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #4A90A4;
    flex-shrink: 0;
}

.agreement-item label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.agreement-item a {
    color: #4A90A4;
    text-decoration: underline;
    font-weight: 700;
}

.agreement-item a:hover {
    color: #357a8a;
}

/* パスワード入力欄のラッパー */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 48px;
}

/* パスワード表示/非表示トグルボタン */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #4A90A4;
}

.password-toggle .material-icons-round {
    font-size: 22px;
}

/* エラーメッセージ */
.error-message {
    color: #e53935;
    font-size: 13px;
    font-weight: 500;
    margin-left: 10px;
    display: none;
}

.error-message.show {
    display: inline;
}

/* エラー時のインプットスタイル */
.form-input.input-error {
    border-color: #e53935;
}

/* ─── 情報ボックス / ノート ─── */
.info-note {
    background: #f0f7fa;
    border-left: 4px solid #4A90A4;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

.info-box {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 16px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.info-box p {
    margin: 0;
    font-size: 14px;
    color: #2e7d32;
}


/* ============================================
   payment_select.html — 会員登録（プラン＋決済方法選択）
   ============================================ */
.register-container {
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 20px 20px 40px;
}

.register-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin: 30px 0 30px;
    color: #333;
}

/* セクションブロック共通 */
.register-section {
    margin-bottom: 30px;
}

.section-label {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4A90A4;
}

.section-label .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #4A90A4;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    margin-right: 10px;
    flex-shrink: 0;
}

/* プラン選択ラジオボタン */
.plan-select-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-select-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}

.plan-select-item:hover {
    border-color: #b0d0da;
    background: #f8fcfd;
}

.plan-select-item.selected {
    border-color: #4A90A4;
    background: #f0f7fa;
}

.plan-select-item input[type="radio"] {
    display: none;
}

.plan-select-radio {
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.plan-select-item.selected .plan-select-radio {
    border-color: #4A90A4;
}

.plan-select-item.selected .plan-select-radio::after {
    content: '';
    width: 12px;
    height: 12px;
    background: #4A90A4;
    border-radius: 50%;
}

.plan-select-info {
    flex: 1;
}

.plan-select-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.plan-select-price {
    font-size: 14px;
    color: #666;
}

.plan-select-price strong {
    font-size: 18px;
    color: #333;
    font-weight: 700;
}

.plan-select-badge {
    background: linear-gradient(135deg, #4A90A4 0%, #357a8a 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 10px;
}

.plan-detail-link {
    display: block;
    text-align: right;
    margin-top: 8px;
    font-size: 13px;
    color: #4A90A4;
    text-decoration: none;
    cursor: pointer;
}

.plan-detail-link:hover {
    text-decoration: underline;
}

/* 決済方法セクションのサブタイトル */
.payment-sub-desc {
    text-align: center;
    margin-bottom: 16px;
    color: #666;
    font-size: 13px;
}

/* プラン比較モーダル */
.plan-compare-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    justify-content: center;
    align-items: flex-start;
    padding: 30px 10px;
    overflow-y: auto;
}

.plan-compare-modal-overlay.active {
    display: flex;
}

.plan-compare-modal {
    background: #fff;
    border-radius: 16px;
    padding: 30px 20px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    animation: planModalFadeIn 0.3s ease;
    position: relative;
}

@keyframes planModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plan-compare-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-compare-modal-close:hover {
    color: #333;
}

.plan-compare-modal h3 {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 6px 0;
}

.plan-compare-modal p {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin: 0 0 20px 0;
}

/* モーダル内テーブル */
.modal-plan-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-plan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.modal-plan-table thead th {
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.modal-plan-table thead th:first-child {
    text-align: left;
}

.modal-plan-table .col-highlight {
    background: #fffbe6;
    border-left: 2px solid #e6c200;
    border-right: 2px solid #e6c200;
}

.modal-plan-table thead .col-highlight {
    border-top: 2px solid #e6c200;
}

.modal-plan-table tbody tr:last-child .col-highlight {
    border-bottom: 2px solid #e6c200;
}

.modal-plan-table .plan-name {
    font-size: 15px;
    font-weight: 700;
}

.modal-plan-table .plan-price {
    color: #e6a700;
    font-size: 16px;
    font-weight: 700;
}

.modal-plan-table .plan-price span {
    font-size: 12px;
    font-weight: 400;
}

.modal-plan-table .recommend-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e6a700, #d4950a);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 4px;
}

.modal-plan-table tbody td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.modal-plan-table tbody td:first-child {
    text-align: left;
    font-size: 12px;
    color: #555;
}

.modal-plan-table .check {
    color: #4caf50;
    font-size: 18px;
}

.modal-plan-table .cross {
    color: #ccc;
    font-size: 16px;
}

.modal-plan-table .partial {
    color: #999;
    font-size: 11px;
    line-height: 1.4;
}

.plan-compare-close-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background: #f5f5f5;
    color: #666;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.plan-compare-close-btn:hover {
    background: #e8e8e8;
}

/* 無料についてリンク（section-label 内） */
.free-info-link {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    color: #4A90A4;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #4A90A4;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.free-info-link:hover {
    background: #f0f7fa;
}

/* 無料についてモーダル内スタイル */
.free-info-modal h3 {
    margin-bottom: 20px;
}

.free-info-section {
    margin-bottom: 4px;
}

.free-info-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
}

.free-info-body {
    font-size: 13px;
    color: #555;
    line-height: 1.8;
    margin: 0;
    white-space: pre-wrap;
}

.free-info-divider {
    border: none;
    border-top: 1px dashed #d0d0d0;
    margin: 20px 0;
}


/* ============================================
   credit_login.html — お支払い情報入力
   ============================================ */
.payment-container {
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    margin: 40px auto;
    padding: 20px;
}

.payment-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

/* セクション見出し */
.section-heading {
    font-size: 15px;
    font-weight: 700;
    color: #4A90A4;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f4f8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-heading .material-icons-round {
    font-size: 20px;
}

/* セクション区切り */
.section-divider {
    margin: 30px 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}


/* ============================================
   email_sent.html — 確認メール送信
   ============================================ */
.sent-container {
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    margin: 40px auto;
    padding: 20px;
}

.sent-icon {
    text-align: center;
    margin-bottom: 20px;
}

.sent-icon .material-icons-round {
    font-size: 64px;
    color: #4A90A4;
}

.sent-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #333;
}

.sent-message {
    background: #f0f7fa;
    border-left: 4px solid #4A90A4;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
    line-height: 1.8;
    font-size: 14px;
    color: #333;
}

.sent-message p {
    margin: 0 0 12px 0;
}

.sent-message p:last-child {
    margin-bottom: 0;
}

.sent-note {
    background: #fff8e1;
    border-left: 4px solid #ffb300;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 30px;
    font-size: 13px;
    color: #6d4c00;
    line-height: 1.7;
}

.next-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4A90A4 0%, #357a8a 100%);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    box-sizing: border-box;
}

.next-btn:hover {
    background: linear-gradient(135deg, #357a8a 0%, #2a6a78 100%);
}

/* テスト用遷移先リンク欄 */
.test-links {
    margin-top: 40px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 2px dashed #ccc;
}

.test-links-title {
    font-size: 13px;
    font-weight: 700;
    color: #999;
    margin-bottom: 12px;
    text-align: center;
}

.test-link-item {
    display: block;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #4A90A4;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.test-link-item:last-child {
    margin-bottom: 0;
}

.test-link-item:hover {
    background: #f0f7fa;
}

.test-link-item .material-icons-round {
    font-size: 18px;
    vertical-align: middle;
    margin-right: 6px;
}


/* ============================================
   credit_card.html — ログイン情報設定
   ============================================ */
.login-container {
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    margin: 40px auto;
    padding: 20px;
}

.login-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}


/* ============================================
   carrier.html — キャリア決済
   ============================================ */
.carrier-container {
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    margin: 40px auto;
    padding: 20px;
}

.carrier-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

.carrier-option {
    display: block;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    text-decoration: none;
    color: #333;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.carrier-option:hover {
    border-color: #4A90A4;
    background: #f8fcfd;
}

.carrier-docomo {
    color: #c00;
}

.carrier-au {
    color: #f60;
}

.carrier-softbank {
    color: #000;
}


/* ============================================
   complete.html — 登録完了
   ============================================ */
.complete-container {
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    margin: 60px auto;
    padding: 20px;
    text-align: center;
}

.complete-icon {
    font-size: 80px;
    color: #4A90A4;
    margin-bottom: 20px;
}

.complete-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #333;
}

.complete-text {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 40px;
}

.home-btn {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, #4A90A4 0%, #357a8a 100%);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 164, 0.3);
}


/* ============================================
   complete_email.html — キャリア決済完了＋メール登録
   ============================================ */

/* complete_email.html用: コンテナの上書き（complete.htmlとは異なる） */
[data-page="complete_email"] .complete-container {
    margin: 40px auto;
    text-align: left;
}

[data-page="complete_email"] .complete-title {
    font-size: 20px;
    text-align: center;
}

/* complete_email.html用: ラベルをflexにしてエラーメッセージを横並び表示 */
[data-page="complete_email"] .form-label {
    display: flex;
    align-items: center;
}

/* 登録完了モーダル */
.complete-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.complete-modal-overlay.active {
    display: flex;
}

.complete-modal {
    background: #fff;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.complete-modal .modal-icon {
    font-size: 56px;
    color: #4caf50;
    margin-bottom: 16px;
}

.complete-modal h3 {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 24px 0;
}

.complete-modal .modal-go-btn {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, #4A90A4 0%, #357a8a 100%);
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.complete-modal .modal-go-btn:hover {
    background: linear-gradient(135deg, #357a8a 0%, #2a6a78 100%);
}

/* ── レスポンシブ対応 ── */
@media (max-width: 800px) {
    .register-container,
    .payment-container,
    .sent-container,
    .login-container,
    .carrier-container,
    .complete-container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 480px) {
    .register-container,
    .payment-container,
    .sent-container,
    .login-container,
    .carrier-container,
    .complete-container {
        padding-left: 12px;
        padding-right: 12px;
        margin-top: 20px;
    }
}
