/*
 * PCSpecs – globale Betreiberhinweise und transiente Rückmeldungen.
 */

.site-global-notice-host {
    position: sticky;
    inset-block-start: 0.5rem;
    z-index: 90;
    width: min(calc(100% - 2.5rem), var(--pc-shell));
    margin: 0.9rem auto 0;
    pointer-events: none;
}

.site-global-notice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(247, 255, 0, 0.78);
    border-radius: 0.85rem;
    color: #231b08;
    background: linear-gradient(
        135deg,
        rgba(255, 243, 186, 0.50),
        rgba(255, 215, 63, 0.50)
    );
    box-shadow:
        0 0.7rem 1.8rem rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 246, 207, 0.15) inset;
    pointer-events: auto;
}

.site-global-notice.is-hidden {
    display: none;
}

.site-global-notice__icon {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    color: #9c00006e;
}

.site-global-notice__icon svg {
    display: block;
    width: 1.95rem;
    height: 1.95rem;
}

.site-global-notice__copy {
    min-width: 0;
    display: grid;
    gap: 0.18rem;
    line-height: 1.42;
}

.site-global-notice__copy strong {
    font-size: 0.96rem;
    font-weight: 850;
}

.site-global-notice__copy span {
    font-size: 0.92rem;
}

.pcspecs-toast-center {
    --pcspecs-toast-top: 1rem;
    position: fixed;
    inset-block-start: var(--pcspecs-toast-top);
    inset-inline-end: 1rem;
    z-index: 1200;
    width: min(28rem, calc(100vw - 2rem));
    display: grid;
    gap: 0.65rem;
    pointer-events: none;
}

.pcspecs-toast {
    --toast-accent: #21b8f6;
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: start;
    padding: 0.8rem 0.85rem;
    border: 1px solid color-mix(in srgb, var(--toast-accent) 52%, #28384c);
    border-inline-start-width: 0.28rem;
    border-radius: 0.75rem;
    color: #f5f8fb;
    background: linear-gradient(
        145deg,
        rgba(10, 18, 31, 0.98),
        rgba(5, 10, 18, 0.98)
    );
    box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.34);
    pointer-events: auto;
    animation: pcspecs-toast-enter 220ms ease-out both;
}

.pcspecs-toast[data-type="success"] { --toast-accent: #37c978; }
.pcspecs-toast[data-type="info"] { --toast-accent: #21b8f6; }
.pcspecs-toast[data-type="warning"] { --toast-accent: #e1ad35; }
.pcspecs-toast[data-type="error"] { --toast-accent: #ef6262; }

.pcspecs-toast.is-leaving {
    animation: pcspecs-toast-leave 190ms ease-in both;
}

.pcspecs-toast__icon {
    color: var(--toast-accent);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.35;
}

.pcspecs-toast__message {
    min-width: 0;
    color: #edf4fb;
    line-height: 1.4;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.pcspecs-toast__close {
    appearance: none;
    border: 0;
    padding: 0;
    color: #aebdcb;
    background: transparent;
    font: inherit;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.pcspecs-toast__close:hover,
.pcspecs-toast__close:focus-visible {
    color: #fff;
}

.async-field-error {
    display: block;
    margin-block-start: 0.28rem;
    color: #ff9f9f;
    font-size: 0.78rem;
    line-height: 1.35;
}

[data-async-form].is-submitting {
    opacity: 0.82;
}

@keyframes pcspecs-toast-enter {
    from { opacity: 0; transform: translateY(-1.25rem); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pcspecs-toast-leave {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-0.85rem); }
}

@media (max-width: 44rem) {
    .site-global-notice-host {
        width: min(calc(100% - 1.25rem), var(--pc-shell));
    }
}

@media (max-width: 46rem) {
    .site-global-notice-host {
        inset-block-start: 0.25rem;
    }

    .site-global-notice {
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .site-global-notice__icon {
        width: 1.8rem;
        height: 1.8rem;
    }

    .site-global-notice__icon svg {
        width: 1.6rem;
        height: 1.6rem;
    }

    .pcspecs-toast-center {
        inset-inline: 0.5rem;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pcspecs-toast,
    .pcspecs-toast.is-leaving {
        animation-duration: 1ms;
    }
}
