/* ===== LAUNCHER ===== */
.tid-launcher {
    position: fixed;
    left: -145px;
    top: 34%;
    width: 190px;
    min-height: 48px;
    border: none;
    border-radius: 0 12px 12px 0;
    background: linear-gradient(135deg, #0b4fa0 0%, #1565c0 100%);
    box-shadow: 0 6px 20px rgba(10, 60, 120, 0.35);
    color: #fff;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: left 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    padding: 7px 10px 7px 12px;
}

.tid-launcher:hover,
.tid-launcher.active {
    left: 0;
}

.tid-launcher__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: left;
}

.tid-launcher__text small {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.85;
}

.tid-launcher__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    animation: tidIconPulse 2.8s ease-in-out infinite;
}

.tid-launcher.active .tid-launcher__icon {
    animation: none;
    background: rgba(255, 255, 255, 0.25);
}

@keyframes tidIconPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
    60% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
}

/* ===== PANEL ===== */
.tid-panel {
    position: fixed;
    left: 0;
    bottom: 20px;
    top: auto;
    right: auto;
    width: 340px;
    max-width: calc(100vw - 12px);
    background: #f4f6f9;
    border: 1px solid rgba(11, 77, 149, 0.12);
    border-left: none;
    border-radius: 0 16px 16px 16px;
    box-shadow: 6px 8px 32px rgba(15, 40, 81, 0.26);
    z-index: 1052;
    overflow: hidden;
    transform-origin: left bottom;
}

.tid-panel:not(.hidden) {
    animation: tidPanelIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes tidPanelIn {
    from {
        transform: translateX(-24px) scaleX(0.55) scaleY(0.75);
        opacity: 0;
    }
    to {
        transform: translateX(0) scaleX(1) scaleY(1);
        opacity: 1;
    }
}

/* ===== INTRO SCREEN ===== */
.tid-intro {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #062549 0%, #0a4892 55%, #1460bb 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 11;
    border-radius: inherit;
    cursor: pointer;
}

.tid-intro.hiding {
    animation: tidIntroOut 0.45s ease-out forwards;
    pointer-events: none;
}

@keyframes tidIntroOut {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(1.05); }
}

