/* ============================================================
   BDSTally — Checkout Page Styles
   ============================================================ */

/* ── Layout ─────────────────────────────────────────────────── */

.bds-checkout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 560px;
    margin: 2.5rem auto;
    padding: 0 1rem 4rem;
    font-family: var(--bds-font, system-ui, sans-serif);
}

@media ( min-width: 768px ) {
    .bds-checkout {
        grid-template-columns: 1fr 1.6fr;
        max-width: 900px;
        align-items: start;
    }
}

/* ── Package Summary ─────────────────────────────────────────── */

.bds-checkout__summary {
    background: linear-gradient( 145deg, #0A1628 0%, #132238 60%, #1C3050 100% );
    color: #fff;
    border-radius: 16px;
    padding: 2rem 1.75rem;
    border: 1.5px solid rgba(0, 200, 255, 0.15);
}

.bds-checkout__summary-inner {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bds-checkout__pkg-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
}

.bds-checkout__pkg-name {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
    margin-top: 0.25rem;
}

.bds-checkout__pkg-detail {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 0.1rem;
}

.bds-checkout__pkg-price {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0.75rem 0 0.5rem;
    color: #00C8FF;
}

.bds-checkout__change {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    text-decoration: underline;
    cursor: pointer;
    margin-top: 0.25rem;
}

.bds-checkout__change:hover {
    color: #fff;
}

/* ── Card ────────────────────────────────────────────────────── */

.bds-checkout__card {
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 16px;
    padding: 2rem 1.75rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

/* ── Sections ────────────────────────────────────────────────── */

.bds-checkout__section {
    margin-bottom: 1.75rem;
}

.bds-checkout__section:last-child {
    margin-bottom: 0;
}

.bds-checkout__section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1A202C;
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1.5px solid #EDF2F7;
}

/* ── Account note ────────────────────────────────────────────── */

.bds-checkout__account-note {
    font-size: 0.82rem;
    color: #718096;
    margin: -0.5rem 0 1rem;
    line-height: 1.5;
}

/* ── Auth tabs ───────────────────────────────────────────────── */

.bds-checkout__tabs {
    display: flex;
    gap: 0;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.bds-checkout__tab {
    flex: 1;
    padding: 0.6rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    color: #718096;
    transition: background 0.15s, color 0.15s;
}

.bds-checkout__tab.is-active {
    background: #0A1628;
    color: #fff;
}

/* ── Form ────────────────────────────────────────────────────── */

.bds-checkout__form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.bds-checkout__form--hidden {
    display: none !important;
}

.bds-checkout__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.bds-checkout__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.bds-checkout__field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4A5568;
}

.bds-checkout__field input {
    padding: 0.65rem 0.85rem;
    border: 1.5px solid #CBD5E0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1A202C;
    background: #FAFAFA;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.bds-checkout__field input:focus {
    outline: none;
    border-color: #00C8FF;
    box-shadow: 0 0 0 3px rgba(0, 200, 255, 0.15);
    background: #fff;
}
/* Placeholder — medium gray on the light checkout form inputs */
.bds-checkout__field input::placeholder,
.bds-checkout__field input::-webkit-input-placeholder { color: #9ca3af !important; opacity: 1 !important; }

.bds-checkout__field input.is-invalid {
    border-color: #E53E3E;
}

.bds-checkout__field-hint {
    font-size: 0.75rem;
    color: #718096;
    margin: 0;
}

.bds-required {
    color: #E53E3E;
}

/* ── Logged-in state ─────────────────────────────────────────── */

.bds-checkout__logged-in {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #2D3748;
    background: #F0FFF4;
    border: 1.5px solid #9AE6B4;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.bds-checkout__logged-in-avatar {
    font-size: 1.1rem;
    color: #38A169;
    font-weight: 700;
}

/* ── Payment section ─────────────────────────────────────────── */

.bds-checkout__total-line {
    font-size: 1rem;
    color: #2D3748;
    margin: 0 0 1.25rem;
}

.bds-checkout__total-line strong {
    font-size: 1.15rem;
    color: #1A202C;
}

/* Stripe button — navy, not brand orange */
.bds-checkout__stripe-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 1rem;
    padding: 0.85rem 1.25rem;
    background: #0A1628 !important;
    border-color: #0A1628 !important;
    color: #fff !important;
}

.bds-checkout__stripe-btn:hover {
    background: #1C3050 !important;
    border-color: #1C3050 !important;
}

.bds-checkout__btn-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.bds-checkout__stripe-btn:disabled,
.bds-checkout__stripe-btn.is-loading {
    opacity: 0.7;
    cursor: wait;
}

/* PayPal container */
.bds-checkout__paypal-wrap {
    margin-top: 0.5rem;
}

#paypal-button-container {
    min-height: 48px;
}

