/* ===========================================================================
   Ebook Delivery — front-end popup & buy button
   Brand: gold #F2C200 · gold-deep #D9A900 · green #5CB02E · navy #1C2230
   =========================================================================== */
.ebd-btn-buy,
.ebd-popup *,
.ebd-overlay { box-sizing: border-box; }

/* ── Buy Now Button ─────────────────────────────────────────────────────────── */
.ebd-btn-buy {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: #F2C200;
    color: #1C2230;
    border: none;
    padding: .9rem 2.2rem;
    border-radius: 8px;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 6px 0 #D9A900;
    letter-spacing: .01em;
}
.ebd-btn-buy:hover  { transform: translateY(-2px); box-shadow: 0 8px 0 #D9A900; }
.ebd-btn-buy:active { transform: translateY(2px);  box-shadow: 0 3px 0 #D9A900; }
.ebd-btn-buy .ebd-btn-price {
    background: #1C2230; color: #F2C200;
    font-size: .82rem; font-weight: 800;
    padding: .15rem .5rem; border-radius: 5px; letter-spacing: .02em;
}

/* ── Overlay ────────────────────────────────────────────────────────────────── */
.ebd-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(28,34,48,.7);
    backdrop-filter: blur(4px);
    z-index: 9998;
    animation: ebdFadeIn .2s ease;
}
.ebd-overlay.active { display: block; }

/* ── Popup ──────────────────────────────────────────────────────────────────── */
.ebd-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%);
    background: #fff;
    border-radius: 18px;
    padding: 2.5rem 2rem;
    width: 90%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 32px 80px rgba(28,34,48,.28);
    border-top: 5px solid #F2C200;
}
.ebd-popup.active { display: block; animation: ebdSlideUp .25s ease; }



@keyframes ebdFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes ebdSlideUp { from { opacity: 0; transform: translate(-50%,-44%); } to { opacity: 1; transform: translate(-50%,-50%); } }

