/* ===== V55 成團、活動退款及手機會員中心 ===== */

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.formation-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: .02em;
  vertical-align: middle;
}

.formation-badge.pending { color: var(--yellow); background: rgba(255, 211, 79, .1); }
.formation-badge.formed { color: #78e4a5; background: rgba(83, 215, 155, .11); }
.formation-badge.closed { color: var(--amber); background: rgba(255, 167, 51, .11); }
.formation-badge.refunding { color: #ff8cae; background: rgba(255, 93, 162, .12); }

.formation-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(255, 211, 79, .55);
  border-left-width: 5px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 211, 79, .12), rgba(15, 17, 34, .75));
}

.formation-panel > span {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 211, 79, .17);
  color: var(--yellow);
  font-size: 14px;
  font-weight: 900;
}

.formation-panel strong { display: block; color: var(--cream); font-size: 15px; }
.formation-panel p { margin: 4px 0 0; color: var(--paper); font-size: 12px; line-height: 1.6; }
.formation-panel.formed { border-color: rgba(83, 215, 155, .62); background: linear-gradient(145deg, rgba(83, 215, 155, .12), rgba(15, 17, 34, .75)); }
.formation-panel.formed > span { color: #78e4a5; background: rgba(83, 215, 155, .16); }
.formation-panel.closed { border-color: rgba(255, 167, 51, .68); background: linear-gradient(145deg, rgba(255, 167, 51, .13), rgba(15, 17, 34, .78)); }
.formation-panel.closed > span { color: var(--amber); background: rgba(255, 167, 51, .17); }
.formation-panel.refunding { border-color: rgba(255, 93, 162, .68); background: linear-gradient(145deg, rgba(255, 93, 162, .13), rgba(15, 17, 34, .78)); }
.formation-panel.refunding > span { color: #ff8cae; background: rgba(255, 93, 162, .17); }

.formation-registration-stop {
  display: grid;
  gap: 8px;
  padding: 4px 0;
}

.formation-registration-stop strong { color: var(--amber); font-size: 16px; }
.formation-registration-stop p { margin: 0 0 4px; color: var(--paper); line-height: 1.6; }
.formation-card-line { color: var(--amber) !important; font-weight: 700; }
.cal-agenda-event > .cal-agenda-event-main > .formation-badge { margin: 5px 0 2px; }

.event-credit-wallet {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) auto auto;
  gap: 14px 22px;
  align-items: center;
  margin: 18px 0;
  padding: 18px;
  border: 2px solid rgba(73, 225, 238, .58);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 10%, rgba(73, 225, 238, .18), transparent 36%),
    linear-gradient(145deg, rgba(38, 43, 77, .96), rgba(15, 17, 34, .96));
  box-shadow: 0 7px 0 var(--ink-deep), 0 0 25px rgba(73, 225, 238, .08);
}

