/* Cookie consent banner (partials/cookie-consent.blade.php). Uses the page.css
   tokens; the fallbacks cover the login card layout, which does not load page.css. */
.av-cookie {
    --cc-text: var(--av-color-text, #141b34);
    --cc-muted: #555555;
    --cc-primary: var(--av-color-primary, #12715b);
    --cc-border: var(--av-color-border-color, #e6e6e6);
    --cc-white: var(--av-color-white-color, #ffffff);
    --cc-bg: var(--av-color-input-color, #f6f6f6);

    position: fixed;
    left: 1.5rem;
    bottom: 1.5rem;
    z-index: 1080;
    width: min(28rem, calc(100vw - 3rem));
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 1.5rem;
    background: var(--cc-white);
    border: 0.0625rem solid var(--cc-border);
    border-radius: var(--av-radius-22, 1.375rem);
    box-shadow: 0 1rem 2.5rem rgba(20, 27, 52, 0.14);
    font-family: Roboto, sans-serif;
    color: var(--cc-text);
}
.av-cookie[hidden],
.av-cookie [hidden] {
    display: none !important;
}
.av-cookie-title {
    margin: 0 0 0.5rem;
    font-family: Roboto, sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--cc-text);
}
.av-cookie-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--cc-muted);
}
.av-cookie-text a {
    color: var(--cc-primary);
    font-weight: 500;
}
.av-cookie-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 0.0625rem solid var(--cc-border);
}
.av-cookie-option:first-of-type {
    border-top: 0;
}
.av-cookie-option strong {
    font-size: 0.9375rem;
    font-weight: 600;
}
.av-cookie-option p {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--cc-muted);
}
.av-cookie-option .av-cookie-gpc {
    color: var(--cc-primary);
}

/* Switch built on a native checkbox, so keyboard and screen readers work as usual. */
.av-cookie-switch {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    position: relative;
    width: 2.75rem;
    height: 1.5rem;
    margin: 0.125rem 0 0;
    border-radius: var(--av-radius-500, 31.25rem);
    background: var(--cc-border);
    cursor: pointer;
    transition: background 0.2s ease;
}
.av-cookie-switch::after {
    content: "";
    position: absolute;
    top: 0.1875rem;
    left: 0.1875rem;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    background: var(--cc-white);
    box-shadow: 0 0.0625rem 0.1875rem rgba(20, 27, 52, 0.25);
    transition: transform 0.2s ease;
}
.av-cookie-switch:checked {
    background: var(--cc-primary);
}
.av-cookie-switch:checked::after {
    transform: translateX(1.25rem);
}
.av-cookie-switch:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}
.av-cookie-switch:focus-visible,
.av-cookie-btn:focus-visible {
    outline: 0.125rem solid var(--cc-primary);
    outline-offset: 0.125rem;
}

.av-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}
/* Accept and Reject share one style: neither choice is made easier than the other. */
.av-cookie-btn {
    flex: 1 1 auto;
    min-height: 2.75rem;
    padding: 0.625rem 1.125rem;
    border: 0.0625rem solid var(--cc-text);
    border-radius: var(--av-radius-500, 31.25rem);
    background: var(--cc-text);
    color: var(--cc-white);
    font-family: Roboto, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.av-cookie-btn:hover {
    opacity: 0.88;
}
.av-cookie-btn-light {
    flex-basis: 100%;
    border-color: var(--cc-border);
    background: var(--cc-white);
    color: var(--cc-text);
}

@media (max-width: 575.98px) {
    .av-cookie {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        width: auto;
        max-height: calc(100vh - 2rem);
        padding: 1.25rem;
    }
}
