/*!
 * UI Design & Front-End Architecture by Woomark Studio
 * Exclusive theme developed for synergyo2.com
 * Checkout (checkout.html). Loaded after styles.css + account.css (fields, type cards, focus mode).
 */
.checkout-page {
  --err: #c0392b;
  --ok: #3f8a00;
  --field-h: 52px;
  background: var(--mist);
}

.co {
  padding: 36px 0 88px;
}
.co-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  align-items: start;
}
.co-intro {
  margin-bottom: 22px;
}
.co-intro .btn-back {
  display: flex;
  width: fit-content;
  padding: 0 0 18px;
}
.co-intro .acc-title {
  margin-bottom: 0;
}

/* ============ SECTIONS (accordion steps) ============ */
.co-form {
  display: grid;
  gap: 14px;
}
.co-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px clamp(20px, 3.4vw, 36px);
  box-shadow: 0 14px 40px rgba(6, 23, 51, 0.05);
  transition:
    box-shadow 0.3s,
    border-color 0.3s;
}
.co-step.is-open {
  border-color: #c8d9ec;
  box-shadow: 0 20px 50px rgba(6, 23, 51, 0.08);
  padding-bottom: clamp(24px, 3.4vw, 36px);
}
.co-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.co-head h2 {
  flex: 1;
  margin: 0;
  font: 700 clamp(1.08rem, 1.8vw, 1.28rem) / 1.25 var(--head);
  letter-spacing: -0.02em;
  color: var(--navy);
}
.co-head h2:focus {
  outline: none;
}
.co-num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8eff7;
  color: var(--muted);
  font: 700 0.85rem var(--head);
  transition: background 0.3s;
}
.co-step.is-open .co-num {
  background: var(--blue2);
  color: #fff;
}
.co-step.is-done .co-num {
  background: var(--green);
  color: transparent;
  position: relative;
}
.co-step.is-done .co-num::after {
  content: "\f00c";
  font: var(--fa-font-solid);
  color: #fff;
  position: absolute;
  font-size: 0.8rem;
}
.co-step:not(.is-open):not(.is-done) .co-head h2 {
  color: #8a9bb0;
}
.co-edit {
  display: none;
  min-height: 44px;
  padding: 0 4px;
}
.co-step.is-done:not(.is-open) .co-edit {
  display: inline-block;
}
.co-recap {
  display: none;
  margin: 8px 0 0 46px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}
.co-step.is-done:not(.is-open) .co-recap {
  display: block;
}
.co-recap strong {
  color: var(--navy);
}
.co-body {
  margin-top: 22px;
}
.co-body:not([hidden]) {
  animation: stepIn 0.4s var(--ease) both;
}

/* Section 1 */
.co-signin {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--mist);
  font-size: 0.9rem;
}
.co-signin i {
  color: var(--blue2);
  margin-right: 8px;
}
.co-signin a,
.co-join a {
  color: var(--blue2);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.co-plans {
  margin-bottom: 6px;
}
.co-plans .type-card {
  padding: 18px;
}
.co-plan-price {
  margin-left: auto;
  font: 800 1rem var(--head);
  color: var(--navy);
  white-space: nowrap;
}
.co-plan-price s {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--muted);
  margin-right: 4px;
}
.co-plans .type-desc b {
  color: var(--blue2);
}
.co-plans .type-card:has(input[value="guest"]) .type-desc {
  margin-bottom: 0;
}
.co-fields {
  margin-top: 22px;
}
.co-join {
  margin: 18px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  text-align: center;
}

/* Section 2 */
.co-market {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--mist);
  font-size: 0.92rem;
}
.co-market .flag {
  width: 28px;
  height: 21px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(6, 23, 51, 0.08);
}
.co-market strong {
  color: var(--navy);
}
.co-market .text-link {
  margin-left: auto;
}
.co-ship {
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.co-ship legend {
  float: left;
  width: 100%;
  margin-bottom: 4px;
}
.co-ship-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 16px;
  border: 1.5px solid #d6e2ef;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.co-ship-opt:hover {
  border-color: #a9c3e2;
}
.co-ship-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.co-ship-opt:has(input:checked) {
  border-color: var(--blue2);
  background: #f7fbff;
}
.co-ship-opt:has(input:focus-visible) {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}
.co-ship-radio {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #b9cbe0;
  transition: border 0.2s;
}
.co-ship-opt:has(input:checked) .co-ship-radio {
  border: 7px solid var(--blue2);
}
.co-ship-copy {
  flex: 1;
}
.co-ship-copy strong {
  display: block;
  font: 700 0.95rem var(--head);
  color: var(--navy);
}
.co-ship-copy small {
  font-size: 0.82rem;
  color: var(--muted);
}
.co-ship-opt > b {
  font: 700 0.95rem var(--head);
  color: var(--navy);
}

