/* CocoBright Subscribe & Save — product-page selector.
   Scoped under .cb-sub. Pulls The7 theme's own CSS variables so it matches the site
   (accent #1ebbf0, blue->green gradient, square corners) and tracks future theme changes. */
.cb-sub {
  --cb-blue: var(--the7-accent-color, #1ebbf0);
  --cb-blue-dk: var(--the7-btn-hover-bg-color, #23aadd);
  --cb-grad: var(--the7-accent-gradient, 135deg, #1ebbf0 30%, #39dfaa 100%);
  --cb-grad-hover: var(--the7-btn-hover-bg-color-2, 135deg, #23aadd 30%, #37ce9d 100%);
  --cb-green: #2bbf94;
  --cb-ink: var(--the7-h1-color, #2a3b47);
  --cb-muted: #6b7c88;
  --cb-line: #dfe6eb;
  --cb-soft: #eaf7fd;        /* light blue tint */
  --cb-soft-green: #e9faf3;  /* light green tint */
  --cb-radius: var(--the7-base-border-radius, 0px); /* theme is square */
  font: inherit;
  color: var(--cb-ink);
  margin: 0 0 1.5rem;
  max-width: 480px;
}

.cb-sub__q {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--cb-muted);
  margin: 0 0 .6rem;
}

/* Two selectable cards */
.cb-sub__opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
@media (max-width: 380px) {
  .cb-sub__opts { grid-template-columns: 1fr; }
}

.cb-sub__opt {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .95rem 1rem .9rem 2.45rem;
  border: 2px solid var(--cb-line);
  border-radius: 0 !important; /* square; !important beats theme rounding of cards/inputs */
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  margin: 0;
}
.cb-sub__opt:hover { border-color: #b9dff2; }
.cb-sub__opt input { position: absolute; opacity: 0; pointer-events: none; }

/* Selection indicator */
.cb-sub__check {
  position: absolute;
  left: .9rem; top: 1.05rem;
  width: 18px; height: 18px;
  border: 2px solid #c4cfd6;
  border-radius: 50%;
  transition: border-color .15s ease;
}
.cb-sub__check::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--cb-blue);
  transform: scale(0);
  transition: transform .15s cubic-bezier(.4,1.4,.6,1);
}

.cb-sub__opt-name { font-weight: 700; font-size: .96rem; line-height: 1.2; }
.cb-sub__opt-price { font-weight: 800; font-size: 1.1rem; color: var(--cb-ink); }
.cb-sub__opt-price small { font-weight: 600; font-size: .72rem; color: var(--cb-muted); }

/* Selected: one-time = blue */
.cb-sub__opt.is-selected {
  border-color: var(--cb-blue);
  background: var(--cb-soft);
}
.cb-sub__opt.is-selected .cb-sub__check { border-color: var(--cb-blue); }
.cb-sub__opt.is-selected .cb-sub__check::after { transform: scale(1); }

/* Selected: subscribe = green end of the brand gradient */
.cb-sub__opt--sub.is-selected {
  border-color: var(--cb-green);
  background: var(--cb-soft-green);
}
.cb-sub__opt--sub.is-selected .cb-sub__check { border-color: var(--cb-green); }
.cb-sub__opt--sub.is-selected .cb-sub__check::after { background: var(--cb-green); }

.cb-sub__badge {
  position: absolute;
  top: 0; right: 0;
  background: linear-gradient(var(--cb-grad));
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .22rem .5rem;
  border-radius: 0 !important; /* sharp, matches theme */
}

/* Reveal panel */
.cb-sub__panel {
  margin-top: .8rem;
  padding: 1rem 1.05rem;
  border-radius: 0 !important; /* square; !important beats theme rounding of cards/inputs */
  background: var(--cb-soft-green);
  border: 2px solid #c6efe0;
  animation: cb-fade .2s ease both;
}
.cb-sub__panel[hidden] { display: none; }
@keyframes cb-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.cb-sub__freq {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  font-size: .94rem;
  margin: 0 0 .8rem;
}
.cb-sub__freq select {
  flex: 1;
  padding: .6rem .8rem;
  border: 2px solid #b6e8d8;
  border-radius: 0 !important; /* square; !important beats theme rounding of cards/inputs */
  background: #fff;
  font: inherit;
  font-weight: 600;
  color: var(--cb-ink);
  cursor: pointer;
}
.cb-sub__freq select:focus { outline: none; border-color: var(--cb-green); }

.cb-sub__btn {
  display: block;
  width: 100%;
  padding: .9rem 1rem;
  border: 0;
  border-radius: 0 !important; /* square; !important beats theme rounding of cards/inputs */
  background: linear-gradient(var(--cb-grad));
  color: var(--the7-btn-color, #fff);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter .15s ease;
}
.cb-sub__btn:hover { background: linear-gradient(var(--cb-grad-hover)); }
.cb-sub__btn:disabled { opacity: .65; cursor: default; }

.cb-sub__note {
  margin: .7rem 0 0;
  text-align: center;
  font-size: .8rem;
  color: var(--cb-muted);
}