/* Divider */
.bds-checkout__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #A0AEC0;
    margin: 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bds-checkout__divider::before,
.bds-checkout__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

/* Secure note */
.bds-checkout__secure-note {
    font-size: 0.75rem;
    color: #A0AEC0;
    text-align: center;
    margin: 1rem 0 0;
}

/* ── Notices ─────────────────────────────────────────────────── */

.bds-checkout__notice {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}

.bds-checkout__notice--error {
    background: #FFF5F5;
    border: 1.5px solid #FEB2B2;
    color: #C53030;
}

.bds-checkout__notice--warn {
    background: #FFFAF0;
    border: 1.5px solid #FAD086;
    color: #744210;
}

.bds-checkout__notice--success {
    background: #F0FFF4;
    border: 1.5px solid #9AE6B4;
    color: #276749;
}

/* ── Error page variant ──────────────────────────────────────── */

.bds-checkout--error {
    grid-template-columns: 1fr;
    max-width: 560px;
}

/* ── Coupon code section ─────────────────────────────────────── */

.bds-checkout__coupon-toggle {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    margin-bottom: 8px;
}

.bds-checkout__coupon-toggle:hover {
    color: #00c8ff;
}

.bds-checkout__coupon-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 6px;
}

.bds-checkout__coupon-input {
    flex: 1;
    padding: 0.45rem 0.75rem;
    border: 1.5px solid #334155;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.bds-checkout__coupon-input:focus {
    outline: none;
    border-color: #00c8ff;
}
/* Placeholder — medium gray on the dark coupon input */
.bds-checkout__coupon-input::placeholder,
.bds-checkout__coupon-input::-webkit-input-placeholder { color: #64748b !important; opacity: 1 !important; }

/* Coupon Apply / Remove buttons.
   The shared .bds-btn--ghost style is white-text-on-transparent — designed
   for the dark hero/nav bars. On the white checkout card it rendered the
   "Apply" label as white-on-white (invisible), which is a big reason
   customers never applied their coupons. These ID-scoped overrides only
   affect the checkout buttons — ghost buttons elsewhere on the site are
   untouched. ID specificity (1,0,0) + the fact checkout CSS loads after
   bdstally-core both ensure these win. */
#bds-coupon-apply {
    background: #00c8ff;          /* brand cyan — clearly visible, secondary to the orange Pay button */
    color: #0a1628;               /* deep navy text for strong contrast on cyan */
    border-color: #00c8ff;
    font-weight: 700;
}
#bds-coupon-apply:hover {
    background: #00a3d0;          /* cyan-dark */
    border-color: #00a3d0;
    color: #0a1628;
}
#bds-coupon-remove {
    background: transparent;
    color: #64748b;               /* muted gray — quiet "undo" action */
    border-color: #cbd5e1;
}
#bds-coupon-remove:hover {
    background: #f1f5f9;
    color: #0a1628;
    border-color: #94a3b8;
}

#bds-coupon-feedback {
    font-size: 0.8rem;
    margin-top: 4px;
    font-weight: 600;
}
