/* Repure Booking - Frontend CSS */
.repb-booking-container { max-width: 800px; margin: 0 auto; position: relative; z-index: 2; }
.repb-fade-step { display: none; opacity: 0; transform: translateY(15px); transition: all 0.5s ease; margin-top: 30px; }
.repb-fade-step.visible { display: block; opacity: 1; transform: translateY(0); }
.repb-card-box { background: rgba(255,255,255,0.97); padding: 25px; border-radius: var(--repb-radius); box-shadow: 0 10px 30px rgba(0,0,0,0.08); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); }
.repb-fake-h2 { font-size: 20px; font-weight: 800; line-height: 1.3; margin-bottom: 10px; display: block; }
.repb-sub-text { font-size: 14px; line-height: 1.5; display: block; margin-top: 5px; }
.repb-step-title { font-size: 1.2em; font-weight: 800; text-align: center; margin: 0 0 20px; color: #334155; }
.repb-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.cal-day-label { font-weight: bold; padding: 10px 0; color: #94a3b8; font-size: 0.8em; }
.cal-date { padding: 8px 0; border-radius: 8px; cursor: pointer; transition: 0.2s; border: 1px solid #f1f5f9; position: relative; min-height: 50px; display: flex; flex-direction: column; justify-content: center; align-items: center; background: #fff; font-weight: 800; color: #333; }
.cal-mark { font-size: 14px; margin-top: 2px; line-height: 1; font-weight: bold; }
.mark-circle { color: #10b981; } .mark-cross { color: #ef4444; } .mark-hyphen { color: #cbd5e1; }
.cal-date.available:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border-color: var(--repb-main); }
.cal-date.selected { background: var(--repb-main) !important; color: #fff !important; border-color: var(--repb-main) !important; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.2); }
.cal-date.selected .cal-mark { color: #fff; }
.cal-date.disabled { color: #cbd5e1; cursor: default; background: #f8fafc; pointer-events: none; }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin-top: 20px; }
.time-btn { padding: 14px 10px; border: 2px solid #e2e8f0; border-radius: 8px; background: #fff; cursor: pointer; text-align: center; font-weight: 800; color: #334155; transition: 0.2s; font-size: 15px; }
.time-btn:hover, .time-btn.selected { background: var(--repb-main); color: #fff; border-color: var(--repb-main); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.repb-form input[type="text"], .repb-form input[type="email"], .repb-form input[type="tel"] { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: var(--repb-radius); font-size: 16px; box-sizing: border-box; transition: 0.3s; }
.input-wrap { margin-bottom: 20px; }
.repb-input-error { border: 2px solid #d63638 !important; background: #ffebeb !important; }
.repb-error-msg { color: #d63638; font-size: 12px; margin-top: 5px; font-weight: bold; display: none; }
.repb-agree-error { border: 2px solid #d63638 !important; background: #ffebeb !important; }
.repb-payment-error { border: 2px solid #d63638 !important; border-radius: var(--repb-radius); padding: 5px; }
.repb-submit-btn { background: var(--repb-main); color: #fff; border: none; padding: 18px; width: 100%; font-weight: 800; font-size: 16px; border-radius: var(--repb-radius); cursor: pointer; transition: 0.2s; margin-top: 15px; }
.repb-submit-btn:hover:not(:disabled) { opacity: 0.9; box-shadow: 0 4px 15px rgba(0,0,0,0.15); transform: translateY(-1px); }
.repb-submit-btn:disabled { background: #ccc; cursor: not-allowed; }
.payment-options { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.payment-option { flex: 1; padding: 15px; border: 2px solid #e2e8f0; border-radius: var(--repb-radius); cursor: pointer; text-align: center; background: #fff; font-weight: 700; color: #475569; min-width: 120px; transition: 0.2s; }
.payment-option:hover { border-color: #cbd5e1; }
.payment-option.selected { border-color: var(--repb-main); background: #f0f6ff; color: var(--repb-main); box-shadow: 0 0 0 1px var(--repb-main); }
.payment-details { display: none; padding: 20px; background: #f8fafc; border-radius: var(--repb-radius); margin-bottom: 20px; border: 1px solid #f1f5f9; color: #475569; line-height: 1.7; font-size: 14px; }
.StripeElement { background-color: white; padding: 12px 15px; border-radius: var(--repb-radius); border: 1px solid #ddd; height: 48px; box-sizing: border-box; margin-bottom: 10px; }
.privacy-policy-box { background: #fff; border: 1px solid #e2e8f0; padding: 15px; border-radius: 8px; max-height: 150px; overflow-y: auto; font-size: 13px; color: #64748b; line-height: 1.6; margin-bottom: 10px; white-space: pre-wrap; }
.policy-display-box { background: #fff5f5; border: 1px solid #fed7d7; padding: 15px; border-radius: 8px; margin-bottom: 20px; font-size: 13px; color: #c53030; line-height: 1.6; }
.policy-display-box .policy-title { margin: 0 0 8px 0; font-size: 14px; display: flex; align-items: center; gap: 5px; font-weight: bold; }
.repb-modal { display: none; position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; height: 100dvh !important; background: rgba(0,0,0,0.8) !important; z-index: 999999 !important; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; margin: 0 !important; transform: none !important; opacity: 1 !important; visibility: visible !important; }
.repb-modal-content { background:#fff; padding:30px; padding-bottom: max(30px, env(safe-area-inset-bottom)); border-radius:var(--repb-radius); width:100%; max-width:450px; position: relative; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; display: flex; flex-direction: column; box-sizing: border-box; margin: auto; }
.repb-modal-actions { display: flex; width: 100%; box-sizing: border-box; gap: 12px; flex-direction: column; }
.repb-modal-btn-cancel { width:100%; padding:0; border:1px solid #cbd5e1; border-radius:8px; cursor:pointer; background:#f8fafc; font-weight:700; color:#64748b; white-space:nowrap; height:50px; margin:0; display:flex; align-items:center; justify-content:center; box-sizing:border-box; font-size:16px; }
@media screen and (min-width: 601px) {
    .repb-modal-actions { flex-direction: row-reverse; } 
    .repb-modal-actions > * { flex: 1; min-width: 0; }
}
.course-card { position: relative; border-radius: var(--repb-radius); overflow: hidden; cursor: pointer; color: #fff; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.08); display:flex; flex-direction:column; background-size: cover; background-position: center; border: 1px solid rgba(0,0,0,0.05); }
.course-card:hover { transform: scale(1.02); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.course-card.dimmed { filter: grayscale(100%); opacity: 0.4; transform: scale(0.98); cursor: pointer; }
.course-card.dimmed:hover { opacity: 0.8; filter: grayscale(50%); transform: scale(1.0); }
.course-card.selected { border: 4px solid var(--repb-main) !important; opacity: 1 !important; transform: scale(1.02); box-shadow: 0 10px 25px rgba(0,0,0,0.15); z-index:2; }
.course-card-img { width: 100%; height: auto; display: block; }
.course-card-textonly { width: 100%; min-height: 120px; display: flex; flex-direction: column; justify-content: flex-end; padding: 15px; box-sizing: border-box; }
.course-card-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 15px; background: linear-gradient(transparent, rgba(0,0,0,0.9)); box-sizing: border-box; }
.repb-honey { display: none !important; }
iframe[name^="__privateStripeMetricsController"], 
iframe[name^="__privateStripeController"], 
iframe[src^="https://js.stripe.com"] { z-index: 2147483647 !important; }
.StripeElement--webkit-autofill { background: transparent !important; }
div[data-elements-root] { z-index: 2147483647 !important; }
.grecaptcha-badge { visibility: visible !important; position: static !important; margin: 20px auto 0 !important; transform: none !important; box-shadow: none !important; width: 256px !important; height: 60px !important; display: block !important; z-index: 10 !important; }

/* Modal CSS */
.repb-modal { display: none; position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; height: 100dvh !important; background: rgba(0,0,0,0.8) !important; z-index: 999999 !important; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; margin: 0 !important; transform: none !important; opacity: 1 !important; visibility: visible !important; }
.repb-modal-content { background:#fff; padding:30px; padding-bottom: max(30px, env(safe-area-inset-bottom)); border-radius:var(--repb-radius); width:100%; max-width:450px; position: relative; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; display: flex; flex-direction: column; box-sizing: border-box; margin: auto; }

.repb-modal-actions { display: flex; width: 100%; box-sizing: border-box; gap: 12px; flex-direction: column; }
.repb-modal-btn-cancel { width:100%; padding:0; border:1px solid #cbd5e1; border-radius:8px; cursor:pointer; background:#f8fafc; font-weight:700; color:#64748b; white-space:nowrap; height:50px; margin:0; display:flex; align-items:center; justify-content:center; box-sizing:border-box; font-size:16px; }
@media screen and (min-width: 601px) {
    .repb-modal-actions { flex-direction: row-reverse; } 
    .repb-modal-actions > * { flex: 1; min-width: 0; }
}

.course-card { position: relative; border-radius: var(--repb-radius); overflow: hidden; cursor: pointer; color: #fff; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.08); display:flex; flex-direction:column; background-size: cover; background-position: center; border: 1px solid rgba(0,0,0,0.05); }
.course-card:hover { transform: scale(1.02); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.course-card.dimmed { filter: grayscale(100%); opacity: 0.4; transform: scale(0.98); cursor: pointer; }
.course-card.dimmed:hover { opacity: 0.8; filter: grayscale(50%); transform: scale(1.0); }
.course-card.selected { border: 4px solid var(--repb-main) !important; opacity: 1 !important; transform: scale(1.02); box-shadow: 0 10px 25px rgba(0,0,0,0.15); z-index:2; }
.course-card-img { width: 100%; height: auto; display: block; }
.course-card-textonly { width: 100%; min-height: 120px; display: flex; flex-direction: column; justify-content: flex-end; padding: 15px; box-sizing: border-box; }
.course-card-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 15px; background: linear-gradient(transparent, rgba(0,0,0,0.9)); box-sizing: border-box; }
.repb-honey { display: none !important; }

iframe[name^="__privateStripeMetricsController"], 
iframe[name^="__privateStripeController"], 
iframe[src^="https://js.stripe.com"] {
    z-index: 2147483647 !important; 
}
.StripeElement--webkit-autofill { background: transparent !important; }
div[data-elements-root] { z-index: 2147483647 !important; }

.grecaptcha-badge { 
    visibility: visible !important; position: static !important; margin: 20px auto 0 !important;
    transform: none !important; box-shadow: none !important; width: 256px !important;
    height: 60px !important; display: block !important; z-index: 10 !important;
}

/* --- サンクスページ用 --- */
.repb-thanks-view { display: block !important; position: relative; padding: 60px 20px; box-sizing: border-box; width: 100%; max-width: 100%; z-index: 10; margin: 0; }
.repb-thanks-container { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; display: block; }
.repb-temp-user-row { display: none; }
@media print {
    .repb-no-print { display: none !important; }
    .repb-thanks-view { background: #fff !important; color: #000 !important; padding: 0 !important; min-height: auto !important; border-radius: 0 !important; }
    .thanks-item-block { break-inside: avoid; border: 1px solid #ccc !important; box-shadow: none !important; }
}

/* --- 確認ページ用 --- */
.repb-conf-wrap { display: block !important; width: 100%; max-width: 800px; margin: 60px auto; padding: 40px; box-sizing: border-box; font-family: sans-serif; color: #333; background: #ffffff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); }
.repb-receipt-container { display: block; border: 1px solid #ddd; padding: 40px; background: #fff; margin-bottom: 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.receipt-header { display: flex; justify-content: space-between; border-bottom: 2px solid #333; padding-bottom: 10px; margin-bottom: 30px; align-items: flex-end; }
.receipt-meta { font-size: 12px; text-align: right; line-height: 1.4; }
.receipt-address { margin-bottom: 30px; font-size: 18px; border-bottom: 1px solid #eee; padding-bottom: 10px; min-height: 45px; }
.receipt-amount { font-size: 32px; font-weight: bold; text-align: center; background: #f9f9f9; padding: 20px 20px 10px 20px; border-radius: 8px 8px 0 0; }
.status-alert { display: block; padding: 20px; border-radius: 8px; margin-bottom: 25px; font-weight: bold; text-align: center; border: 1px solid transparent; }
.status-alert.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.status-alert.error { background: #fff5f5; border-color: #feb2b2; color: #c53030; }
.contact-block { display: block; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin-top: 30px; }

@media screen and (max-width: 600px) {
    .repb-conf-wrap { margin: 20px auto; padding: 20px; width: 95%; }
}

/* --- インラインスタイル排除用の動的変数受け皿 --- */
.repb-fake-h2, .repb-step-title { font-family: var(--repb-title-font, inherit); }
.repb-sub-text { font-family: var(--repb-sub-font, inherit); }

.repb-course-grid-dynamic {
    display: grid;
    gap: 15px;
}
/* PC用の列数クラス */
.repb-cols-1 { grid-template-columns: repeat(1, 1fr); }
.repb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.repb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.repb-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* スマホ用の列数クラス（PC用を上書き） */
@media screen and (max-width: 782px) {
    .repb-cols-sp-1 { grid-template-columns: repeat(1, 1fr) !important; }
    .repb-cols-sp-2 { grid-template-columns: repeat(2, 1fr) !important; }
}