/* =========================================================
   HEDGEFUNDING — INSTITUTIONAL CHECKOUT CSS
   ========================================================= */

/* Main Constraints & Breathing Room */
.pf-chk-main {
  max-width: 740px;
  margin: 44px auto 88px;
  padding: 0 24px;
}

.pf-chk-step {
  display: none;
  animation: chkFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pf-chk-step.active {
  display: block;
}

.pf-fade-in {
  animation: chkFade 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chkFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header Utilities */
.pf-chk-live-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.pf-chk-live-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.pf-chk-live-price {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold-500);
}

/* Section Spacing & Typography Utilities */
.pf-chk-margin {
  margin-bottom: 36px;
}

.pf-chk-block {
  margin-bottom: 36px;
}

.pf-chk-section-title {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.pf-chk-view-tabs {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.pf-chk-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* Platform Card (WebTrader) */
.pf-chk-platform-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: 18px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all 0.25s ease;
}

.pf-chk-platform-card.active {
  border-color: var(--accent-gold-500);
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pf-chk-plat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-gold-100);
  color: var(--accent-gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pf-chk-plat-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

/* Summary Box */
.pf-chk-summary-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  margin-top: 8px;
}

.pf-chk-summary-top {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.pf-chk-summary-label {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.pf-chk-summary-price {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Quantity Row & Controls */
.pf-chk-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 16px 20px;
}

.pf-chk-qty-label {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
}

.pf-chk-qty-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pf-chk-max-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pf-chk-max-badge svg {
  color: var(--accent-gold-500);
}

.pf-chk-max-badge strong {
  font-family: var(--font-mono);
  color: var(--text-dark);
  font-weight: 800;
}

.pf-chk-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-card);
  padding: 4px;
  gap: 4px;
}

.pf-chk-stepper button {
  width: 38px;
  height: 38px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-body);
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-chk-stepper button:hover {
  background: var(--accent-gold-100);
  color: var(--accent-gold-500);
  border-color: rgba(244, 180, 26, 0.3);
}

.pf-chk-stepper span {
  min-width: 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
}

.pf-chk-actions {
  margin-bottom: 32px;
}

/* Perks */
.pf-chk-perks {
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.pf-chk-perk-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-light);
}

.pf-chk-perk-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pf-chk-perk-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--accent-gold-500);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pf-chk-perk-text h4 {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.pf-chk-perk-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Step 2: Auth Flow */
.pf-chk-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 28px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.pf-chk-back-btn:hover {
  color: var(--accent-gold-500);
  border-color: var(--accent-gold-500);
  transform: translateX(-2px);
}

.pf-chk-basket-header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 36px;
}

.pf-chk-basket-header .pf-title-xl {
  font-size: 2.1rem;
  letter-spacing: -0.02em;
}

/* Guest / Login Card */
.pf-chk-auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  overflow: visible;
  box-shadow: var(--shadow-card);
  margin-bottom: 44px;
  position: relative;
  z-index: 10;
}

.pf-chk-auth-pane {
  display: none;
}

.pf-chk-auth-pane.active {
  display: block;
}

.pf-chk-auth-head {
  padding: 30px 32px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-soft);
  border-radius: 24px 24px 0 0;
}

.pf-chk-auth-head h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.pf-chk-auth-head p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.pf-chk-auth-body {
  padding: 32px;
  animation: chkFade 0.25s ease;
}

.pf-chk-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-dark);
  letter-spacing: 0.2px;
}

.pf-req {
  color: #EF4444;
  margin-left: 3px;
}

.pf-chk-label-sm {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.pf-chk-input {
  width: 100%;
  background: var(--bg-page);
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  padding: 15px 18px;
  font-size: 0.98rem;
  color: var(--text-dark);
  transition: all 0.2s ease;
  outline: none;
}

.pf-chk-input:focus {
  border-color: var(--accent-gold-500);
  box-shadow: 0 0 0 3px rgba(244, 180, 26, 0.12);
}

/* Progressive Locked Rows (Used for Logged In User & Guest Data) */
.pf-chk-locked-box {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
}

.pf-chk-locked-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
}

.pf-chk-locked-row:last-child {
  border-bottom: none;
}

.pf-chk-locked-row strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* =========================================================
   CUSTOM COUNTRY PICKER (MATCHES DARK THEME)
   ========================================================= */
.country-picker-group {
  position: relative;
  width: 100%;
}

.pf-chk-select {
  cursor: pointer;
  background-image: url('data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%2394A3B8" stroke-width="2" stroke-linecap="round"><polyline points="6 9 12 15 18 9"/></svg>');
  background-repeat: no-repeat;
  background-position: right 18px center;
}

.country-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  z-index: 100;
  flex-direction: column;
  overflow: hidden;
  max-height: 320px;
}

.country-picker-group.open .country-dropdown {
  display: flex;
}

.country-search-wrap {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-soft);
  position: sticky;
  top: 0;
  z-index: 2;
}

.country-search {
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 32px 8px 36px;
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
  background-image: url('data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%2394A3B8" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>');
  background-repeat: no-repeat;
  background-position: left 10px center;
}

.country-search::placeholder {
  color: var(--text-muted);
}

.country-list {
  overflow-y: auto;
  flex: 1;
  background: var(--bg-card);
}

.country-item {
  padding: 13px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: background 0.15s ease;
}

.country-item:hover,
.country-item.selected {
  background: var(--bg-soft);
}

.country-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.pf-chk-submit {
  margin-top: 28px;
}

.pf-chk-auth-foot {
  padding: 24px 32px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-soft);
  border-radius: 0 0 24px 24px;
}

.pf-chk-secure-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pf-chk-secure-note svg {
  color: var(--accent-teal-500);
}

.pf-chk-auth-foot p {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-body);
}

.pf-chk-text-btn {
  color: var(--accent-gold-500);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: 0.9rem;
  border: none;
  background: transparent;
  padding: 0;
}

/* Order Summary (Static) */
.pf-chk-basket-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.pf-chk-basket-item {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: 20px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
}

.pf-chk-bi-title {
  font-size: 1.18rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

.pf-chk-bi-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pf-chk-bi-right {
  text-align: right;
  flex-shrink: 0;
}

.pf-chk-bi-price {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-gold-500);
  margin-bottom: 6px;
}

.pf-chk-bi-qty {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

/* Mobile Responsive Refinements */
@media (max-width: 600px) {
  .pf-chk-main {
    margin: 24px auto 64px;
    padding: 0 16px;
  }
  .pf-chk-summary-panel,
  .pf-chk-auth-body,
  .pf-chk-auth-head,
  .pf-chk-auth-foot {
    padding: 24px 20px;
  }
  .pf-chk-summary-price {
    font-size: 2.1rem;
  }
  .pf-chk-grid-2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pf-chk-basket-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
  .pf-chk-bi-right {
    text-align: left;
    width: 100%;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .pf-chk-bi-price {
    margin-bottom: 0;
  }
}