/* ── Close button ───────────────────────────────────────────────────────────── */
.ebd-close {
    position: absolute;
    top: 1rem; right: 1.1rem;
    background: #f3f4f1;
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6b7280;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
    line-height: 1;
}
.ebd-close:hover { background: #e9e9e2; }

/* ── Step badge ─────────────────────────────────────────────────────────────── */
.ebd-step-badge {
    display: inline-block;
    background: rgba(92,176,46,.14);
    color: #479022;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .25rem .65rem;
    border-radius: 20px;
    margin-bottom: .75rem;
}

/* ── Headings ───────────────────────────────────────────────────────────────── */
.ebd-popup h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.9rem;
    font-weight: 400;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #1C2230;
    margin: 0 0 .4rem;
    line-height: 1.05;
}
.ebd-subtitle {
    color: #6b7280;
    font-size: .9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.ebd-subtitle strong { color: #1C2230; }
.ebd-price-tag { color: #479022; font-weight: 800; }

/* ── QR Code ────────────────────────────────────────────────────────────────── */
.ebd-qr-wrap { text-align: center; margin-bottom: 1.5rem; }
.ebd-qr-img {
    max-width: 300px;
    width: 100%;
    border-radius: 12px;
    border: 3px solid #F2C200;
    box-shadow: 0 8px 24px rgba(28,34,48,.12);
	margin:0 auto;
}
.ebd-qr-placeholder {
    text-align: center;
    padding: 2rem;
    background: #FAFAF6;
    border-radius: 12px;
    border: 2px dashed #e9e9e2;
    color: #9ca3af;
    margin-bottom: 1.5rem;
    font-size: .85rem;
    line-height: 1.6;
}
.ebd-qr-placeholder a { color: #479022; font-weight: 700; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.ebd-btn-primary {
    width: 100%;
    background: #F2C200;
    color: #1C2230;
    border: none;
    padding: .95rem;
    border-radius: 10px;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 5px 0 #D9A900;
    margin-top: .5rem;
}
.ebd-btn-primary:hover  { transform: translateY(-1px); box-shadow: 0 6px 0 #D9A900; }
.ebd-btn-primary:active { transform: translateY(2px);  box-shadow: 0 3px 0 #D9A900; }
.ebd-btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: 0 5px 0 #D9A900; }

.ebd-btn-ghost {
    width: 100%;
    background: transparent;
    border: 1.5px solid #e9e9e2;
    color: #6b7280;
    padding: .7rem;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: .6rem;
    transition: border-color .15s, color .15s;
}
.ebd-btn-ghost:hover { border-color: #1C2230; color: #1C2230; }

/* ── Form fields ────────────────────────────────────────────────────────────── */
.ebd-field { margin-bottom: 1rem; }
.ebd-field label {
    display: block;
    font-size: .85rem;
    font-weight: 700;
    color: #1C2230;
    margin-bottom: .35rem;
}
.ebd-req { color: #ef4444; }

.ebd-field input[type="text"],
.ebd-field input[type="email"] {
    width: 100%;
    padding: .72rem 1rem;
    border: 1.5px solid #e9e9e2;
    border-radius: 10px;
    font-size: .95rem;
    color: #1C2230;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    background: #FAFAF6;
}
.ebd-field input:focus {
    border-color: #5CB02E;
    box-shadow: 0 0 0 3px rgba(92,176,46,.18);
    background: #fff;
}

/* ── Upload area ────────────────────────────────────────────────────────────── */
.ebd-upload-area {
    position: relative;
    border: 2px dashed #d1d5cb;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    background: #FAFAF6;
}
.ebd-upload-area:hover, .ebd-upload-area.dragover {
    border-color: #5CB02E;
    background: #f4faef;
}
.ebd-upload-area input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.ebd-upload-label {
    display: flex; flex-direction: column; align-items: center; gap: .4rem;
    color: #9ca3af; pointer-events: none;
}
.ebd-upload-label span { font-size: .9rem; color: #1C2230; font-weight: 600; }
.ebd-upload-label small { font-size: .78rem; }

.ebd-preview {
    width: 100%; max-height: 160px; object-fit: cover;
    border-radius: 10px; margin-top: .75rem; border: 1.5px solid #e9e9e2;
}

/* ── Alert ──────────────────────────────────────────────────────────────────── */
.ebd-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 10px;
    padding: .75rem 1rem;
    font-size: .88rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* ── Spinner ────────────────────────────────────────────────────────────────── */
@keyframes ebdSpin { to { transform: rotate(360deg); } }
.ebd-spinner { animation: ebdSpin .8s linear infinite; }

/* ── Mobile ─────────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .ebd-popup { padding: 2rem 1.25rem; }
    .ebd-popup h2 { font-size: 1.55rem; }
}

/* ── Payment Tabs ────────────────────────────────────────────────────────────── */
.ebd-pay-tabs {
    display: flex; gap: .35rem;
    background: #f3f4f1;
    border-radius: 12px; padding: .3rem;
    margin-bottom: 1.25rem;
}
.ebd-pay-tab {
    flex: 1; padding: .6rem .75rem;
    border: none; border-radius: 9px; background: transparent;
    font-size: .82rem; font-weight: 700; color: #6b7280;
    cursor: pointer; transition: background .15s, color .15s, box-shadow .15s;
    white-space: nowrap;
}
.ebd-pay-tab.active {
    background: #fff; color: #1C2230;
    box-shadow: 0 1px 4px rgba(28,34,48,.12);
}
.ebd-pay-tab:hover:not(.active) { color: #1C2230; }

/* ── Tab hint ────────────────────────────────────────────────────────────────── */
.ebd-tab-hint {
    font-size: .82rem; color: #9ca3af;
    margin-bottom: 1rem; text-align: center; line-height: 1.5;
}

/* ── Payoneer panel (keeps Payoneer brand orange) ────────────────────────────── */
.ebd-payoneer-wrap { text-align: center; padding: 1rem 0 .5rem; }
.ebd-payoneer-logo {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: 1.1rem; font-weight: 700; color: #ff4800;
    margin-bottom: 1.1rem; letter-spacing: -.01em;
}
.ebd-payoneer-btn {
    display: inline-block; background: #ff4800; color: #fff;
    padding: .85rem 2rem; border-radius: 12px;
    font-weight: 700; font-size: .95rem; text-decoration: none;
    transition: opacity .15s, transform .15s;
    box-shadow: 0 4px 16px rgba(255,72,0,.3); margin-bottom: .85rem;
}
.ebd-payoneer-btn:hover { opacity: .9; transform: translateY(-1px); }
.ebd-payoneer-note { font-size: .78rem; color: #9ca3af; line-height: 1.5; }

/* ── Admin method badges ─────────────────────────────────────────────────────── */
.ebd-method-pk   { font-size: .8rem; }
.ebd-method-intl { font-size: .8rem; }
