/* =====================================================
   event-form.css  — 参加登録フロー専用スタイル
   register.php / confirm.php / complete.php
   ===================================================== */

:root {
  --ef-accent:   #1a56db;
  --ef-accent2:  #1347bb;
  --ef-light:    #eff6ff;
  --ef-border:   #dde3f0;
  --ef-muted:    #6b7280;
  --ef-text:     #111827;
  --ef-bg:       #f3f6fb;
  --ef-white:    #ffffff;
  --ef-success:  #059669;
  --ef-danger:   #dc2626;
  --ef-radius:   14px;
  --ef-radius-sm:8px;
  --ef-shadow:   0 8px 32px rgba(16,24,40,.10);
  --ef-shadow-sm:0 2px 10px rgba(16,24,40,.06);
}

/* ── Reset body for event pages ── */
body.ef-page {
  background: var(--ef-bg);
  min-height: 100vh;
}

/* =====================================================
   Container
   ===================================================== */
.ef-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

/* =====================================================
   Step indicator
   ===================================================== */
.ef-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px 0 24px;
}

.ef-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ef-step__circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: #e2e8f0;
  color: #94a3b8;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}

.ef-step__label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.ef-step--active .ef-step__circle {
  background: var(--ef-accent);
  border-color: var(--ef-accent);
  color: #fff;
}
.ef-step--active .ef-step__label {
  color: var(--ef-accent);
}

.ef-step--done .ef-step__circle {
  background: var(--ef-success);
  border-color: var(--ef-success);
  color: #fff;
}
.ef-step--done .ef-step__label {
  color: var(--ef-success);
}

.ef-step__line {
  width: 40px;
  height: 2px;
  background: #e2e8f0;
  margin: 0 4px;
  flex-shrink: 0;
}
.ef-step__line--done {
  background: var(--ef-success);
}

/* =====================================================
   Event Hero Card — サムネイル左 / 詳細右
   ===================================================== */
.ef-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  background: var(--ef-white);
  border-radius: var(--ef-radius);
  border: 1px solid var(--ef-border);
  box-shadow: var(--ef-shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

/* ── 左：サムネイル画像（background-image 方式） ── */
/* img タグは使わず div の background で確実にフィル */
.ef-hero__thumb {
  position: relative;
  background-color: #ffffff;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  min-height: 160px;
}

.ef-hero__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--ef-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: .04em;
  z-index: 1;
}

/* ── 右：タイトル + メタ情報 ── */
.ef-hero__info {
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.ef-hero__title {
  font-size: 19px;
  font-weight: 900;
  color: var(--ef-text);
  line-height: 1.4;
  margin: 0 0 16px;
}

/* メタリスト（縦並び） */
.ef-hero__meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ef-hero__meta-item {
  display: flex;
  align-items: baseline;
  gap: 0;
}

.ef-hero__meta-icon {
  font-size: 13px;
  flex-shrink: 0;
  width: 22px;
  line-height: 1.5;
}

.ef-hero__meta-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ef-muted);
  width: 52px;
  flex-shrink: 0;
}

.ef-hero__meta-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--ef-text);
  line-height: 1.5;
}

/* ── compact variant（confirm / complete） ── */
.ef-hero--sm {
  grid-template-columns: 200px 1fr;
}

.ef-hero--sm .ef-hero__thumb {
  min-height: 110px;
  background-color: #ffffff;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.ef-hero--sm .ef-hero__info {
  padding: 16px 20px;
}

.ef-hero--sm .ef-hero__title {
  font-size: 15px;
  margin-bottom: 10px;
}

.ef-hero--sm .ef-hero__meta-label {
  width: 44px;
}

/* complete page — 上部の小バナー画像（センタリングカード内） */
.ef-complete__img-wrap {
  width: 100%;
  height: 120px;
  overflow: hidden;
  border-radius: var(--ef-radius) var(--ef-radius) 0 0;
  margin: -24px -24px 24px;
  /* カード padding 分を打ち消し */
  width: calc(100% + 48px);
  position: relative;
  background: #0f172a;
}
.ef-complete__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .6;
}

/* =====================================================
   Form Card
   ===================================================== */
.ef-card {
  background: var(--ef-white);
  border-radius: var(--ef-radius);
  border: 1px solid var(--ef-border);
  box-shadow: var(--ef-shadow-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

/* Section header inside a card */
.ef-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  background: var(--ef-light);
  border-bottom: 1px solid var(--ef-border);
}

.ef-section-icon {
  font-size: 18px;
  line-height: 1;
}

.ef-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ef-accent);
  letter-spacing: .03em;
}

/* Individual row inside card */
.ef-row {
  padding: 16px 24px;
  border-bottom: 1px solid var(--ef-border);
}
.ef-row:last-child {
  border-bottom: none;
}

.ef-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ef-muted);
  margin-bottom: 6px;
  letter-spacing: .02em;
}

.ef-label .ef-req {
  color: var(--ef-danger);
  margin-left: 3px;
  font-size: 11px;
}