/* Section 3 */
.co-secure {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  font-size: 0.86rem;
  color: var(--muted);
}
.co-secure > i {
  color: var(--green);
}
.co-cards {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
  font-size: 1.7rem;
  color: #8ea2ba;
}
.co-card {
  padding: 20px 20px 4px;
  border-radius: 16px;
  background: var(--mist);
  border: 1px solid var(--line);
  margin-bottom: 18px;
}
.co-card-num {
  position: relative;
}
.co-card-num input {
  padding-right: 52px !important;
  letter-spacing: 0.04em;
}
.co-card-num i {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.35rem;
  color: #8ea2ba;
}
.co-card-num i.is-brand {
  color: var(--navy);
}
.co-billing {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* Section 4 */
.co-review-note {
  margin: 0 0 16px;
  font-size: 0.92rem;
}
.co-review-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 18px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--mist);
  font: 700 1rem var(--head);
  color: var(--navy);
}
.co-review-total strong {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}
.co-review-pref {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--navy);
}
.co-review-pref i {
  color: var(--blue2);
}
.co-place {
  min-height: 58px;
  font-size: 0.86rem;
}
.co-fda {
  margin-top: 18px;
  font-size: 0.72rem;
  line-height: 1.5;
}

/* Empty bag + confirmation */
.co-empty,
.co-done {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 56px);
  box-shadow: 0 20px 50px rgba(6, 23, 51, 0.06);
  text-align: center;
}
.co-empty .acc-icon,
.co-done .acc-icon {
  margin: 0 auto 10px;
  width: 76px;
  height: 76px;
  font-size: 1.8rem;
}
.co-empty h2 {
  font: 700 1.6rem var(--head);
  color: var(--navy);
  margin: 10px 0 8px;
}
.co-done .acc-sub {
  margin-inline: auto;
}
.co-done-pref {
  max-width: 520px;
  margin: 16px auto 0;
  text-align: left;
}
.co-done-invite {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 560px;
  margin: 20px auto 0;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--ice);
  text-align: left;
}
.co-done-invite strong {
  font: 700 1rem var(--head);
  color: var(--navy);
}
.co-done-invite p {
  margin: 4px 0 0;
  font-size: 0.86rem;
}
.co-done-invite .btn {
  flex: 0 0 auto;
}

