/* ================================================================
   VELDT HOOPOE COMPANION STYLES (INDEPENDENT PLUGIN v1.1.0)
   ================================================================ */

:root {
    --veldt-motion-brand: 350ms;
    --veldt-motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --veldt-color-sand: #E6E2DD;
    --veldt-color-stone: #D9D5D0;
    --veldt-color-warm-white: #FAF9F7;
    --veldt-color-slate: #5F6368;
    --veldt-color-charcoal: #202124;
    --veldt-color-muted-gold: #B39B7D;
    --veldt-color-accent-deep: #3A4332;
}

/* ================================================================
   1. CORNER FLOATING COMPANION (رفيق العميلة في زاوية الشاشة)
   ================================================================ */
.veldt-hoopoe-corner {
    position: fixed !important;
    bottom: 84px !important;
    left: 24px !important;
    right: auto !important;
    z-index: 99980 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif !important;
    direction: rtl !important;
    pointer-events: auto !important;
}

@media screen and (max-width: 991px) {
    .veldt-hoopoe-corner {
        bottom: 78px !important;
        left: 16px !important;
        right: auto !important;
    }
}

/* Badge Trigger Button */
.veldt-hoopoe-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #FAF9F7;
    border: 1px solid #E6E2DD;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
    outline: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.2s ease;
}
.veldt-hoopoe-badge:hover,
.veldt-hoopoe-badge:focus-visible {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 20px rgba(197, 154, 48, 0.25);
    border-color: #C59A30;
}
.veldt-hoopoe-badge:active {
    transform: translateY(0) scale(0.96);
}
.veldt-hoopoe-icon-wrap {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.veldt-hoopoe-icon-wrap svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 1px 4px rgba(179, 155, 125, 0.3));
}

/* Speech Bubble */
.veldt-hoopoe-bubble {
    position: absolute !important;
    bottom: 58px !important;
    left: 0 !important;
    right: auto !important;
    min-width: 260px !important;
    max-width: min(320px, calc(100vw - 40px)) !important;
    background: #FFFFFF !important;
    border: 1px solid #E6E2DD !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    padding: 14px 16px !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.98);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    box-sizing: border-box !important;
    z-index: 1 !important;
}
.veldt-hoopoe-bubble.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.veldt-hoopoe-bubble-inner {
    position: relative;
}
.veldt-hoopoe-bubble-close {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 22px;
    height: 22px;
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #9AA0A6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    transition: color 0.15s ease, background 0.15s ease;
}
.veldt-hoopoe-bubble-close:hover {
    color: #202124;
    background: #F1EFEA;
}
.veldt-hoopoe-bubble-header {
    margin-bottom: 6px;
}
.veldt-bubble-brand-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #4A5340;
    background: #FAF9F7;
    border: 1px solid #E6E2DD;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.05em;
}
.veldt-hoopoe-bubble-text {
    font-size: 13.5px;
    line-height: 1.6;
    color: #202124;
    font-weight: 600;
}
.veldt-hoopoe-card-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #F1EFEA;
}
.veldt-hoopoe-perks-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12.5px;
    color: #5F6368;
    line-height: 1.5;
}
.veldt-hoopoe-perks-list li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.veldt-hoopoe-btn-shop {
    display: block;
    width: 100%;
    text-align: center;
    background: #202124;
    color: #FFFFFF !important;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 4px;
    box-sizing: border-box;
    transition: background 0.2s ease;
}
.veldt-hoopoe-btn-shop:hover {
    background: #000000;
}
.veldt-hoopoe-bubble-arrow {
    position: absolute !important;
    bottom: -6px !important;
    left: 18px !important;
    right: auto !important;
    width: 10px !important;
    height: 10px !important;
    background: #FFFFFF !important;
    border-right: 1px solid #E6E2DD !important;
    border-bottom: 1px solid #E6E2DD !important;
    transform: rotate(45deg) !important;
}

/* STRICT QUIET ZONE ON CHECKOUT & CART */
.woocommerce-checkout:not(.woocommerce-order-received) .veldt-hoopoe-corner,
.woocommerce-cart .veldt-hoopoe-corner {
    display: none !important;
}

