/* =============================================
   checkout.css — extracted from checkout.ejs
   ============================================= */
/* ══════════════════════════════════════════
   FULLSCREEN CHECKOUT — three-column layout
   ══════════════════════════════════════════ */

#checkout-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #070810;
  overflow: hidden;
}

#checkout-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

/* ── Topbar ──────────────────────────────── */
#co-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  height: 56px;
  flex-shrink: 0;
  background: rgba(7,8,16,.96);
  border-bottom: 1px solid rgba(255,255,255,.05);
  backdrop-filter: blur(8px);
}

#co-topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

#co-topbar-brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  flex-shrink: 0;
}

#co-topbar-brand span {
  font-size: .85rem;
  font-weight: 700;
  color: #6a6f90;
  letter-spacing: .01em;
}

/* invisible elements for JS compat */
#co-plan-label    { display: none; }
#co-topbar-spacer { flex: 1; }

#co-close {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.08);
  color: #5a5e7a;
  border-radius: 8px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
  flex-shrink: 0;
  font-family: inherit;
}

#co-close:hover {
  background: rgba(237,66,69,.08);
  border-color: rgba(237,66,69,.25);
  color: #ed4245;
}

/* ── Brand panel ─────────────────────────── */
#co-brand-panel {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(170deg, #0d0f26 0%, #090a15 55%, #0b0c1e 100%);
  border-right: 1px solid rgba(88,101,242,.1);
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
}

.co-bp-glow-top {
  position: absolute;
  top: -120px;
  left: -80px;
  width: 380px;
  height: 380px;
  background: radial-gradient(ellipse, rgba(88,101,242,.15) 0%, transparent 68%);
  pointer-events: none;
}

.co-bp-glow-bottom {
  position: absolute;
  bottom: -80px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(129,140,248,.08) 0%, transparent 68%);
  pointer-events: none;
}

#co-brand-panel .co-bp-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  z-index: 1;
  margin-bottom: auto;
}

#co-brand-panel .co-bp-logo img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

#co-brand-panel .co-bp-logo span {
  font-size: .88rem;
  font-weight: 700;
  color: #8890b8;
}

.co-bp-plan-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 32px 0;
}

.co-bp-eyebrow {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: #5865f2;
  margin-bottom: 10px;
}

#co-left-plan-name {
  font-size: 1.9rem;
  font-weight: 900;
  color: #e4e6f8;
  line-height: 1.1;
  margin-bottom: 4px;
}

#co-bp-billing {
  font-size: .8rem;
  color: #5865f2;
  margin-bottom: 24px;
  font-weight: 500;
}

.co-bp-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.co-bp-feature {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .82rem;
  color: #6a6f90;
  line-height: 1.4;
}

.co-bp-feature i {
  width: 15px;
  text-align: center;
  font-size: .75rem;
  color: #5865f2;
  flex-shrink: 0;
}

.co-bp-footer {
  font-size: .69rem;
  color: #282b40;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

/* ── Body ────────────────────────────────── */
#co-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ── Left — server selection ─────────────── */
#co-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0a0b16;
}

#co-left-header {
  padding: 28px 32px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

#co-left-header h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #d8daf0;
  margin-bottom: 3px;
}

#co-left-header p {
  font-size: .82rem;
  color: #40445e;
}

#co-left-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 32px 28px;
}

#co-left-scroll::-webkit-scrollbar { width: 4px; }
#co-left-scroll::-webkit-scrollbar-track { background: transparent; }
#co-left-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.06); border-radius: 2px; }

/* Loading / error states */
#co-loading {
  text-align: center;
  padding: 52px 0;
  color: #3a3e58;
  font-size: .87rem;
}

#co-loading i { color: #5865f2; margin-right: 8px; }

#co-no-guilds {
  background: rgba(237,66,69,.06);
  border: 1px solid rgba(237,66,69,.15);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: .83rem;
  color: #c0404a;
  line-height: 1.5;
}

#co-section-available { }

#co-guild-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Guild cards — styled via JS class */
.co-guild-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  position: relative;
}

.co-guild-card:hover {
  background: rgba(88,101,242,.06);
  border-color: rgba(88,101,242,.25);
}

.co-guild-card.selected {
  background: rgba(88,101,242,.1);
  border-color: rgba(88,101,242,.55);
}

.co-guild-card .co-gc-icon img,
.co-guild-card .co-gc-icon-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.co-guild-card .co-gc-icon-placeholder {
  background: #1e2038;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: #818cf8;
}

.co-guild-card .co-gc-info {
  flex: 1;
  min-width: 0;
}

.co-guild-card .co-gc-name {
  font-size: .9rem;
  font-weight: 600;
  color: #d8daf0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.co-guild-card .co-gc-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.12);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
}

.co-guild-card.selected .co-gc-check {
  background: #5865f2;
  border-color: #5865f2;
}

.co-guild-card .co-gc-check i {
  font-size: .6rem;
  color: transparent;
  transition: color .15s;
}

.co-guild-card.selected .co-gc-check i { color: #fff; }

/* Already-managed guilds */
.co-guild-card.managed {
  opacity: .5;
  cursor: default;
  pointer-events: none;
}

.co-guild-card.managed .co-gc-plan {
  font-size: .72rem;
  color: #43b581;
  font-weight: 600;
  margin-left: auto;
  margin-right: 8px;
}

.co-guilds-divider {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #2a2d42;
  margin: 14px 0 8px;
}

/* ── Right — checkout panel ──────────────── */
#co-right {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #0d0e1c;
  border-left: 1px solid rgba(255,255,255,.05);
  overflow: hidden;
}

