.ttta-widget,
.ttta-widget * {
    box-sizing: border-box;
}

.ttta-widget {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99995;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #0f172a;
}

.ttta-tab {
    width: 48px;
    min-height: 152px;
    border: 0;
    border-radius: 0 18px 18px 0;
    background: linear-gradient(135deg, var(--ttta-primary, #0f172a), #1f2937);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex-direction: column;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .28);
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

.ttta-tab:hover,
.ttta-tab:focus-visible {
    transform: translateX(3px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, .34);
    outline: none;
}

.ttta-tab-icon {
    font-size: 21px;
    line-height: 1;
}

.ttta-tab-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: .02em;
    white-space: nowrap;
}

.ttta-panel {
    position: absolute;
    left: 54px;
    top: 50%;
    transform: translate(-12px, -50%) scale(.96);
    width: 342px;
    max-width: calc(100vw - 70px);
    max-height: min(78vh, 680px);
    overflow: hidden;
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 24px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, .22);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
}

.ttta-widget.ttta-open .ttta-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%) scale(1);
}

.ttta-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 16px 12px;
    background: linear-gradient(135deg, var(--ttta-primary, #0f172a), #1f2937);
    color: #fff;
}

.ttta-panel-head strong {
    display: block;
    font-size: 17px;
    line-height: 1.15;
}

.ttta-panel-head small {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.74);
    font-size: 12px;
}

.ttta-close {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 28px;
}

.ttta-content {
    padding: 14px;
    overflow: auto;
    max-height: min(62vh, 500px);
}

.ttta-loading,
.ttta-error,
.ttta-empty {
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    font-size: 13px;
    color: #475569;
}

.ttta-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 8px;
    font-weight: 900;
    font-size: 14px;
    color: #0f172a;
}

.ttta-section-title span:last-child {
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
}

.ttta-weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ttta-weather-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 7px 20px rgba(15,23,42,.06);
}

.ttta-weather-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ttta-city {
    font-size: 13px;
    font-weight: 900;
    line-height: 1.1;
}

.ttta-temp {
    font-size: 23px;
    font-weight: 950;
    color: var(--ttta-primary, #0f172a);
}

.ttta-icon {
    margin-top: 4px;
    font-size: 20px;
}

.ttta-label {
    margin-top: 6px;
    color: #475569;
    font-size: 12px;
    min-height: 30px;
}

.ttta-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.ttta-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 6px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 750;
}

.ttta-note {
    margin: 10px 2px 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.ttta-panel-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

.ttta-refresh {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--ttta-accent, #f59e0b);
    color: #111827;
    font-weight: 900;
    cursor: pointer;
    font-size: 12px;
}

.ttta-panel-foot span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 767px) {
    .ttta-widget[data-mobile="0"] {
        display: none;
    }

    .ttta-widget {
        left: 0;
        top: auto;
        bottom: 110px;
        transform: none;
    }

    .ttta-tab {
        width: 44px;
        min-height: 126px;
        border-radius: 0 16px 16px 0;
    }

    .ttta-tab-text {
        font-size: 12px;
    }

    .ttta-panel {
        left: 50px;
        top: auto;
        bottom: 0;
        transform: translate(-12px, 8px) scale(.96);
        width: min(330px, calc(100vw - 58px));
        max-height: 72vh;
    }

    .ttta-widget.ttta-open .ttta-panel {
        transform: translate(0, 0) scale(1);
    }

    .ttta-weather-grid {
        grid-template-columns: 1fr;
    }
}
