/* spite market — small hand-rolled layer on top of Tailwind (fully local). */

/* Self-hosted fonts (downloaded once from Google Fonts, served locally). */
@font-face {
    font-family: "Inter";
    src: url("/static/fonts/inter-var.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("/static/fonts/poppins-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("/static/fonts/poppins-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("/static/fonts/poppins-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("/static/fonts/poppins-800.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* Display type (Poppins) for headings, everything else inherits Inter. */
h1, h2, h3, h4, .font-display {
    font-family: "Poppins", "Inter", ui-sans-serif, system-ui, sans-serif;
}

:root {
    color-scheme: dark;
}

/* Thin, minimal scrollbar that never shifts layout: the gutter is always
   reserved so page width stays identical with and without a scrollbar. */
html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

/* Every actionable control gets the hand. */
button:not(:disabled),
[type="button"]:not(:disabled),
[type="submit"]:not(:disabled),
[role="button"]:not(:disabled),
a.btn-primary,
a.btn-ghost,
summary {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

/* Resellers: glowing green call-to-action in the payment panel. */
@keyframes reseller-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(74, 222, 128, 0.3), 0 0 26px rgba(74, 222, 128, 0.12);
    }

    50% {
        box-shadow: 0 0 18px rgba(74, 222, 128, 0.6), 0 0 46px rgba(74, 222, 128, 0.28);
    }
}

.btn-reseller {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #052e16;
    background: linear-gradient(135deg, #4ade80, #22c55e 60%, #16a34a);
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
    animation: reseller-glow 2.2s ease-in-out infinite;
}

.btn-reseller:hover {
    transform: translateY(-1px) scale(1.015);
    filter: brightness(1.06);
}

.btn-reseller:active {
    transform: translateY(0) scale(0.99);
}

/* Toast notification animations. */
@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

/* Payment gateway logos (metadata-free webp, rounded corners). */
.pay-logo {
    height: 1.5rem;
    width: auto;
    border-radius: 0.375rem;
}

/* Reseller rows inside the dialog. */
.spite-reseller-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
    max-height: 18rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.spite-reseller-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0.625rem;
    padding: 0.625rem 0.75rem;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.spite-reseller-row:hover {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.08);
    transform: translateX(2px);
}

.spite-reseller-logo {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.spite-reseller-placeholder {
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    color: #fafafa;
    font-weight: 700;
    font-size: 0.875rem;
}

.spite-reseller-name {
    flex: 1;
    min-width: 0;
    color: #fafafa;
    font-size: 0.875rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spite-reseller-visit {
    flex-shrink: 0;
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #fca5a5;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.spite-reseller-row:hover .spite-reseller-visit {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

/* ASP.NET Core validation classes (server-driven, no jQuery validation). */
.input-validation-error {
    border-color: #fb7185 !important;
}

.field-validation-error {
    color: #fb7185;
}

.validation-summary-errors {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(251, 113, 133, 0.3);
    border-radius: 0.75rem;
    background: rgba(251, 113, 133, 0.08);
    color: #fda4af;
    font-size: 0.875rem;
}

.validation-summary-errors ul {
    margin: 0;
    padding: 0 0 0 1rem;
    list-style: disc;
}

.validation-summary-errors ul:empty {
    display: none;
}

/* Header: transparent over the hero, solid once scrolled. */
#site-header {
    background: transparent;
}

#site-header.header-scrolled {
    background: rgba(9, 9, 11, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Cinematic hero: very slow drift on the background video. */
@keyframes hero-drift {
    from {
        transform: scale(1.02);
    }

    to {
        transform: scale(1.1) translate(-1.5%, -1%);
    }
}

.hero-video {
    animation: hero-drift 45s ease-in-out infinite alternate;
}

/* Live-rate panels fade instead of flashing when data goes stale. */
[data-btc-wrap] {
    transition: opacity 0.4s ease;
}

/* spiteUI dialog system (see site.js) — glass panel, animated in/out. */
.spite-dialog-root {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.spite-dialog-root[hidden] {
    display: none;
}

.spite-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 11, 0.65);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.16s ease;
}

.spite-dialog {
    position: relative;
    width: min(calc(100vw - 2rem), 26rem);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(24, 24, 27, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.spite-dialog-root.open .spite-dialog-backdrop {
    opacity: 1;
}

.spite-dialog-root.open .spite-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.spite-dialog-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fafafa;
    padding-right: 2rem;
}

.spite-dialog-x {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    background: transparent;
    color: #71717a;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.spite-dialog-x:hover {
    color: #fafafa;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

.spite-dialog-message {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #a1a1aa;
}

.spite-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.spite-dialog-btn {
    appearance: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.spite-dialog-cancel {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: #d4d4d8;
}

.spite-dialog-cancel:hover {
    background: rgba(255, 255, 255, 0.06);
}

.spite-dialog-ok {
    border: 1px solid transparent;
    background: #fafafa;
    color: #09090b;
}

.spite-dialog-ok:hover {
    background: #e4e4e7;
}

.spite-dialog-ok.danger {
    background: #fb7185;
    color: #09090b;
}

.spite-dialog-ok.danger:hover {
    background: #f43f5e;
}

.spite-dialog-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
