/* Reset + base element styling + typography utilities shared everywhere. */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

svg {
    display: block;
}

/* Typography helpers */

h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

.label-mono {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.text-dispatch {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.text-muted {
    color: var(--muted-foreground);
}

.text-primary {
    color: var(--primary);
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn-rounded {
    border-radius: 5px;
}

.container {
    width: 100%;
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

.dispatch-toast {
    position: fixed;
    z-index: 40;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    width: auto;
    border: 1px solid var(--border);
    background: rgba(34, 38, 47, 0.92);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    transform: translateY(1.5rem);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

@media (min-width: 640px) {
    .dispatch-toast {
        left: auto;
        width: 22rem;
    }
}

.dispatch-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.dispatch-toast__bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(43, 48, 57, 0.4);
    padding: 0.5rem 0.5rem 0.5rem 0.75rem;
}

.dispatch-toast__bar p {
    font-size: 11px;
}

.dispatch-toast__close {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
}

.dispatch-toast__close:hover {
    color: var(--foreground);
}

.dispatch-toast__close svg {
    width: 0.875rem;
    height: 0.875rem;
}

.dispatch-toast__body {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0.875rem 0.75rem;
}

.dispatch-toast__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(217, 154, 78, 0.4);
    background: rgba(217, 154, 78, 0.1);
    color: var(--primary);
}

.dispatch-toast__icon svg {
    width: 1rem;
    height: 1rem;
}

.dispatch-toast__title {
    font-size: 0.875rem;
    font-weight: 500;
}

.dispatch-toast__desc {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--muted-foreground);
}

.dispatch-toast .btn {
    margin: 0 0.875rem 0.875rem;
    width: calc(100% - 1.75rem);
}


@media (min-width: 640px) {
    .icon {
        display: inline-flex;
        width: 1em;
        height: 1em;
    }

    .icon svg {
        width: 100%;
        height: 100%;
    }

    .desktop-only-inline {
        display: none;
    }

    @media (min-width: 640px) {
        .desktop-only-inline {
            display: inline-flex;
        }
    }

    .container {
        padding-inline: 1.5rem;
    }
}