/* =============================================
   DIRECT CHECKOUT POPUP — v1.3
   ============================================= */

/* ── Order Now Button ──────────────────────── */
.dcp-order-now-btn {
    display: block;
    width: 100%;
    max-width: 420px;
    padding: 15px 20px;
    margin: 12px 0;
    font-size: 17px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s;
}
.dcp-order-now-btn:hover { opacity: 0.85; }

/* ── Sticky Bar ────────────────────────────── */
.dcp-sticky-bar {
    position: fixed;
    left: 0; right: 0;
    z-index: 9998;
    padding: 10px 16px;
    background: transparent;
    display: none;
    box-sizing: border-box;
}
.dcp-sticky-bottom { bottom: 0; }
.dcp-sticky-top    { top: 0; }

.dcp-sticky-bar .dcp-order-now-btn {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
}

/* Mobile / small screens — floating rounded card with a visible gap
   from the screen edges (matches the reference screenshot: white
   rounded card floating above the page, fully-rounded pill button
   inside it, not edge-to-edge/square). */
@media (max-width: 991px) {
    .dcp-sticky-bar {
        left: 14px; right: 14px;
        width: auto;
        max-width: 100%;
        padding: 8px;
        background: #fff;
        border-radius: 18px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.18);
        transform: none;
        box-sizing: border-box;
    }
    .dcp-sticky-bottom { bottom: 14px; }
    .dcp-sticky-top    { top: 14px; }

    .dcp-sticky-bar .dcp-order-now-btn {
        border-radius: 50px;
        padding: 14px 20px;
    }
}

/* Laptop / desktop — a full-bleed bar looks oversized on wide screens,
   so show it as a contained, centered floating card instead. */
@media (min-width: 992px) {
    .dcp-sticky-bar {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
        max-width: 480px;
        padding: 14px;
        background: #fff;
        border-radius: 14px;
        box-shadow: 0 6px 28px rgba(0,0,0,0.18);
    }
    .dcp-sticky-bottom { bottom: 24px; }
    .dcp-sticky-top    { top: 24px; }

    .dcp-sticky-bar .dcp-order-now-btn {
        border-radius: 10px;
    }
}

/* ── 20 Animations ─────────────────────────── */
/* 1. Pulse */
@keyframes dcp-pulse {
    0%,100%{transform:scale(1)} 50%{transform:scale(1.06)}
}
.dcp-anim-pulse { animation: dcp-pulse 1.4s ease-in-out infinite; }

/* 2. Bounce */
@keyframes dcp-bounce {
    0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)}
}
.dcp-anim-bounce { animation: dcp-bounce 0.9s ease infinite; }

/* 3. Shake */
@keyframes dcp-shake {
    0%,100%{transform:translateX(0)} 20%{transform:translateX(-5px)} 40%{transform:translateX(5px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)}
}
.dcp-anim-shake { animation: dcp-shake 0.7s ease infinite; animation-delay: 0s; }

/* 4. Swing */
@keyframes dcp-swing {
    0%,100%{transform:rotate(0)} 25%{transform:rotate(4deg)} 75%{transform:rotate(-4deg)}
}
.dcp-anim-swing { animation: dcp-swing 1s ease-in-out infinite; transform-origin: center; }

/* 5. Rubber Band */
@keyframes dcp-rubberBand {
    0%{transform:scaleX(1)} 30%{transform:scaleX(1.15) scaleY(0.85)} 60%{transform:scaleX(0.92) scaleY(1.08)} 80%{transform:scaleX(1.04) scaleY(0.97)} 100%{transform:scaleX(1)}
}
.dcp-anim-rubberBand { animation: dcp-rubberBand 1.2s ease infinite; }

/* 6. Flash */
@keyframes dcp-flash {
    0%,100%{opacity:1} 50%{opacity:0.35}
}
.dcp-anim-flash { animation: dcp-flash 1s linear infinite; }

/* 7. Heartbeat */
@keyframes dcp-heartbeat {
    0%,100%{transform:scale(1)} 15%{transform:scale(1.08)} 30%{transform:scale(1)} 45%{transform:scale(1.08)} 60%{transform:scale(1)}
}
.dcp-anim-heartbeat { animation: dcp-heartbeat 1.2s ease-in-out infinite; }