/* ================================================================
   2. EMPTY CART
   ================================================================ */
.woocommerce-cart .wc-empty-cart-message {
    margin: 36px auto 0 !important;
    max-width: 580px !important;
    text-align: center !important;
}
.veldt-brand-companion--empty-cart {
    background: var(--veldt-color-warm-white) !important;
    border: 1px solid #EFECE6 !important;
    border-radius: 8px !important;
    padding: 48px 28px 44px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
    direction: rtl !important;
    text-align: center !important;
    margin: 0 auto !important;
    animation: veldtCompanionReveal var(--veldt-motion-brand) var(--veldt-motion-ease) 1 forwards;
    will-change: opacity, transform;
}
@keyframes veldtCompanionReveal {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.veldt-companion-mark-wrap {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 68px !important;
    height: 68px !important;
    margin: 0 auto 16px !important;
}
.veldt-companion-mark-wrap svg {
    width: 100% !important;
    height: 100% !important;
    filter: drop-shadow(0 2px 8px rgba(179, 155, 125, 0.25)) !important;
}
.veldt-companion-heading {
    font-family: 'Cairo', sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--veldt-color-charcoal) !important;
    margin: 0 0 6px !important;
}
.veldt-companion-subtext {
    font-family: 'Cairo', sans-serif !important;
    font-size: 14px !important;
    color: var(--veldt-color-slate) !important;
    margin: 0 !important;
}
.woocommerce-cart .return-to-shop {
    margin: 24px auto 48px !important;
    text-align: center !important;
}
.woocommerce-cart .return-to-shop a.button {
    background: var(--veldt-color-charcoal) !important;
    color: #FFFFFF !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    padding: 13px 48px !important;
    border-radius: 4px !important;
    border: none !important;
    display: inline-block !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
}
.woocommerce-cart .return-to-shop a.button:hover {
    background: #000000 !important;
    transform: translateY(-1px) !important;
}

/* ================================================================
   3. PDP MICRO-CONFIRMATION
   ================================================================ */