#co-right-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px 22px 16px;
}

#co-right-scroll::-webkit-scrollbar { width: 3px; }
#co-right-scroll::-webkit-scrollbar-track { background: transparent; }
#co-right-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.06); border-radius: 2px; }

/* Order summary card */
.co-summary-card {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

.co-summary-card-title {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #383d5a;
  margin-bottom: 14px;
}

#co-sum-plan {
  font-size: 1rem;
  font-weight: 800;
  color: #d8daf0;
  margin-bottom: 2px;
}

#co-sum-billing {
  font-size: .75rem;
  color: #40445e;
  margin-bottom: 14px;
}

.co-price-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.co-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-top: 1px solid rgba(255,255,255,.04);
  font-size: .82rem;
}

.co-price-row span:first-child { color: #484d68; }
.co-price-row span:last-child  { color: #9ca3bc; font-weight: 500; }

.co-price-row.co-total-row {
  margin-top: 4px;
  padding-top: 11px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.co-price-row.co-total-row span:first-child {
  font-size: .84rem;
  font-weight: 700;
  color: #7880a8;
}

.co-price-row.co-total-row span:last-child {
  font-size: .95rem;
  font-weight: 800;
  color: #e0e2f0;
}

.co-referral-badge {
  font-size: .7rem;
  color: #43b581;
  background: rgba(67,181,129,.08);
  border: 1px solid rgba(67,181,129,.18);
  border-radius: 4px;
  padding: 1px 6px;
}

/* Section labels */
.co-right-section {
  margin-bottom: 14px;
}

.co-right-section-title {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #303452;
  margin-bottom: 10px;
}

/* Referral input */
#co-referral-section {
  margin-bottom: 14px;
}

.co-ref-row {
  display: flex;
  gap: 7px;
}

#co-ref-input {
  flex: 1;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  color: #d0d2e8;
  padding: 9px 12px;
  font-size: .82rem;
  font-family: 'Courier New', monospace;
  outline: none;
  text-transform: uppercase;
  transition: border-color .15s;
  min-width: 0;
}

#co-ref-input:focus { border-color: rgba(88,101,242,.4); }
#co-ref-input::placeholder { color: #2e3250; font-family: inherit; }

#co-ref-validate {
  padding: 9px 13px;
  background: rgba(88,101,242,.08);
  border: 1px solid rgba(88,101,242,.15);
  color: #6b77e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  font-family: inherit;
  transition: background .15s;
}

#co-ref-validate:hover { background: rgba(88,101,242,.14); }
#co-ref-validate:disabled { opacity: .5; cursor: default; }

#co-ref-status {
  font-size: .76rem;
  margin-top: 7px;
  padding: 6px 10px;
  border-radius: 7px;
}

/* ToS section */
#co-tos-section { margin-bottom: 14px; }

.co-tos-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  margin-bottom: 9px;
}

.co-tos-row:last-child { margin-bottom: 0; }

.co-tos-row input[type="checkbox"] {
  margin-top: 2px;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  accent-color: #5865f2;
  cursor: pointer;
}

.co-tos-row span {
  font-size: .8rem;
  color: #5a5e7a;
  line-height: 1.5;
}

.co-tos-row a { color: #5865f2; text-decoration: none; }
.co-tos-row a:hover { text-decoration: underline; }

/* Server hint */
#co-server-hint {
  font-size: .77rem;
  color: #303454;
  text-align: center;
  padding: 6px 0 2px;
}

/* Error */
#co-error {
  background: rgba(237,66,69,.07);
  border: 1px solid rgba(237,66,69,.18);
  border-radius: 9px;
  padding: 10px 13px;
  font-size: .8rem;
  color: #c0404a;
  margin-bottom: 12px;
  line-height: 1.45;
}

/* ── Right footer — always pinned ────────── */
#co-right-footer {
  flex-shrink: 0;
  padding: 14px 22px 20px;
  border-top: 1px solid rgba(255,255,255,.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#co-proceed {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #5865f2 0%, #6b77e0 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  opacity: .35;
  transition: opacity .2s, transform .1s;
  letter-spacing: .01em;
}

#co-proceed:not(:disabled) { opacity: 1; }
#co-proceed:not(:disabled):hover { transform: translateY(-1px); }
#co-proceed:not(:disabled):active { transform: translateY(0); }
#co-proceed:disabled { cursor: default; }

#co-cancel {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.07);
  color: #3e4260;
  border-radius: 10px;
  cursor: pointer;
  font-size: .84rem;
  font-family: inherit;
  transition: background .15s, color .15s, border-color .15s;
}

#co-cancel:hover {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.12);
  color: #72768a;
}

/* Trust items */
.co-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 10px;
}

.co-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .68rem;
  color: #22253a;
}

.co-trust-item i { font-size: .65rem; }

/* ── Responsive ─────────────────────────── */
@media (max-width: 900px) {
  #co-brand-panel { display: none; }
}

@media (max-width: 680px) {
  #co-body { flex-direction: column; }

  #co-left { flex: none; height: 45%; border-bottom: 1px solid rgba(255,255,255,.05); }
  #co-left-scroll { padding: 14px 16px; }
  #co-left-header { padding: 16px 16px 10px; }

  #co-right { width: 100%; flex: 1; border-left: none; }
  #co-right-scroll { padding: 14px 16px 10px; }
  #co-right-footer { padding: 12px 16px 16px; }

  #co-topbar { padding: 0 16px; }
}