.tid-intro__logo {
    width: 88px;
    height: auto;
    filter: brightness(0) invert(1);
    animation: tidLogoIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes tidLogoIn {
    from { transform: scale(0.3) rotate(-10deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

.tid-intro__hand {
    font-size: 32px;
    animation: tidHandWave 0.5s ease 0.45s both;
}

@keyframes tidHandWave {
    from { transform: translateY(10px) rotate(15deg); opacity: 0; }
    to   { transform: translateY(0) rotate(0deg); opacity: 1; }
}

.tid-intro__title {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
    animation: tidFadeUp 0.4s ease 0.6s both;
}

.tid-intro__sub {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    animation: tidFadeUp 0.4s ease 0.75s both;
}

@keyframes tidFadeUp {
    from { transform: translateY(8px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ===== PANEL HEAD ===== */
.tid-panel__head {
    position: relative;
    background: transparent;
}

.tid-panel__title {
    display: none;
}

.tid-panel__close {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #0b4d95;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    z-index: 13;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: background 0.15s, color 0.15s;
    margin-top:0px;
}

.tid-panel__close:hover {
    background: #0b4d95;
    color: #fff;
}

/* ===== PANEL BODY ===== */
.tid-panel__body {
    padding: 0;
    position: relative;
    cursor: grab;
}

.tid-panel__body:active {
    cursor: grabbing;
}

.tid-opening-image-box {
    margin: 0;
    overflow: hidden;
    border: none;
    background: #eef0f4;
}

.tid-opening-image {
    width: 100%;
    height: 260px;
    object-fit: contain;
    display: block;
}

.tid-help-text {
    display: none;
}

.tid-selected-text {
    min-height: 44px;
    max-height: 80px;
    overflow: auto;
    margin: 0;
    padding: 12px 16px 14px 16px;
    border: none;
    border-top: 1px solid rgba(11, 77, 149, 0.1);
    background: #fff;
    text-align: center;
    color: #0d4b9b;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
}

.tid-actions {
    display: none;
}

.tid-action-btn {
    display: none;
}

.tid-action-btn--primary {
    display: none;
}

.tid-action-btn--secondary {
    display: none;
}

/* ===== VIDEO ===== */
.tid-video-box {
    border: none;
    border-radius: 0;
    padding: 0 0 18px 0;
    background: #eef0f4;
}

.tid-video-player {
    width: 100%;
    height: 260px;
    border-radius: 0;
    background: #eef0f4;
    object-fit: contain;
    display: block;
}

.tid-video-player.hidden {
    display: none !important;
}

.tid-video-loader {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid rgba(11, 77, 149, 0.15);
    border-top-color: #0b4d95;
    z-index: 5;
    pointer-events: none;
    animation: tidSpinLoader 0.7s linear infinite;
}

@keyframes tidSpinLoader {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== VIDEO NAV ===== */
.tid-video-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0b4d95 0%, #1565c0 100%);
    border-radius: 12px;
    margin: -10px 14px 0 14px;
    padding: 7px 10px;
    position: relative;
    z-index: 2;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(11, 77, 149, 0.38);
}

.tid-nav-btn {
    border: none;
    background: transparent;
    color: #fff;
    border-radius: 999px;
    width: 30px;
    height: 30px;
    font-size: 17px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.tid-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
}

.tid-nav-btn:disabled {
    opacity: 0.4;
}

.tid-nav-btn--play {
    width: 54px;
    height: 54px;
    background: #fff;
    color: #0b4d95;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    font-size: 26px;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.tid-nav-btn--play:hover:not(:disabled) {
    transform: scale(1.06);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    background: #f0f6ff;
}

.tid-nav-btn--mail {
    width: 30px;
    height: 30px;
    font-size: 18px;
}

.tid-video-index {
    font-size: 11px;
    color: #d8e6fa;
    min-width: 30px;
    text-align: center;
    display: none;
}

.tid-progress {
    flex: 1;
    min-width: 60px;
    appearance: none;
    height: 8px;
    background: transparent;
    cursor: pointer;
}

.tid-progress::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
}

.tid-progress::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(11, 77, 149, 0.4);
    margin-top: -6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.tid-progress::-moz-range-track {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
}

.tid-progress::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(11, 77, 149, 0.4);
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .tid-launcher {
        top: auto;
        bottom: 100px;
        left: -140px;
        width: 185px;
        min-height: 46px;
        padding: 6px 10px 6px 12px;
    }

    .tid-launcher__text {
        font-size: 12px;
    }

    .tid-launcher__text small {
        font-size: 10px;
    }

    .tid-launcher__icon {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .tid-panel {
        left: 0;
        bottom: 10px;
        right: auto;
        top: auto;
        width: calc(50vw);
        max-width: calc(50vw);
        min-width: 200px;
        border-radius: 0 14px 14px 14px;
    }

    .tid-video-player {
        height: 23vh;
    }

    .tid-opening-image {
        height: auto;
    }

    .tid-nav-btn--play {
        width: 44px;
        height: 44px;
        font-size: 22px;
        margin-top: 0;
    }

    .tid-video-nav {
        margin: -10px 10px 0 10px;
        gap: 4px;
        padding: 5px 6px;
    }

    .tid-nav-btn {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .tid-nav-btn--mail {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .tid-progress {
        min-width: 50px;
        height: 6px;
    }

    .tid-progress::-webkit-slider-runnable-track {
        height: 4px;
    }

    .tid-progress::-webkit-slider-thumb {
        width: 14px;
        height: 14px;
        margin-top: -5px;
    }

    .tid-progress::-moz-range-track {
        height: 4px;
    }

    .tid-progress::-moz-range-thumb {
        width: 12px;
        height: 12px;
    }

    .tid-video-index {
        display: none;
    }

    .tid-selected-text {
        padding: 8px 10px;
        font-size: 13px;
        max-height: 58px;
    }

    .tid-intro__logo {
        width: 70px;
    }

    .tid-intro__hand {
        font-size: 26px;
    }

    .tid-intro__title {
        font-size: 12px;
    }

    .tid-video-box {
        padding-bottom: 14px;
    }
}