.event-credit-wallet h3 { margin: 2px 0 5px; color: var(--cream); font-size: 20px; }
.event-credit-wallet p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.wallet-total { display: grid; gap: 2px; min-width: 120px; }
.wallet-total span { color: var(--muted); font-size: 11px; font-weight: 800; }
.wallet-total strong { color: var(--cyan); font-size: 25px; line-height: 1.15; text-shadow: var(--glow-cyan); }
.wallet-breakdown { display: grid; grid-template-columns: repeat(2, auto); gap: 8px; }
.wallet-breakdown span { display: grid; gap: 2px; min-width: 86px; padding: 9px 11px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; color: var(--muted); font-size: 10px; }
.wallet-breakdown b { color: var(--cream); font-size: 13px; }
.event-credit-wallet .wallet-expiry,
.event-credit-wallet .wallet-unavailable { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1); color: var(--paper); }
.event-credit-wallet .wallet-unavailable { color: var(--amber); }

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-title-row h4 { margin-top: 2px; }
.refund-private-label { padding: 4px 8px; border: 1px solid rgba(73, 225, 238, .42); border-radius: 999px; color: var(--cyan); font-size: 9px; font-weight: 800; white-space: nowrap; }
.refund-panel { border-color: rgba(255, 93, 162, .52); }
.refund-card { display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(255, 93, 162, .38); border-radius: 15px; background: rgba(15, 17, 34, .58); }
.refund-card + .refund-card { margin-top: 12px; }
.refund-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.refund-card > header span { display: block; color: #ff8cae; font-size: 10px; font-weight: 900; letter-spacing: .06em; }
.refund-card > header h5 { margin: 2px 0 0; color: var(--cream); font-size: 16px; line-height: 1.4; }
.refund-card > header > strong { flex: 0 0 auto; color: var(--yellow); font-size: 18px; }
.refund-points-note { margin: 0; padding: 9px 11px; border-radius: 10px; background: rgba(73, 225, 238, .08); color: var(--paper); font-size: 11px; line-height: 1.55; }
.refund-choice-form fieldset { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.refund-option { display: grid !important; grid-template-columns: 22px minmax(0, 1fr); gap: 9px !important; align-items: start; min-height: 62px; padding: 11px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 13px; background: rgba(255, 255, 255, .035); cursor: pointer; }
.refund-option:has(input:checked) { border-color: var(--cyan); background: rgba(73, 225, 238, .09); box-shadow: inset 0 0 0 1px rgba(73, 225, 238, .22); }
.refund-option.disabled { opacity: .47; cursor: not-allowed; }
.refund-option input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cyan); }
.refund-option span { display: grid; gap: 4px; }
.refund-option b { color: var(--cream); font-size: 13px; }
.refund-option b em { display: inline-flex; margin-left: 4px; padding: 2px 6px; border-radius: 999px; background: var(--cyan); color: var(--ink-deep); font-size: 9px; font-style: normal; vertical-align: middle; }
.refund-option small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.refund-choice-detail { display: grid; gap: 9px; margin: -1px 0 3px 31px; padding: 11px; border: 1px dashed rgba(73, 225, 238, .35); border-radius: 12px; background: rgba(73, 225, 238, .045); }
.refund-choice-detail label { min-width: 0; }
.refund-choice-detail input,
.refund-choice-detail select { width: 100%; min-height: 44px; }
.refund-choice-detail p { margin: 0; color: var(--muted); font-size: 10px; }
.refund-status { padding: 11px 12px; border-radius: 12px; background: rgba(255, 167, 51, .1); }
.refund-status strong { color: var(--amber); }
.refund-status p { margin: 4px 0 0; color: var(--paper); font-size: 12px; line-height: 1.55; }
.refund-status.completed { background: rgba(83, 215, 155, .1); }
.refund-status.completed strong { color: #78e4a5; }
.refund-read-error { padding: 12px; border-radius: 12px; background: rgba(255, 167, 51, .1); }
.refund-read-error strong { color: var(--amber); }
.refund-read-error p { margin-bottom: 0; color: var(--paper); }

.event-credit-use-row { align-items: flex-start !important; }
.event-credit-use-row small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.event-credit-use-row input { width: 126px; min-height: 44px; text-align: right; }
.event-credit-unavailable { margin: 6px 0; padding: 9px 11px; border: 1px solid rgba(255, 167, 51, .4); border-radius: 10px; background: rgba(255, 167, 51, .08); color: var(--amber); font-size: 11px; line-height: 1.5; }

@media (max-width: 760px) {
  .formation-badge { min-height: 27px; padding-inline: 8px; }
  .formation-panel { gap: 10px; margin: 12px 0; padding: 11px; }
  .formation-panel > span { min-width: 40px; min-height: 40px; }
  .formation-panel p { font-size: 11px; }

  .event-credit-wallet {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin: 14px 0;
    padding: 14px;
    border-radius: 15px;
  }

  .wallet-copy { min-width: 0; }
  .wallet-copy p:last-child { display: none; }
  .wallet-total { min-width: 105px; text-align: right; }
  .wallet-total strong { font-size: 22px; }
  .wallet-breakdown { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallet-breakdown span { min-width: 0; }
  .event-credit-wallet .wallet-expiry,
  .event-credit-wallet .wallet-unavailable { padding-top: 9px; }

  .refund-panel { padding: 13px !important; }
  .panel-title-row { align-items: center; }
  .refund-private-label { white-space: normal; text-align: right; }
  .refund-card { padding: 12px; }
  .refund-card > header h5 { font-size: 15px; }
  .refund-card > header > strong { font-size: 16px; }
  .refund-option { min-height: 68px; padding: 11px 10px; }
  .refund-choice-detail { margin-left: 0; }
  .refund-choice-form > .btn { min-height: 48px; }

  .event-credit-use-row { display: grid !important; grid-template-columns: minmax(0, 1fr) 104px; }
  .event-credit-use-row input { width: 104px; }
  .event-card .formation-badge { margin-top: 2px; }
  .cal-agenda-event .formation-badge { max-width: 100%; }
}

@media (max-width: 380px) {
  .event-credit-wallet { grid-template-columns: minmax(0, 1fr); }
  .wallet-total { text-align: left; }
  .wallet-breakdown { grid-column: auto; }
  .event-credit-wallet .wallet-expiry,
  .event-credit-wallet .wallet-unavailable { grid-column: auto; }
  .panel-title-row { display: grid; }
  .refund-private-label { justify-self: start; text-align: left; }
  .refund-card > header { display: grid; }
  .refund-card > header > strong { justify-self: start; }
}