/* 8. Jello */
@keyframes dcp-jello {
    0%,100%{transform:skewX(0) skewY(0)} 30%{transform:skewX(-8deg) skewY(-8deg)} 50%{transform:skewX(5deg) skewY(5deg)} 70%{transform:skewX(-3deg) skewY(-3deg)} 85%{transform:skewX(1deg) skewY(1deg)}
}
.dcp-anim-jello { animation: dcp-jello 1.3s ease-in-out infinite; }

/* 9. Wobble */
@keyframes dcp-wobble {
    0%,100%{transform:translateX(0) rotate(0)} 20%{transform:translateX(-5px) rotate(-3deg)} 40%{transform:translateX(5px) rotate(3deg)} 60%{transform:translateX(-3px) rotate(-1.5deg)} 80%{transform:translateX(3px) rotate(1.5deg)}
}
.dcp-anim-wobble { animation: dcp-wobble 1s ease-in-out infinite; }

/* 10. Tada */
@keyframes dcp-tada {
    0%{transform:scale(1)} 10%,20%{transform:scale(0.94) rotate(-3deg)} 30%,50%,70%,90%{transform:scale(1.06) rotate(3deg)} 40%,60%,80%{transform:scale(1.06) rotate(-3deg)} 100%{transform:scale(1) rotate(0)}
}
.dcp-anim-tada { animation: dcp-tada 1.4s ease infinite; }

/* 11. Glow */
@keyframes dcp-glow {
    0%,100%{box-shadow:0 0 4px rgba(255,255,255,0.3)} 50%{box-shadow:0 0 18px rgba(255,255,255,0.8), 0 0 30px rgba(255,255,255,0.4)}
}
.dcp-anim-glow { animation: dcp-glow 1.5s ease-in-out infinite; }

/* 12. Neon */
@keyframes dcp-neon {
    0%,100%{box-shadow:0 0 6px #fff,0 0 12px currentColor} 50%{box-shadow:0 0 14px #fff,0 0 28px currentColor,0 0 40px currentColor}
}
.dcp-anim-neon { animation: dcp-neon 1.2s ease-in-out infinite; }

/* 13. Slide Up */
@keyframes dcp-slideUp {
    0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)}
}
.dcp-anim-slideUp { animation: dcp-slideUp 1s ease-in-out infinite; }

/* 14. Slide Down */
@keyframes dcp-slideDown {
    0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)}
}
.dcp-anim-slideDown { animation: dcp-slideDown 1s ease-in-out infinite; }

/* 15. Zoom In */
@keyframes dcp-zoomIn {
    0%,100%{transform:scale(1)} 50%{transform:scale(1.08)}
}
.dcp-anim-zoomIn { animation: dcp-zoomIn 1.2s ease-in-out infinite; }

/* 16. Zoom Out Pulse */
@keyframes dcp-zoomOut {
    0%,100%{transform:scale(1)} 50%{transform:scale(0.93)}
}
.dcp-anim-zoomOut { animation: dcp-zoomOut 1.2s ease-in-out infinite; }

/* 17. Spin */
@keyframes dcp-spin {
    0%{transform:rotate(0)} 100%{transform:rotate(360deg)}
}
.dcp-anim-spin { animation: dcp-spin 2s linear infinite; }

/* 18. Float */
@keyframes dcp-float {
    0%,100%{transform:translateY(0) scale(1)} 33%{transform:translateY(-7px) scale(1.02)} 66%{transform:translateY(-3px) scale(1.01)}
}
.dcp-anim-float { animation: dcp-float 2s ease-in-out infinite; }

/* 19. Wiggle */
@keyframes dcp-wiggle {
    0%,100%{transform:rotate(0)} 25%{transform:rotate(-6deg)} 75%{transform:rotate(6deg)}
}
.dcp-anim-wiggle { animation: dcp-wiggle 0.5s ease-in-out infinite; }

/* 20. None — already default */

/* ── Overlay ───────────────────────────────── */
.dcp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.dcp-overlay.dcp-active { display: flex; }

/* ── Modal ─────────────────────────────────── */
.dcp-modal {
    background: #fff;
    width: 100%;
    max-width: 460px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 14px;
    padding: 28px 22px 24px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.dcp-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #111; color: #fff;
    border: none; font-size: 18px;
    cursor: pointer; line-height: 34px;
    text-align: center; z-index: 10;
}