/* ============ SIDE · ORDER SUMMARY ============ */
.co-side {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 16px;
}
.co-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(6, 23, 51, 0.06);
  overflow: hidden;
}
.co-sum-toggle {
  display: none;
}
.co-sum-body {
  padding: 22px 24px 24px;
}
.co-sum-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.co-sum-head h2 {
  margin: 0;
  font: 700 1.1rem var(--head);
  color: var(--navy);
}
.co-items {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  max-height: 360px;
  overflow: auto;
}
.co-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.co-thumb {
  position: relative;
  width: 56px;
  height: 64px;
  border-radius: 12px;
  background: var(--mist);
  display: grid;
  place-items: center;
}
.co-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.co-thumb b {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--navy);
  color: #fff;
  font: 700 0.7rem/22px var(--head);
  text-align: center;
}
.co-item strong {
  display: block;
  font: 700 0.9rem var(--head);
  color: var(--navy);
}
.co-item small {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}
.co-item > span:last-child {
  font: 700 0.9rem var(--head);
  color: var(--navy);
}
.co-summary .pref-switch {
  margin: 0 0 14px;
}
.co-summary .summary-row {
  font-size: 0.88rem;
}
.co-summary .summary-row.total {
  font-size: 1.15rem;
}
.co-tax {
  margin: 10px 0 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: #8292a5;
}
.co-help .side-secure {
  margin-top: 14px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .co-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
  }
}
@media (max-width: 940px) {
  /* One column: summary (collapsible) on top → sections → help */
  .co-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .co-side {
    display: contents;
  }
  .co-summary {
    order: -1;
    border-radius: 18px;
  }
  .co-help {
    order: 1;
  }
  .co-sum-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    border: 0;
    background: #fff;
    font: 600 0.9rem var(--head);
    color: var(--blue2);
    cursor: pointer;
    text-align: left;
  }
  .co-sum-toggle > span {
    flex: 0 1 auto;
  }
  .co-sum-toggle strong {
    margin-left: auto;
    font: 800 1.08rem var(--head);
    color: var(--navy);
  }
  .co-sum-chev {
    font-size: 0.75rem;
    transition: transform 0.3s var(--ease);
  }
  .co-sum-toggle[aria-expanded="true"] .co-sum-chev {
    transform: rotate(180deg);
  }
  .co-sum-hide,
  .co-sum-toggle[aria-expanded="true"] .co-sum-show {
    display: none;
  }
  .co-sum-toggle[aria-expanded="true"] .co-sum-hide {
    display: inline;
  }
  .co-sum-body {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px 18px 20px;
  }
  .co-summary.is-expanded .co-sum-body {
    display: block;
  }
  .co-sum-head h2 {
    font-size: 1rem;
  }
  .co-items {
    max-height: none;
  }
}
@media (max-width: 620px) {
  .co {
    padding: 16px 0 56px;
  }
  .wrap.co-grid {
    width: calc(100% - 24px);
  }
  .co-intro {
    margin-bottom: 14px;
  }
  .co-intro .acc-title {
    font-size: 1.9rem;
  }
  .co-step {
    border-radius: 18px;
    padding: 18px 16px;
  }
  .co-step.is-open {
    padding-bottom: 22px;
  }
  .co-recap {
    margin-left: 0;
  }
  .co-plans .type-card {
    padding: 14px;
  }
  .co-plans .type-head {
    row-gap: 4px;
  }
  .co-plan-price {
    margin-left: 0;
    width: 100%;
  }
  .co-card {
    padding: 16px 14px 2px;
  }
  .co-cards {
    margin-left: 0;
    width: 100%;
  }
  .co-done-invite {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .co-body:not([hidden]) {
    animation: none;
  }
}

/* ============ 4 BUYER TYPES (12 nov, 19:40) ============ */
.co-signin-bo {
  display: block;
  margin-top: 4px;
  padding-left: 24px;
  font-size: 0.82rem;
  color: var(--muted);
}
.co-plan-price small {
  font-weight: 600;
  font-size: 0.74rem;
  color: var(--muted);
}
.co-guest {
  border-style: dashed;
}
.co-guest:has(input:checked) {
  border-style: solid;
}
.co-kit {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 14px 0 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--ice);
  border: 1px solid #cfe2f8;
}
.co-kit img {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
}
.co-kit-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  color: var(--blue2);
  font-size: 1.1rem;
}
.co-kit strong {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font: 700 0.95rem var(--head);
  color: var(--navy);
}
.co-kit p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
}
.co-kit-tag {
  padding: 3px 10px;
  border-radius: 20px;
  background: #eef6dc;
  color: #4d6a00;
  font: 700 0.66rem var(--head);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.co-pack-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.co-pack-links a {
  padding: 6px 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #cfe2f8;
  font: 600 0.8rem var(--head);
  color: var(--blue2);
}
.co-pack-links a:hover {
  border-color: var(--blue2);
}
/* Groups inside section 1: the first visible one depends on the type → no top rules, just spacing */
.co-fields .form-group {
  border-top: 0;
  padding-top: 0;
  margin: 0 0 8px;
}
.co-fields .form-group + .form-group:not([hidden]) {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.co-fields .legal-note {
  margin: -6px 0 12px;
}
.co-addr-note {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: -6px 0 16px;
}
.co-addr-note i {
  color: var(--blue2);
}
.co-kit-line {
  border-bottom: 1px solid var(--line);
  margin-top: -16px;
  margin-bottom: 16px;
}
.co-tbd {
  font: 600 0.76rem var(--head) !important;
  color: var(--muted) !important;
  text-align: right;
}
@media (max-width: 620px) {
  .co-signin-bo {
    padding-left: 0;
  }
  .co-kit {
    gap: 12px;
    padding: 12px;
  }
  .co-kit img {
    width: 52px;
    height: 52px;
  }
}
/* A pair with one field hidden (e.g. Business: phone without date of birth) → full width */
.co-fields .field-pair:has(> .field[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}
/* Starter Kit as a recommendation (checkbox card) */
.co-kit-opt {
  position: relative;
  cursor: pointer;
  background: #fff;
  border: 1.5px dashed #a9c3e2;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.co-kit-opt:hover {
  border-color: var(--blue2);
}
.co-kit-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.co-kit-opt:has(input:checked) {
  border-style: solid;
  border-color: var(--blue2);
  background: var(--ice);
}
.co-kit-opt:has(input:focus-visible) {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}
.co-kit-copy {
  flex: 1;
  min-width: 0;
}
.co-kit-p {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.co-kit-check {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: 8px;
  border: 2px solid #b9cbe0;
  background: #fff;
  color: transparent;
  font-size: 0.8rem;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.co-kit-opt:has(input:checked) .co-kit-check {
  background: var(--blue2);
  border-color: var(--blue2);
  color: #fff;
}
.co-kit-later {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.co-kit-later i {
  color: var(--blue2);
}
/* Kit / pack panels sit right under their card */
.co-plans .co-kit {
  margin: -6px 0 0 24px;
}
.co-plans .co-kit-later {
  margin: -6px 0 0 24px;
}
@media (max-width: 620px) {
  .co-plans .co-kit,
  .co-plans .co-kit-later {
    margin-left: 12px;
  }
}
