/*
 * Storefront server-error page ("/error") — same visual language as the
 * redesigned category empty state and post-payment failed screen (centered
 * mark, title, hint, pill CTA). Scoped under .ep so nothing leaks.
 *
 * Accent follows --tw-brand (National Day green / default brand). The error
 * mark stays a danger red so it is not mistaken for a brand button.
 */

.ep {
    --ep-surface: var(--tw-surface, #ffffff);
    --ep-ink: var(--tw-ink, #18181b);
    --ep-ink-2: var(--tw-ink2, #77757d);
    --ep-line: var(--tw-line, #e9e8ec);
    --ep-brand: var(--tw-brand, #f5395f);
    --ep-brand-2: var(--tw-brand-2, #fa5d77);
    --ep-brand-rgb: var(--tw-brand-rgb, 245, 57, 95);
    --ep-brand-grad: linear-gradient(110deg, var(--ep-brand), var(--ep-brand-2));
    --ep-bad: #dc2626;
    --ep-bad-rgb: 220, 38, 38;
    --ep-font: "Baloo Bhaijaan 2", "Tahoma", sans-serif;

    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--tw-mnav-h, 0px));
    padding: calc(var(--tw-header-h, 70px) + 32px) 20px 48px;
    font-family: var(--ep-font);
    color: var(--ep-ink);
}

body.darkMode .ep,
html.darkMode body:not(.lightMode) .ep {
    --ep-bad: #f87171;
    --ep-bad-rgb: 248, 113, 113;
}

.ep *,
.ep *::before,
.ep *::after {
    box-sizing: border-box;
}

@keyframes ep-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes ep-pop {
    0% { transform: scale(.4); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes ep-draw-ring {
    from { stroke-dashoffset: 302; }
    to { stroke-dashoffset: 0; }
}

@keyframes ep-draw-tick {
    from { stroke-dashoffset: 60; }
    to { stroke-dashoffset: 0; }
}

.ep__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 520px;
    padding: 48px 28px 40px;
    border-radius: 24px;
    border: 1px solid var(--ep-line);
    background: var(--ep-surface);
    box-shadow: var(--tw-shadow, 0 2px 10px rgba(24, 24, 27, .06));
    text-align: center;
    animation: ep-in .35s ease-out;
}

.ep__mark {
    width: 96px;
    height: 96px;
    margin-bottom: 8px;
    animation: ep-pop .7s cubic-bezier(.2, 1.4, .4, 1) both;
}

.ep__mark svg {
    display: block;
}

.ep__mark-bg {
    fill: rgba(var(--ep-bad-rgb), .12);
}

.ep__mark-ring,
.ep__mark-x {
    fill: none;
    stroke: var(--ep-bad);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ep__mark-ring {
    stroke-width: 5;
    stroke-dasharray: 302;
    transform-origin: center;
    transform: rotate(-90deg);
    animation: ep-draw-ring .9s .2s cubic-bezier(.4, 0, .2, 1) both;
}

.ep__mark-x {
    stroke-width: 6.5;
    stroke-dasharray: 60;
    animation: ep-draw-tick .5s .8s cubic-bezier(.4, 0, .2, 1) both;
}

.ep__title {
    margin: 0;
    font-family: inherit;
    font-size: clamp(22px, 3.2vw, 30px);
    font-weight: 800;
    line-height: 1.35;
    color: var(--ep-ink);
}

.ep__text {
    max-width: 420px;
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
    color: var(--ep-ink-2);
}

.ep .ep__cta {
    margin-top: 16px;
    padding: 12px 28px;
    border-radius: 999px;
    background: var(--ep-brand-grad);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(var(--ep-brand-rgb), .35);
    transition: transform .2s, box-shadow .2s, filter .2s;
}

.ep .ep__cta:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(var(--ep-brand-rgb), .5);
    filter: brightness(1.05);
}

@media (max-width: 640px) {
    .ep {
        padding: calc(var(--tw-header-h, 60px) + 20px) 14px 36px;
    }

    .ep__panel {
        padding: 36px 18px 28px;
        border-radius: 20px;
    }

    .ep__mark,
    .ep__mark svg {
        width: 80px;
        height: 80px;
    }

    .ep__text {
        font-size: 13.5px;
    }

    .ep .ep__cta {
        padding: 11px 24px;
        font-size: 13px;
    }
}
