/* ─────────────────────────────────────
   subscription.css
   .subscriptionPage 블록은 원본 유지
   그 안의 모든 요소 새로 디자인
───────────────────────────────────── */

/* ─── 원본 유지 ─────────────────────── */
.subscriptionPage {
  width: min(
    var(--page-content-width-desktop),
    calc(100vw - var(--page-content-gutter-desktop))
  );
  max-width: none;
  margin: var(--page-content-margin-top-desktop) auto 0;
  padding: 34px 28px;

  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 25px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  color: white;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

/* ─── CSS Variables ─────────────────── */
.subscriptionPage {
  --mint: #9effd6;
  --blue: #7eb8ff;
  --purple: #c9b8ff;
  --text: rgba(255, 255, 255, 0.93);
  --sub: rgba(255, 255, 255, 0.72);
  --muted: rgba(255, 255, 255, 0.42);
  --glass: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.12);
  --r-card: 22px;
  --r-sm: 10px;
}

/* ─── Hero ──────────────────────────── */
.subscriptionHero {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 44px;
}

.subscriptionEyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(158, 255, 214, 0.1);
  border: 1px solid rgba(158, 255, 214, 0.2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 18px;
}

.subscriptionHero h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text);
}

.subscriptionHero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--mint) 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subscriptionDesc {
  margin: 14px auto 0;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--sub);
}

.toggleTrack {
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: rgba(158, 255, 214, 0.28);
  position: relative;
}

.toggleThumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.savePill {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(158, 255, 214, 0.15);
  font-size: 11px;
  font-weight: 700;
  color: var(--mint);
}

/* ─── Grid ──────────────────────────── */
.subscriptionGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
}

/* ─── Plan Card ─────────────────────── */
.planCard {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 26px 20px 22px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.planCard:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Free */
.freePlan {
  background: rgba(255, 255, 255, 0.04);
}

/* Popular / Team */
.planCard.popular {
  background: rgba(158, 255, 214, 0.06);
  border-color: rgba(158, 255, 214, 0.28);
  box-shadow:
    0 0 0 1px rgba(158, 255, 214, 0.12),
    0 16px 50px rgba(0, 0, 0, 0.25);
}

.planCard.popular:hover {
  border-color: rgba(158, 255, 214, 0.45);
}

/* Enterprise */
.enterprisePlan {
  background: linear-gradient(
    160deg,
    rgba(201, 184, 255, 0.08) 0%,
    rgba(126, 184, 255, 0.05) 100%
  );
  border-color: rgba(201, 184, 255, 0.18);
}

.enterprisePlan:hover {
  border-color: rgba(201, 184, 255, 0.35);
}

/* ─── Popular mark ───────────────────── */
.popularMark {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--blue));
  color: #062020;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(158, 255, 214, 0.3);
}

/* ─── Badge ──────────────────────────── */
.planBadge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 11px;
  font-weight: 700;
  color: var(--sub);
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

.planBadgeMint {
  background: rgba(158, 255, 214, 0.13);
  color: var(--mint);
}
.planBadgePurple {
  background: rgba(201, 184, 255, 0.13);
  color: var(--purple);
}

/* ─── Plan name & sub ────────────────── */
.planName {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
}

