/* Dashboard NewPack — Checkout CSS */

/* ── Billing profile modal overlay ── */
#dnp-billing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.78);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    animation: dnp-fadein .2s ease;
}

@keyframes dnp-fadein { from { opacity:0; } to { opacity:1; } }
@keyframes dnp-slideup { from { transform:translateY(20px);opacity:0; } to { transform:translateY(0);opacity:1; } }

#dnp-billing-modal {
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    margin: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,.5);
    animation: dnp-slideup .25s ease;
    overflow: hidden;
}

.dnp-bm-header {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid #222;
}

.dnp-bm-icon { font-size: 36px; margin-bottom: 12px; }

.dnp-bm-header h2 {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    color: #f0f0f0 !important;
    margin: 0 0 8px !important;
    border: none !important;
    padding: 0 !important;
}

.dnp-bm-header p {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.5;
}

.dnp-bm-body {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Two-column row */
.dnp-bf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dnp-bf-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dnp-bf-group label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #666;
}

.dnp-required { color: #e03030; }

.dnp-bf-group input[type="text"],
.dnp-bf-group input[type="tel"],
.dnp-bf-group input[type="email"],
.dnp-bf-group select {
    background: #1e1e1e !important;
    border: 1px solid #2a2a2a !important;
    border-radius: 7px !important;
    padding: 11px 14px !important;
    font-size: 14px !important;
    color: #f0f0f0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: border-color .18s, box-shadow .18s !important;
    -webkit-appearance: none !important;
    font-family: inherit !important;
}

.dnp-bf-group input:focus,
.dnp-bf-group select:focus {
    border-color: #e03030 !important;
    box-shadow: 0 0 0 3px rgba(224,48,48,.1) !important;
}

.dnp-bf-group input::placeholder { color: #333; }

.dnp-bf-group select option { background: #1e1e1e; color: #f0f0f0; }

.dnp-bf-err {
    font-size: 11px;
    color: #f87171;
    display: none;
}

.dnp-bf-general-err {
    font-size: 12px;
    color: #f87171;
    margin-top: 10px;
    text-align: center;
}

.dnp-bm-footer {
    padding: 20px 32px 28px;
    border-top: 1px solid #222;
}

.dnp-bf-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e03030, #8b0000);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .05em;
    cursor: pointer;
    transition: opacity .18s;
    font-family: inherit;
}
.dnp-bf-btn:hover   { opacity: .88; }
.dnp-bf-btn:active  { transform: scale(.98); }
.dnp-bf-btn:disabled { opacity: .5; cursor: default; }

/* ── Checkout page — hide billing fields but keep in DOM ── */
body.dnp-checkout-active p.form-row.dnp-hidden-field,
body.dnp-checkout-active p.form-row.dnp-hidden-field + br {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

body.dnp-checkout-active .woocommerce-shipping-fields,
body.dnp-checkout-active #ship-to-different-address {
    display: none !important;
}

body.dnp-checkout-active .woocommerce-billing-fields > h3 {
    display: none !important;
}

/* ── Responsive ── */
@media (max-width: 580px) {
    #dnp-billing-modal { border-radius: 12px 12px 0 0; }
    .dnp-bm-header, .dnp-bm-body, .dnp-bm-footer { padding-left: 20px; padding-right: 20px; }
    .dnp-bf-row { grid-template-columns: 1fr; }
    #dnp-billing-overlay { align-items: flex-end; padding: 0; }
}
