/* Current SubTube shell components. Loaded after the legacy compatibility sheet. */

.app-alert,
.workspace-notice,
.st-search-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #d9e3f0;
    background: linear-gradient(145deg, rgba(22, 31, 51, 0.96), rgba(13, 20, 35, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    font-size: 0.8rem;
    line-height: 1.65;
}

.app-alert::before,
.workspace-notice::before {
    flex: 0 0 auto;
    color: #a78bfa;
    content: "●";
    font-size: 0.62rem;
    line-height: 1.65rem;
}

.app-alert.is-error,
.app-alert.is-danger,
.workspace-notice.is-error {
    border-color: rgba(248, 113, 113, 0.32);
    color: #fecaca;
    background: linear-gradient(145deg, rgba(64, 24, 36, 0.92), rgba(28, 18, 31, 0.98));
}

.app-alert.is-error::before,
.app-alert.is-danger::before,
.workspace-notice.is-error::before {
    color: #fb7185;
}

.app-alert.is-success,
.workspace-notice.is-success {
    border-color: rgba(74, 222, 128, 0.28);
    color: #bbf7d0;
    background: linear-gradient(145deg, rgba(17, 55, 46, 0.92), rgba(15, 30, 34, 0.98));
}

.app-alert.is-success::before,
.workspace-notice.is-success::before {
    color: #4ade80;
}

.app-alert.is-warning {
    border-color: rgba(250, 204, 21, 0.28);
    color: #fef08a;
    background: linear-gradient(145deg, rgba(65, 48, 20, 0.92), rgba(31, 27, 26, 0.98));
}

.app-alert.is-warning::before {
    color: #facc15;
}

.app-alert.is-info {
    border-color: rgba(85, 215, 255, 0.28);
    color: #bae6fd;
}

.app-alert.is-info::before {
    color: #55d7ff;
}

.app-flash-stack {
    display: grid;
    gap: 10px;
}

.app-toast {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 3200;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(390px, calc(100vw - 36px));
    min-height: 54px;
    padding: 11px 12px 11px 14px;
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 13px;
    color: #fecaca;
    background: rgba(45, 20, 32, 0.97);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.38);
    font-size: 0.78rem;
    line-height: 1.55;
    backdrop-filter: blur(14px);
}

.app-toast > i {
    flex: 0 0 auto;
    color: #fb7185;
}

.app-toast > span {
    min-width: 0;
    flex: 1 1 auto;
}

.app-toast-close {
    display: grid;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: #aebbd0;
    background: rgba(255, 255, 255, 0.06);
}

.app-toast-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
}

.app-language-picker {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    color: #91a2b9;
    background: rgba(14, 22, 38, 0.86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    transition: border-color 0.18s ease, background 0.18s ease;
}

.app-language-picker:hover,
.app-language-picker:focus-within {
    border-color: rgba(167, 139, 250, 0.45);
    background: rgba(24, 32, 52, 0.96);
}

.app-language-picker > i:first-child {
    margin-right: 7px;
    color: #55d7ff;
}

.app-language-picker > i:last-child {
    color: #71819a;
    font-size: 0.65rem;
    pointer-events: none;
}

.app-language-picker > span {
    margin-right: 7px;
    color: #71819a;
    font-size: 0.67rem;
    font-weight: 750;
    letter-spacing: 0.05em;
}

.app-language-picker select {
    max-width: 150px;
    min-height: 36px;
    padding: 0 8px 0 0;
    border: 0;
    outline: 0;
    appearance: none;
    color: #dce5f1;
    background: transparent;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.app-language-picker select option {
    color: #e7edf6;
    background: #111a2c;
}

.app-google-translate-source {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

body > .skiptranslate,
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body.app-body {
    top: 0 !important;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5, 10, 21, 0.88);
    backdrop-filter: blur(12px);
}

.loading-overlay[hidden] {
    display: none !important;
}

.app-inline-spinner {
    display: inline-block;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: app-loading-spin 0.75s linear infinite;
}

.app-inline-spinner.is-large {
    width: 36px;
    height: 36px;
    border-width: 3px;
    color: #a78bfa;
}

.app-loading-indicator {
    display: grid;
    justify-items: center;
    gap: 14px;
    min-width: 220px;
    padding: 24px;
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 16px;
    color: #cbd5e1;
    background: linear-gradient(145deg, rgba(20, 29, 49, 0.97), rgba(11, 17, 31, 0.98));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    font-size: 0.78rem;
    font-weight: 700;
}

.app-loading-orbit {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(167, 139, 250, 0.18);
    border-top-color: #a78bfa;
    border-right-color: #55d7ff;
    border-radius: 50%;
    animation: app-loading-spin 0.75s linear infinite;
}

body.app-body #scrollTopBtn.app-scroll-top {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 1200;
    display: grid !important;
    width: 46px !important;
    height: 46px !important;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(167, 139, 250, 0.42);
    border-radius: 13px !important;
    color: #fff;
    background: linear-gradient(135deg, #7041e8, #8b5cf6);
    box-shadow: 0 14px 32px rgba(31, 18, 70, 0.36);
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

body.app-body #scrollTopBtn.app-scroll-top:hover {
    box-shadow: 0 18px 38px rgba(75, 42, 162, 0.42);
    transform: translateY(-2px);
}

body.app-body #scrollTopBtn.app-scroll-top.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
}

@keyframes app-loading-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 767.98px) {
    .app-footer-language {
        justify-content: center;
    }

    .app-language-picker {
        min-height: 42px;
    }

    .app-language-picker select {
        min-height: 40px;
    }

    body.app-body #scrollTopBtn.app-scroll-top {
        right: 16px !important;
        bottom: calc(var(--st-mobile-nav-height, 82px) + 16px + env(safe-area-inset-bottom)) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-loading-orbit {
        animation-duration: 1.5s;
    }
}