.veldt-pdp-confirm-note {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 12px 0 16px !important;
    padding: 8px 14px !important;
    background: #F4F1EA !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-family: 'Cairo', sans-serif !important;
    color: var(--veldt-color-charcoal) !important;
    animation: veldtFadeIn 0.3s ease-out 1 forwards;
    width: 100% !important;
    box-sizing: border-box !important;
}
@keyframes veldtFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.veldt-confirm-mark {
    color: #2D6020 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}

/* ================================================================
   4. FLIGHT ACTOR
   ================================================================ */
.veldt-flight-actor-temp {
    position: fixed !important;
    width: 48px !important;
    height: 48px !important;
    z-index: 999999 !important;
    pointer-events: none !important;
    will-change: transform, top, left, opacity !important;
}
.veldt-flight-actor-temp svg {
    width: 100% !important;
    height: 100% !important;
    filter: drop-shadow(0 4px 12px rgba(197, 154, 48, 0.45)) !important;
}

/* ================================================================
   5. ORDER SUCCESS & JOURNEY WAYFINDER
   ================================================================ */
.veldt-order-received-experience {
    margin: 24px auto 36px !important;
    max-width: 680px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-family: 'Cairo', sans-serif !important;
}
.veldt-order-received-header {
    text-align: center;
    margin-bottom: 24px;
}
.veldt-order-hero-badge {
    display: inline-block;
    background: #EDEAE4;
    color: #5F6368;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}
.veldt-order-hero-title {
    font-size: 24px;
    font-weight: 700;
    color: #202124;
    margin-bottom: 8px;
}
.veldt-order-hero-subtitle {
    font-size: 15px;
    color: #5F6368;
}
.veldt-order-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: #FAF9F7;
    border: 1px solid #EFECE6;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 28px;
    text-align: center;
}
.veldt-meta-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.veldt-meta-label {
    font-size: 11.5px;
    color: #5F6368;
    font-weight: 600;
}
.veldt-meta-value {
    font-size: 14.5px;
    color: #202124;
    font-weight: 700;
}
.veldt-order-journey-card {
    background: #FFFFFF;
    border: 1px solid #EAE6DF;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.veldt-journey-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid #F0ECE6;
}
.veldt-journey-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #202124;
}
.veldt-journey-status-pill {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 14px;
}
.veldt-status-confirmed {
    background: #E8F0E4;
    color: #2D6020;
}
.veldt-journey-timeline {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}
.veldt-journey-timeline::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    right: 17px;
    width: 2px;
    background: #EAE6DF;
    z-index: 1;
}
.milestone {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    z-index: 2;
}
.milestone-node {
    position: relative;
    flex-shrink: 0;
}
.milestone-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: #FAF9F7;
    border: 2px solid #D9D5D0;
    color: #9AA0A6;
    transition: all 0.3s ease;
}
.milestone.is-completed .milestone-dot {
    background: #202124;
    border-color: #202124;
    color: #FFFFFF;
}
.milestone.is-current .milestone-dot {
    background: #C59A30;
    border-color: #C59A30;
    color: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(197, 154, 48, 0.18);
}
.veldt-wayfinder-anchor {
    position: absolute;
    top: -38px;
    right: -6px;
    width: 48px;
    height: 48px;
    pointer-events: none;
}
.veldt-wayfinder-hoopoe {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12));
}
.veldt-wayfinder-hoopoe.veldt-animate-entrance {
    animation: veldtEntranceSettle 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes veldtEntranceSettle {
    from { opacity: 0; transform: translateY(-12px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.milestone-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-top: 5px;
}
.milestone-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #202124;
}
.milestone.is-pending .milestone-title {
    color: #70757A;
    font-weight: 600;
}
.milestone-note {
    font-size: 12.5px;
    color: #5F6368;
    line-height: 1.5;
}
.veldt-carrier-sovereignty-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FAF9F7;
    border: 1px solid #EFECE6;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12px;
    color: #5F6368;
    line-height: 1.5;
}
.veldt-notice-bullet {
    color: #C59A30;
    font-size: 13px;
}

/* ORDER RECEIVED REFINEMENT */
.woocommerce-order-received .entry-title.page-title,
.woocommerce-order-received .woocommerce-order-overview {
    display: none !important;
}

/* PREFERS REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    .veldt-brand-companion--empty-cart,
    .veldt-pdp-confirm-note,
    .veldt-wayfinder-hoopoe,
    .veldt-flight-actor-temp,
    .veldt-hoopoe-badge,
    .veldt-hoopoe-bubble {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* MOBILE RESPONSIVE (360px - 768px) */
@media (max-width: 768px) {
    .veldt-hoopoe-corner {
        bottom: 76px !important; /* Above mobile sticky CTA & away from WhatsApp at right */
        left: 14px !important;
    }
    .veldt-hoopoe-badge {
        width: 44px !important;
        height: 44px !important;
    }
    .veldt-hoopoe-icon-wrap {
        width: 28px !important;
        height: 28px !important;
    }
    .veldt-hoopoe-bubble {
        bottom: 52px !important;
        left: 0 !important;
        min-width: 240px !important;
        max-width: 280px !important;
        padding: 12px 14px !important;
    }
    .veldt-hoopoe-bubble-text {
        font-size: 12.5px !important;
    }
}

@media (max-width: 640px) {
    html, body {
        overflow-x: hidden !important;
    }
    .veldt-order-received-experience {
        margin: 16px auto !important;
        padding: 0 8px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .veldt-order-meta-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 14px 10px !important;
        box-sizing: border-box !important;
    }
    .veldt-order-journey-card {
        padding: 18px 12px !important;
        box-sizing: border-box !important;
    }
    .veldt-order-hero-title {
        font-size: 18px !important;
        line-height: 1.4 !important;
    }
    .veldt-order-hero-subtitle {
        font-size: 13px !important;
    }
    .milestone-title {
        font-size: 13.5px !important;
    }
    .milestone-note {
        font-size: 11.5px !important;
    }
    .woocommerce-order-details,
    .woocommerce-table,
    .shop_table {
        box-sizing: border-box !important;
        max-width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
    }
}