/* ── Product Header ────────────────────────── */
.dcp-product-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding-right: 42px;
}
.dcp-product-info img {
    width: 64px; height: 64px;
    border-radius: 8px; object-fit: cover; flex-shrink: 0;
}
.dcp-product-info > div {
    flex: 1 1 auto;
    min-width: 0;
}
.dcp-product-info.dcp-no-image > div {
    padding-right: 0;
}
.dcp-product-info h3 {
    margin: 0 0 4px; font-size: 15px; line-height: 1.35;
    overflow-wrap: break-word; word-break: break-word;
}
.dcp-product-variation { display: none; }
.dcp-price { color: #1a6fc4; font-weight: 700; font-size: 15px; }

/* ── Delivery Line ─────────────────────────── */
.dcp-delivery-line {
    font-size: 14px; font-weight: 600;
    margin: 0 0 10px;
    padding: 7px 12px;
    background: #f0f7f0;
    border-left: 3px solid #1aa260;
    border-radius: 0 6px 6px 0;
}
.dcp-delivery-value.free { color: #1aa260; }
.dcp-delivery-value.paid { color: #c0392b; }

/* ── Urgency Widgets (Sold badge / Stock bar / Viewing badge / Delivery timer) ── */
.dcp-urgency { margin: 10px 0; font-size: 14px; line-height: 1.4; }

.dcp-sold-badge { font-weight: 600; }

.dcp-stock-wrap .dcp-stock-text { font-weight: 600; margin-bottom: 6px; }
.dcp-stock-bar-track {
    width: 100%; height: 8px;
    background: #ececec;
    border-radius: 4px;
    overflow: hidden;
}
.dcp-stock-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.dcp-viewing-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.dcp-viewing-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: #111;
    font-size: 15px;
    flex-shrink: 0;
}
.dcp-viewing-text { font-size: 14px; }

.dcp-delivery-box {
    padding: 16px;
    border-radius: 10px;
    margin: 14px 0;
}
.dcp-delivery-heading {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 14px;
}
.dcp-delivery-countdown { font-weight: 700; }
.dcp-delivery-steps {
    display: flex;
    align-items: center;
    justify-content: center;
}
.dcp-delivery-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 0 auto;
}
.dcp-delivery-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    margin-bottom: 6px;
}
.dcp-delivery-step-label {
    font-size: 12px;
    line-height: 1.35;
}
.dcp-delivery-connector {
    flex: 1 1 auto;
    height: 2px;
    background: #d8d2c6;
    margin: 0 8px 24px;
    min-width: 20px;
}

/* ── Total Line ────────────────────────────── */
.dcp-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px; font-weight: 700;
    margin: 0 0 16px;
    padding: 10px 14px;
    background: #111; color: #fff;
    border-radius: 8px;
}
.dcp-total-value { font-size: 18px; }

/* ── Variation Selects ─────────────────────── */
#dcp-variations-wrap { margin-bottom: 8px; }
.dcp-variation-notice { margin: 0 0 8px; font-size: 13px; color: #555; }
.dcp-variation-status { margin-top: 6px; font-size: 13px; font-weight: 600; }
.dcp-var-ok    { color: #1aa260; }
.dcp-var-error { color: #c0392b; }

/* ── Form ──────────────────────────────────── */
#dcp-order-form label {
    display: block; font-weight: 600;
    margin: 8px 0 4px; font-size: 14px;
}
#dcp-order-form input[type="text"],
#dcp-order-form input[type="tel"],
#dcp-order-form input[type="number"],
#dcp-order-form select,
#dcp-order-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    margin: 0;
}
#dcp-order-form input:focus,
#dcp-order-form select:focus,
#dcp-order-form textarea:focus { border-color: #555; }
#dcp-order-form textarea { resize: vertical; }

/* ── Submit ────────────────────────────────── */
.dcp-submit-btn {
    width: 100%; margin-top: 18px; padding: 15px;
    border: none; border-radius: 10px;
    font-size: 16px; font-weight: 700; cursor: pointer;
    transition: opacity 0.2s;
}
.dcp-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.dcp-submit-btn:hover:not(:disabled) { opacity: 0.88; }

.dcp-form-message {
    margin-top: 10px; font-size: 14px; color: #c0392b;
    text-align: center; min-height: 20px;
}
