/* ============================
   case-application.css
   申し込みフォーム スタイル
   最小フォントサイズ: 1rem
   ============================ */

.ca-wrap {
    max-width: 100%;
    margin: 2.5rem 0;
    font-size: 1rem;
}

/* ===== プログレスバー ===== */
.ca-progress {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 0;
}
.ca-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    position: relative;
}
.ca-progress-step::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: #e5e7eb;
    z-index: 0;
    transition: background .3s;
}
.ca-progress-step:last-child::after {
    display: none;
}
.ca-progress-step.active::after,
.ca-progress-step.done::after {
    background: #2563eb;
}
.ca-progress-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: background .3s, color .3s;
    border: 3px solid #e5e7eb;
}
.ca-progress-step.active .ca-progress-dot {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.ca-progress-step.done .ca-progress-dot {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.ca-progress-label {
    font-size: 1rem;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
    transition: color .3s;
}
.ca-progress-step.active .ca-progress-label {
    color: #2563eb;
    font-weight: 700;
}
.ca-progress-step.done .ca-progress-label {
    color: #2563eb;
}

/* ===== ログイン中メモ ===== */
.ca-logged-in-note {
    font-size: 1rem;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 1.5rem;
}

/* ===== ステップタイトル ===== */
.ca-step-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #2563eb;
    color: #111;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ca-step-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 1.4em;
    background: #2563eb;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ===== フィールド共通 ===== */
.ca-field {
    margin-bottom: 1.5rem;
    width: 100%;
}
.ca-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}
.ca-req {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    background: #fee2e2;
    color: #b91c1c;
    padding: 1px 8px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}
.ca-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    color: #111;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    display: block;
}
.ca-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}
.ca-input[readonly] {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}
select.ca-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

/* ===== ラジオ・チェックボックス ===== */
.ca-radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}
.ca-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #374151;
    cursor: pointer;
    padding: 12px 20px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color .15s, background .15s;
    flex: 1;
    justify-content: center;
}
.ca-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #374151;
    cursor: pointer;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color .15s, background .15s;
}
.ca-radio-label:hover,
.ca-checkbox-label:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}
.ca-checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
}

/* ===== 免責スクロールボックス ===== */
.ca-disclaimer-scroll-wrap {
    position: relative;
    margin-bottom: 1.25rem;
    width: 100%;
}
.ca-disclaimer-scroll {
    height: 220px;
    overflow-y: scroll;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
    background: #f9fafb;
    width: 100%;
    box-sizing: border-box;
}
.ca-disclaimer-scroll p {
    margin-bottom: 1rem;
}
.ca-scroll-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(249,250,251,.98));
    padding: 32px 16px 12px;
    text-align: center;
    font-size: 1rem;
    color: #6b7280;
    border-radius: 0 0 10px 10px;
    pointer-events: none;
    transition: opacity .3s;
}
.ca-scroll-overlay.hidden {
    opacity: 0;
}
.ca-agree-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    cursor: pointer;
    padding: 14px 18px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    transition: background .15s, border-color .15s;
    width: 100%;
    box-sizing: border-box;
}
.ca-agree-label:hover:not(.ca-agree-disabled) {
    background: #f0fdf4;
    border-color: #16a34a;
}
.ca-agree-label.ca-agree-disabled {
    opacity: .5;
    cursor: not-allowed;
}
.ca-agree-label input[type=checkbox] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: #16a34a;
}

/* ===== 確認画面 ===== */
.ca-confirm-table {
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    width: 100%;
}
.ca-confirm-row {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    font-size: 1rem;
}
.ca-confirm-row:last-child {
    border-bottom: none;
}
.ca-confirm-label {
    width: 150px;
    flex-shrink: 0;
    padding: 12px 14px;
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    font-size: 1rem;
}
.ca-confirm-value {
    padding: 12px 14px;
    color: #111;
    word-break: break-all;
    font-size: 1rem;
    flex: 1;
}
.ca-agreed-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #15803d;
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 99px;
    margin-bottom: 1.5rem;
}

/* ===== ボタン ===== */
.ca-btn-row {
    display: flex;
    gap: 12px;
    width: 100%;
}
.ca-btn-primary {
    flex: 1;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    letter-spacing: .03em;
    width: 100%;
}
.ca-btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
}
.ca-btn-primary:active:not(:disabled) {
    transform: scale(.98);
}
.ca-btn-primary:disabled {
    background: #bfdbfe;
    cursor: not-allowed;
}
.ca-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.ca-btn-secondary:hover {
    background: #f9fafb;
}
.ca-btn-submit {
    background: #16a34a;
}
.ca-btn-submit:hover:not(:disabled) {
    background: #15803d;
}
.ca-submit-note {
    font-size: 1rem;
    color: #9ca3af;
    text-align: center;
    margin-top: 10px;
}