/* inputs */
.ef-input,
.ef-select,
.ef-textarea {
  width: 100%;
  border: 1.5px solid var(--ef-border);
  border-radius: var(--ef-radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ef-text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}

.ef-select {
  padding-right: 38px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.ef-textarea {
  min-height: 90px;
  resize: vertical;
}

.ef-input:focus,
.ef-select:focus,
.ef-textarea:focus {
  border-color: var(--ef-accent);
  box-shadow: 0 0 0 3px rgba(26,86,219,.13);
}

/* Name row (2 cols) */
.ef-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Radio / Checkbox pills */
.ef-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.ef-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--ef-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ef-muted);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  user-select: none;
  line-height: 1;
  background: #fff;
}

.ef-pill input[type="radio"],
.ef-pill input[type="checkbox"] {
  display: none;
}

.ef-pill:has(input:checked) {
  border-color: var(--ef-accent);
  background: var(--ef-light);
  color: var(--ef-accent);
}

/* Fallback for browsers without :has() */
.ef-pill--checked {
  border-color: var(--ef-accent);
  background: var(--ef-light);
  color: var(--ef-accent);
}

/* Hint text */
.ef-hint {
  font-size: 11px;
  color: var(--ef-muted);
  margin-top: 5px;
  line-height: 1.5;
}

/* Field error */
.ef-error {
  font-size: 11px;
  color: var(--ef-danger);
  margin-top: 4px;
  font-weight: 600;
}

/* Error banner */
.ef-error-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--ef-radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ef-danger);
  font-weight: 600;
}

/* Subbox（その他入力） */
.ef-subbox {
  margin-top: 10px;
  padding: 12px;
  background: var(--ef-light);
  border-radius: var(--ef-radius-sm);
  border: 1px solid var(--ef-border);
  display: none;
}
.ef-subbox.is-visible {
  display: block;
}

/* =====================================================
   Confirm page — review rows
   ===================================================== */
.ef-confirm-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--ef-border);
}
.ef-confirm-row:last-child {
  border-bottom: none;
}

.ef-confirm-key {
  flex: 0 0 140px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ef-muted);
  letter-spacing: .02em;
}

.ef-confirm-val {
  flex: 1;
  font-size: 14px;
  color: var(--ef-text);
  font-weight: 500;
  word-break: break-word;
}

/* =====================================================
   Actions bar
   ===================================================== */
.ef-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 0 0;
}

.ef-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 24px;
  border-radius: var(--ef-radius-sm);
  border: 1.5px solid var(--ef-border);
  background: var(--ef-white);
  color: var(--ef-text);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform .07s, box-shadow .15s, background .15s, border-color .15s;
  min-height: 46px;
  white-space: nowrap;
}
.ef-btn:hover {
  box-shadow: var(--ef-shadow-sm);
  transform: translateY(-1px);
  text-decoration: none;
}

.ef-btn--primary {
  background: var(--ef-accent);
  border-color: var(--ef-accent);
  color: #fff;
  padding: 13px 32px;
}
.ef-btn--primary:hover {
  background: var(--ef-accent2);
  border-color: var(--ef-accent2);
}

.ef-btn--lg {
  width: 100%;
  font-size: 15px;
  padding: 16px;
  border-radius: 10px;
  min-height: 52px;
}

/* =====================================================
   Complete page
   ===================================================== */
.ef-complete {
  text-align: center;
  padding: 40px 24px;
}

.ef-complete__icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 16px;
  display: block;
}

.ef-complete__title {
  font-size: 22px;
  font-weight: 900;
  color: var(--ef-text);
  margin: 0 0 10px;
}

.ef-complete__msg {
  font-size: 14px;
  color: var(--ef-muted);
  line-height: 1.75;
  margin: 0 0 28px;
}

/* =====================================================
   Agree checkbox (実チェックボックス形式)
   ===================================================== */
.ef-agree-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
}

.ef-agree-item + .ef-agree-item {
  border-top: 1px solid var(--ef-border);
}

.ef-agree-checkbox {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--ef-accent);
  cursor: pointer;
}

.ef-agree-text {
  font-size: 13px;
  color: var(--ef-text);
  line-height: 1.55;
  font-weight: 500;
  user-select: none;
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 600px) {
  /* hero: 縦積み（1列グリッドに切替） */
  .ef-hero,
  .ef-hero--sm {
    grid-template-columns: 1fr;
  }
  /* background-image 方式 → padding-bottom で 16:9 を確保 */
  .ef-hero__thumb {
    min-height: 0;
    padding-bottom: 56.25%;  /* 16:9 ratio */
  }
  .ef-hero--sm .ef-hero__thumb {
    padding-bottom: 42%;
  }
  .ef-hero__info { padding: 16px; }
  .ef-hero__title { font-size: 16px; margin-bottom: 12px; }
  .ef-hero--sm .ef-hero__info { padding: 12px 16px; }

  .ef-row { padding: 14px 16px; }
  .ef-section-head { padding: 14px 16px; }
  .ef-row-2col { grid-template-columns: 1fr; }

  .ef-confirm-row { padding: 12px 16px; flex-direction: column; gap: 3px; }
  .ef-confirm-key { flex: none; }

  .ef-actions { flex-direction: column; }
  .ef-btn { width: 100%; }

  .ef-steps { padding: 16px 0 20px; }
  .ef-step__label { display: none; }
  .ef-step__line { width: 24px; }
}