/* ─── Price ──────────────────────────── */
.planPrice {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 18px 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.currency {
  font-size: 18px;
  font-weight: 700;
  color: var(--sub);
  align-self: flex-start;
  margin-top: 8px;
}

.price {
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.period {
  font-size: 13px;
  color: var(--muted);
}

/* ─── Stat chips ─────────────────────── */
.statRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.statChip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.statChip.statMint {
  background: rgba(158, 255, 214, 0.07);
  border-color: rgba(158, 255, 214, 0.15);
}
.statChip.statPurple {
  background: rgba(201, 184, 255, 0.07);
  border-color: rgba(201, 184, 255, 0.15);
}

.statIcon {
  font-size: 15px;
  line-height: 1;
  margin-bottom: 4px;
}

.statVal {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.statChip.statMint .statVal {
  color: var(--mint);
}
.statChip.statPurple .statVal {
  color: var(--purple);
}

.statLabel {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ─── Storage ────────────────────────── */
.storageSection {
  margin-bottom: 18px;
}

.storageLabelRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.storageKey {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.storageAmt {
  font-size: 13px;
  font-weight: 700;
  color: var(--sub);
}

.storageBar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.storageBarFill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--blue));
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.storageBarPurple .storageBarFill {
  background: linear-gradient(90deg, var(--purple), var(--blue));
}

.uploadHint {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}

/* ─── Feature list ───────────────────── */
.featureList {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.featureList li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--sub);
}

.featureList li.feat-off {
  color: var(--muted);
}

.fIcon {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.fYes {
  background: rgba(158, 255, 214, 0.14);
  color: var(--mint);
}
.fYes::after {
  content: "✓";
}
.fNo {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.2);
}
.fNo::after {
  content: "—";
}

.aiBadge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(201, 184, 255, 0.18),
    rgba(126, 184, 255, 0.18)
  );
  border: 1px solid rgba(201, 184, 255, 0.22);
  font-size: 10px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

/* ─── Buttons ────────────────────────── */
.planBtn {
  margin-top: auto;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

.planBtn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.2s;
}

.planBtn:hover::after {
  background: rgba(255, 255, 255, 0.07);
}
.planBtn:hover {
  transform: translateY(-2px);
}

.freeBtn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: default;
}
.freeBtn:hover {
  transform: none;
}

.basicBtn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.basicBtn:hover {
  box-shadow: 0 10px 28px rgba(255, 255, 255, 0.08);
}

.teamBtn {
  background: linear-gradient(135deg, var(--mint), var(--blue));
  color: #062020;
  box-shadow: 0 8px 26px rgba(158, 255, 214, 0.22);
}
.teamBtn:hover {
  box-shadow: 0 14px 38px rgba(158, 255, 214, 0.36);
}

.enterpriseBtn {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #0a0820;
  box-shadow: 0 8px 26px rgba(201, 184, 255, 0.18);
}
.enterpriseBtn:hover {
  box-shadow: 0 14px 38px rgba(201, 184, 255, 0.32);
}

/* ─── Footer note ────────────────────── */
.footerNote {
  text-align: center;
  margin-top: 32px;
  font-size: 13px;
  color: var(--muted);
}

.footerLink {
  color: var(--mint);
  text-decoration: none;
}

.footerLink:hover {
  text-decoration: underline;
}

/* ─── Responsive ─────────────────────── */
@media (max-width: 1100px) {
  .subscriptionGrid {
    grid-template-columns: repeat(2, 1fr);
  }
  .planCard.popular {
    order: -1;
  }
}

@media (max-width: 680px) {
  .subscriptionGrid {
    grid-template-columns: 1fr;
  }
  .subscriptionHero h1 {
    font-size: 28px;
  }
  .price {
    font-size: 38px;
  }
}

@media (max-width: 1600px) and (min-width: 1025px) {
  .subscriptionPage {
    width: calc(100% - var(--page-content-gutter-laptop));
    max-width: var(--page-content-width-laptop);
    margin: var(--page-content-margin-top-laptop) auto 0;
  }
}

.cancelBtn {
  background: linear-gradient(
    135deg,
    rgba(255, 120, 120, 0.18),
    rgba(255, 90, 90, 0.1)
  );
  border: 1px solid rgba(255, 120, 120, 0.35);
  color: #ffd7d7;
}

.subscriptionModalBackdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.subscriptionModal {
  width: min(520px, calc(100vw - 32px));
  border-radius: 24px;
  padding: 26px 24px;
  background: rgba(18, 23, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  color: #fff;
}

.subscriptionModalEyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.subscriptionModalTop h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.subscriptionModalDesc {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.6;
}

.subscriptionModalInfo {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.subscriptionModalInfo p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.subscriptionModalActions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.subscriptionModalBtn {
  min-width: 130px;
  height: 46px;
  border-radius: 14px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.subscriptionModalBtn.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.subscriptionModalBtn.danger {
  background: linear-gradient(135deg, #ff6b6b, #ff4d6d);
  color: #fff;
}

.subscriptionModalBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.scheduledCancelBtn {
  background: linear-gradient(
    135deg,
    rgba(255, 180, 80, 0.2),
    rgba(255, 140, 60, 0.14)
  );
  border: 1px solid rgba(255, 180, 80, 0.35);
  color: #ffe4b5;
  font-size: 13px;
}

.subscriptionState.warning {
  color: #ffd28a;
  background: rgba(255, 210, 138, 0.08);
  border: 1px solid rgba(255, 210, 138, 0.18);
}

.pastDueBtn {
  background: linear-gradient(
    135deg,
    rgba(255, 180, 80, 0.24),
    rgba(255, 120, 60, 0.16)
  );
  border: 1px solid rgba(255, 180, 80, 0.35);
  color: #fff1cf;
}

.currentPlanInfoBar {
  margin: 18px 0 26px;
  padding: 18px 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.currentPlanInfoLeft {
  min-width: 0;
}

.currentPlanInfoEyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

.currentPlanInfoMain {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.currentPlanInfoPlan {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.currentPlanInfoStatus {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.currentPlanInfoStatus.active {
  background: rgba(158, 255, 214, 0.14);
  border: 1px solid rgba(158, 255, 214, 0.22);
  color: #9effd6;
}

.currentPlanInfoStatus.pastdue {
  background: rgba(255, 210, 138, 0.14);
  border: 1px solid rgba(255, 210, 138, 0.22);
  color: #ffd28a;
}

.currentPlanInfoDesc {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.74);
}

.currentPlanInfoRight {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.currentPlanInfoMeta {
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.currentPlanInfoMeta .metaLabel {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
}

.currentPlanInfoMeta strong {
  font-size: 14px;
  color: #fff;
}

@media (max-width: 900px) {
  .currentPlanInfoBar {
    flex-direction: column;
    align-items: flex-start;
  }

  .currentPlanInfoRight {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (min-width: 1900px) {
  .subscriptionPage {
    width: min(
      var(--page-content-width-ultra),
      calc(100vw - var(--page-content-gutter-ultra))
    );
    margin: var(--page-content-margin-top-ultra-default) auto 0;
    padding: 42px 34px;
    border-radius: 30px;
  }

  .subscriptionHero {
    max-width: 820px;
    margin: 0 auto 50px;
  }

  .subscriptionEyebrow {
    font-size: 12px;
    padding: 6px 15px;
  }

  .subscriptionHero h1 {
    font-size: 46px;
  }

  .subscriptionDesc {
    max-width: 620px;
    font-size: 16px;
  }

  .currentPlanInfoBar {
    margin: 22px 0 30px;
    padding: 20px 22px;
    border-radius: 22px;
  }

  .currentPlanInfoPlan {
    font-size: 26px;
  }

  .currentPlanInfoDesc {
    font-size: 15px;
  }

  .currentPlanInfoMeta {
    min-width: 132px;
    padding: 12px 14px;
  }

  .currentPlanInfoMeta strong {
    font-size: 15px;
  }

  .subscriptionGrid {
    gap: 22px;
  }

  .planCard {
    padding: 30px 24px 24px;
    border-radius: 24px;
  }

  .planName {
    font-size: 30px;
  }

  .price {
    font-size: 52px;
  }

  .currency {
    font-size: 19px;
  }

  .period {
    font-size: 14px;
  }

  .statChip {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .statVal {
    font-size: 22px;
  }

  .statLabel {
    font-size: 11px;
  }

  .featureList li {
    font-size: 14px;
  }

  .planBtn {
    height: 52px;
    font-size: 15px;
    border-radius: 12px;
  }

  .footerNote {
    margin-top: 36px;
    font-size: 14px;
  }
}