/* ===== エラー ===== */
.ca-error {
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    color: #b91c1c;
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    width: 100%;
    box-sizing: border-box;
}

/* ===== 完了画面 ===== */
.ca-complete {
    text-align: center;
    padding: 2.5rem 1rem;
}
.ca-complete-icon {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}
.ca-complete-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111;
}
.ca-complete-msg {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.8;
    margin-bottom: 1.75rem;
}
.ca-line-box {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.ca-line-msg {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 1rem;
    line-height: 1.7;
}
.ca-btn-line {
    display: inline-block;
    background: #06c755;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 40px;
    border-radius: 10px;
    text-decoration: none;
    transition: background .15s;
    letter-spacing: .03em;
}
.ca-btn-line:hover {
    background: #05a847;
    color: #fff;
    text-decoration: none;
}
.ca-new-account-notice {
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    padding: 1.25rem;
    font-size: 1rem;
    color: #1e40af;
    margin-top: 1.25rem;
    line-height: 1.7;
}
.ca-btn-secondary-inline {
    display: inline-block;
    margin-top: .75rem;
    font-size: 1rem;
    color: #2563eb;
    text-decoration: underline;
}

/* ===== トリガーボタン ===== */
.ca-trigger-wrap {
    text-align: center;
    margin: 2rem 0 0;
}
.ca-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    letter-spacing: .04em;
    width: 100%;
    justify-content: center;
}
.ca-trigger-btn:hover {
    background: #15803d;
}
.ca-trigger-btn:active {
    transform: scale(.98);
}
.ca-trigger-arrow {
    display: inline-block;
    transition: transform .3s;
    font-size: 1rem;
}
.ca-trigger-btn.is-open .ca-trigger-arrow {
    transform: rotate(180deg);
}

/* ===== アコーディオン ===== */
.ca-accordion {
    max-height: 0;
    overflow: hidden;
    transition: max-height .5s ease, opacity .4s ease, padding .4s ease;
    opacity: 0;
    padding: 0;
}
.ca-accordion.is-open {
    max-height: 3000px;
    opacity: 1;
    padding: 2rem 0 0;
}

/* ===== ゲスト向けノート ===== */
.ca-guest-note {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1rem;
    color: #1e40af;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.ca-guest-note-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}
.ca-guest-note a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
}

/* ===== パスワードセクション ===== */
.ca-password-section {
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.ca-password-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1rem;
}
.ca-password-section-icon {
    font-size: 1.1rem;
}
.ca-pass-wrap {
    position: relative;
}
.ca-pass-wrap .ca-input {
    padding-right: 72px;
}
.ca-pass-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1rem;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color .15s;
}
.ca-pass-toggle:hover { color: #2563eb; }

/* ===== マイページリンク（完了画面） ===== */
.ca-mypage-link {
    display: inline-block;
    background: #fff;
    border: 1.5px solid #2563eb;
    color: #2563eb;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: background .15s;
}
.ca-mypage-link:hover {
    background: #eff6ff;
    text-decoration: none;
    color: #1d4ed8;
}

/* ===== 姓・名 2カラム ===== */
.ca-name-row {
    display: flex;
    gap: 12px;
    width: 100%;
}
.ca-name-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ca-name-sub {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

/* ===== 必須フィールドの色変化 ===== */
.ca-input-required {
    background: #fefce8;
    border-color: #d1d5db;
}
.ca-input-required.is-typing {
    background: #fffbeb;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}
.ca-input-required.is-filled {
    background: #fff;
    border-color: #d1d5db;
}
.ca-input-required.is-filled:not(:focus) {
    box-shadow: none;
}

/* ===== レスポンシブ ===== */
@media (max-width: 600px) {
    .ca-progress-label {
        font-size: 1rem;
    }
    .ca-checkbox-group {
        grid-template-columns: 1fr;
    }
    .ca-confirm-label {
        width: 110px;
    }
    .ca-btn-row {
        flex-direction: column;
    }
    .ca-radio-label {
        flex: unset;
        width: 100%;
    }
    .ca-name-row {
        flex-direction: column;
        gap: 10px;
    }
}
