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

/* Main Constraints */
.pf-chk-main { max-width: 680px; margin: 32px auto 60px; padding: 0 16px; }
.pf-chk-step { display: none; animation: chkFade 0.25s ease; }
.pf-chk-step.active { display: block; }
.pf-fade-in { animation: chkFade 0.25s ease; }
@keyframes chkFade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Header Utilities */
.pf-chk-live-meta { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.pf-chk-live-title { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.pf-chk-live-price { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 800; color: var(--accent-gold-500); }

/* Utilities */
.pf-chk-margin { margin-bottom: 28px; }
.pf-chk-block { margin-bottom: 28px; }
.pf-chk-section-title { text-align: center; font-size: 1.15rem; font-weight: 800; color: var(--text-dark); margin-bottom: 16px; }
.pf-chk-view-tabs { margin-bottom: 24px; display: flex; flex-direction: column; gap: 12px; align-items: center;}
.pf-chk-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Platform Card (WebTrader) */
.pf-chk-platform-card { background: var(--bg-card); border: 1.5px solid var(--border-light); border-radius: 16px; padding: 16px 20px; display: flex; align-items: center; gap: 14px; transition: var(--transition); }
.pf-chk-platform-card.active { border-color: var(--accent-gold-500); box-shadow: var(--shadow-brand); }
.pf-chk-plat-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-gold-100); color: var(--accent-gold-500); display: flex; align-items: center; justify-content: center; }
.pf-chk-plat-name { font-size: 1.1rem; font-weight: 800; color: var(--text-dark); }

/* Summary Box */
.pf-chk-summary-panel { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 20px; padding: 28px 24px; box-shadow: var(--shadow-card); }
.pf-chk-summary-top { margin-bottom: 24px; }
.pf-chk-summary-label { display: block; font-size: 0.95rem; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; }
.pf-chk-summary-price { font-family: var(--font-mono); font-size: 2.4rem; font-weight: 800; color: var(--text-dark); line-height: 1; }

.pf-chk-qty-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.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: 12px; }
.pf-chk-max-badge { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border-light); border-radius: 10px; padding: 8px 12px; font-size: 0.85rem; 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: 10px; background: var(--bg-soft); padding: 2px; }
.pf-chk-stepper button { width: 36px; height: 36px; font-size: 1.2rem; font-weight: 600; color: var(--text-body); border-radius: 8px; cursor: pointer; transition: var(--transition); }
.pf-chk-stepper button:hover { background: var(--bg-card); color: var(--accent-gold-500); }
.pf-chk-stepper span { min-width: 32px; text-align: center; font-family: var(--font-mono); font-weight: 800; color: var(--text-dark); }

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

/* Perks */
.pf-chk-perks { border-top: 1px solid var(--border-light); padding-top: 8px; }
.pf-chk-perk-item { display: flex; align-items: flex-start; gap: 16px; padding: 20px 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: 44px; height: 44px; border-radius: 50%; background: var(--bg-soft); color: var(--text-dark); 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.95rem; font-weight: 800; margin-bottom: 6px; }
.pf-chk-perk-text p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.55; }

/* Step 2: Auth Flow */
.pf-chk-back-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; color: var(--text-muted); cursor: pointer; margin-bottom: 24px; transition: var(--transition); background: transparent; border: none; }
.pf-chk-back-btn:hover { color: var(--accent-gold-500); }
.pf-chk-basket-header { padding-bottom: 20px; border-bottom: 1px solid var(--border-light); margin-bottom: 32px; }
.pf-chk-basket-header .pf-title-xl { font-size: 2.2rem; }

/* Guest / Login Card */
.pf-chk-auth-box { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 20px; overflow: visible; box-shadow: var(--shadow-card); margin-bottom: 40px; position: relative; z-index: 10;}
.pf-chk-auth-pane { display: none; }
.pf-chk-auth-pane.active { display: block; }
.pf-chk-auth-head { padding: 28px 24px; border-bottom: 1px solid var(--border-light); background: var(--bg-soft); border-radius: 20px 20px 0 0;}
.pf-chk-auth-head h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.pf-chk-auth-head p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

.pf-chk-auth-body { padding: 28px 24px; animation: chkFade 0.2s ease; }
.pf-chk-label { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 8px; color: var(--text-dark); }
.pf-req { color: #EF4444; margin-left: 2px; }
.pf-chk-label-sm { display: block; font-size: 0.76rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.pf-chk-input { width: 100%; background: var(--bg-page); border: 1.5px solid var(--border-light); border-radius: 12px; padding: 14px 16px; font-size: 1rem; color: var(--text-dark); transition: var(--transition); outline: none; }
.pf-chk-input:focus { border-color: var(--accent-gold-500); }

/* 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: 12px; margin-bottom: 24px; display: flex; flex-direction: column; }
.pf-chk-locked-row { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--border-light); }
.pf-chk-locked-row:last-child { border-bottom: none; }
.pf-chk-locked-row strong { font-size: 0.95rem; 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 16px center; }

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

.country-search-wrap {
    padding: 10px;
    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 10px;
    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;
    padding-left: 34px;
}
.country-search::placeholder { color: var(--text-muted); }

.country-list {
    overflow-y: auto;
    flex: 1;
    background: var(--bg-card);
}
.country-item {
    padding: 12px 16px;
    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.1rem;
    line-height: 1;
}

.pf-chk-submit { margin-top: 24px; }
.pf-chk-auth-foot { padding: 20px 24px; border-top: 1px solid var(--border-light); text-align: center; display: flex; flex-direction: column; gap: 16px; background: var(--bg-soft); border-radius: 0 0 20px 20px;}
.pf-chk-secure-note { display: inline-flex; align-items: center; justify-content: center; gap: 10px; 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.9rem; font-weight: 600; color: var(--text-body); }
.pf-chk-text-btn { color: var(--accent-gold-500); font-weight: 800; text-decoration: underline; 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: 20px; }
.pf-chk-basket-item { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 18px; padding: 20px; display: flex; align-items: flex-start; justify-content: space-between; transition: var(--transition); }
.pf-chk-bi-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; color: var(--text-dark); }
.pf-chk-bi-sub { font-size: 0.85rem; color: var(--text-muted); }
.pf-chk-bi-right { text-align: right; }
.pf-chk-bi-price { display: block; font-family: var(--font-mono); font-size: 1.25rem; font-weight: 800; color: var(--accent-gold-500); margin-bottom: 4px; }
.pf-chk-bi-qty { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
