/* Feel-good layer: greeting, nudges, celebration. Loaded after styles.css. */

/* Splash: crowned logo pops in, tagline fades up */
.app-splash-badge { animation: dl-pop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.app-splash-logo { border-radius: 24px; box-shadow: 0 14px 34px rgba(15, 77, 39, 0.28); }
.app-splash-hello {
    margin-top: -0.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    animation: dl-fade-up 0.7s 0.45s ease-out forwards;
}
@keyframes dl-pop { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes dl-fade-up { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Hero greeting */
.dl-greeting {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    animation: dl-fade-up 0.6s ease-out both;
}
.dl-craving {
    margin: 0.55rem 0 0.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    animation: dl-fade-up 0.7s 0.15s ease-out both;
}
.dl-craving-emoji { display: inline-block; font-size: 1.15rem; animation: dl-float 2.6s ease-in-out infinite; }
@keyframes dl-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* Free-delivery / minimum-order nudge (cart modal) */
.dl-nudge {
    margin: 0 0 0.85rem;
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #14532d;
    font-size: 0.86rem;
    font-weight: 700;
}
.dl-nudge[hidden] { display: none; }
.dl-nudge-bar { margin-top: 0.5rem; height: 6px; border-radius: 999px; background: #dcfce7; overflow: hidden; }
.dl-nudge-bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #22c55e, #facc15); transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.dl-nudge--done { background: #fefce8; border-color: #fde68a; color: #854d0e; }

/* Cart badge bump when something is added */
.dl-bump { animation: dl-bump 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes dl-bump { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }

.cart-empty-friendly { text-align: center; padding: 1.5rem 0.5rem; color: #475569; font-weight: 600; line-height: 1.5; }
.cart-empty-friendly span { display: block; font-size: 2.4rem; margin-bottom: 0.3rem; animation: dl-float 2.6s ease-in-out infinite; }

/* Order success celebration */
.dl-cheer { margin: 0.3rem 0 0.2rem; font-weight: 800; font-size: 1.02rem; color: #15803d; animation: dl-fade-up 0.6s 0.2s ease-out both; }
#dlConfetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100000; }

@media (prefers-reduced-motion: reduce) {
    .app-splash-badge, .app-splash-hello, .dl-greeting, .dl-craving, .dl-craving-emoji,
    .dl-bump, .dl-cheer, .cart-empty-friendly span { animation: none !important; opacity: 1 !important; }
}
