

:root {
    --tc-softerr-ink: rgba(255, 255, 255, 0.66);
    --tc-softerr-icon: #e6c08a;
}

[data-tc-hidden] {
    display: none !important;
}

.tc-softerr {
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    width: fit-content;
    max-width: 100%;
    min-height: 44px;
    margin: 4px 0;
    padding: 6px 6px 6px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    color: var(--tc-softerr-ink);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;

    grid-column: 1 / -1;
    flex: 0 1 auto;
    animation: tc-softerr-in 0.28s ease-out both;
}

.tc-softerr:not(:has(.tc-softerr__retry)) {
    padding-right: 14px;
}

.tc-softerr__icon {
    display: inline-flex;
    flex: 0 0 auto;
    color: var(--tc-softerr-icon);
    opacity: 0.9;
}

.tc-softerr__icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

.tc-softerr__text {
    flex: 1 1 auto;
    min-width: 0;
}

.tc-softerr__retry {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 88px;
    height: 32px;
    margin: 0 0 0 4px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease-out, border-color 0.18s ease-out, color 0.18s ease-out;
}

.tc-softerr__retry::after {
    content: "";
    position: absolute;
    inset: -5px -2px;
}

.tc-softerr__retry:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tc-softerr__retry:focus-visible {
    outline: 2px solid var(--primary-tint, #d9d2ff);
    outline-offset: 2px;
}

.tc-softerr__retry:disabled {
    cursor: default;
    color: rgba(255, 255, 255, 0.6);
}

.tc-softerr__retry capy-loader {
    margin: 0;
}

.tc-softerr__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.tc-softerr--wide {
    margin: 40px auto;
    justify-self: center;
}

.row__posters > .tc-softerr {
    align-self: center;
    margin: 18px 0;
    flex: 0 0 auto;
}

#modal-recommendations-list > .tc-softerr,
#modal-ep-list > .tc-softerr {
    margin: 2px 0 8px;
}

#sidebar-episode-list > .tc-softerr {
    margin: 12px 4px;
}

#actor-credits-list > .tc-softerr {
    margin: 4px 0;
}

.sports-view .sports-state__orb--error,
.sports-state__orb--error {
    color: var(--tc-softerr-icon);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.2);
}

#toast[data-tc-tone="soft"]::before {
    content: "cloud";
    color: var(--tc-softerr-icon);
}

#toast[data-tc-tone="soft"] {
    width: max-content;
    max-width: calc(100vw - 32px);
}

body:has(#offline-banner[style*="flex"]) #toast {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

.tc-softerr-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 10000;
    max-width: min(420px, calc(100vw - 32px));
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(14, 16, 28, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.tc-softerr-toast.is-on {
    opacity: 1;
    transform: translate(-50%, 0);
}

#offline-banner {
    top: auto;
    left: 50%;
    right: auto;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));

    width: max-content;
    max-width: min(460px, calc(100vw - 32px));
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 18px 10px 14px;
    border-radius: 16px;
    transform: translateX(-50%);
    background: rgba(14, 16, 28, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--tc-softerr-ink);
    text-align: left;
    z-index: 10000;
}

#offline-banner i {
    flex: 0 0 auto;
    margin: 0;
    font-size: 1rem;
    color: var(--tc-softerr-icon);
    text-shadow: none;
}

#offline-banner h2 {
    margin: 0;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

#offline-banner p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--tc-softerr-ink);
}

html.no-gpu #offline-banner {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(14, 16, 28, 0.97);
}

@media (max-width: 480px) {
    .tc-softerr {
        font-size: 0.82rem;
    }

    .tc-softerr--wide {
        margin: 28px auto;
    }

    #offline-banner {
        gap: 10px;
        padding: 9px 14px 9px 12px;
    }
}

@keyframes tc-softerr-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

html.reduce-motion .tc-softerr,
html.reduce-motion .tc-softerr-toast {
    animation: none;
    transition: none;
}

@media (prefers-reduced-motion: reduce) {
    .tc-softerr,
    .tc-softerr-toast {
        animation: none;
        transition: none;
    }
}
