.tp-livechat {
    --tp-chat-navy: #0f2743;
    --tp-chat-navy-2: #17395f;
    --tp-chat-text: #12395f;
    --tp-chat-muted: #5e7691;
    --tp-chat-border: #cfdeec;
    --tp-chat-surface: #f4f8fc;
    --tp-chat-white: #ffffff;
    --tp-chat-success: #41c789;
}

.tp-livechat-presence {
    position: fixed;
    right: 96px;
    bottom: 34px;
    z-index: 998;
    border: 1px solid var(--tp-chat-border);
    background: var(--tp-chat-white);
    color: var(--tp-chat-text);
    border-radius: 999px;
    padding: 10px 14px;
    box-shadow: 0 10px 26px rgba(10, 39, 67, 0.14);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.tp-livechat-presence:hover {
    border-color: #a7c0d8;
    transform: translateY(-1px);
}

.tp-livechat-presence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tp-chat-success);
    box-shadow: 0 0 0 7px rgba(65, 199, 137, 0.14);
    flex-shrink: 0;
}

.tp-livechat-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 0;
    background: var(--tp-chat-navy);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 36px rgba(8, 31, 54, 0.34);
    cursor: pointer;
    z-index: 999;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.tp-livechat-launcher:hover {
    transform: translateY(-2px);
    background: var(--tp-chat-navy-2);
    box-shadow: 0 18px 42px rgba(8, 31, 54, 0.42);
}

.tp-livechat-launcher svg {
    width: 24px;
    height: 24px;
}

.tp-livechat-widget {
    position: fixed;
    right: 24px;
    bottom: 96px;
    width: min(390px, calc(100vw - 28px));
    max-height: min(720px, calc(100vh - 120px));
    display: none;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    background: var(--tp-chat-white);
    border: 1px solid #b8cde0;
    box-shadow: 0 24px 60px rgba(8, 31, 54, 0.28);
    z-index: 1000;
}

.tp-livechat-widget.is-open {
    display: flex;
}

.tp-livechat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 12px;
    background: linear-gradient(135deg, var(--tp-chat-navy) 0%, var(--tp-chat-navy-2) 100%);
    color: #fff;
}

.tp-livechat-head-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tp-livechat-agent-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.tp-livechat-agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tp-livechat-head-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.tp-livechat-head-sub {
    font-size: 0.73rem;
    color: rgba(238, 247, 255, 0.83);
}

.tp-livechat-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tp-livechat-close:hover {
    background: rgba(255, 255, 255, 0.24);
}

.tp-livechat-close svg {
    width: 16px;
    height: 16px;
}

.tp-livechat-messages {
    background: var(--tp-chat-surface);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 390px;
    overflow-y: auto;
}

.tp-livechat-message {
    max-width: 88%;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 0.84rem;
    line-height: 1.5;
    animation: tp-livechat-pop 0.22s ease;
}

@keyframes tp-livechat-pop {
    from { transform: translateY(6px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.tp-livechat-message-bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #d8e5f2;
    color: var(--tp-chat-text);
}

.tp-livechat-message-user {
    align-self: flex-end;
    background: var(--tp-chat-navy-2);
    color: #fff;
}

.tp-livechat-handoff {
    align-self: flex-start;
    width: 100%;
    border: 1px solid #c7d9ec;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%);
    border-radius: 12px;
    padding: 10px 11px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: tp-livechat-pop 0.22s ease;
}

.tp-livechat-handoff-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #173f6a;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.tp-livechat-handoff-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.79rem;
    color: #2d577f;
    padding: 3px 0;
}

.tp-livechat-handoff-row strong {
    font-size: 0.83rem;
    color: #12395f;
}

.tp-livechat-handoff-ref {
    margin-top: 7px;
    border-top: 1px dashed #c0d3e7;
    padding-top: 6px;
    font-size: 0.72rem;
    color: #547497;
}

.tp-livechat-time {
    margin-top: 6px;
    display: block;
    font-size: 0.68rem;
    opacity: 0.72;
}

.tp-livechat-typing {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #d8e5f2;
    color: #507094;
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tp-livechat-dots {
    display: inline-flex;
    gap: 3px;
}

.tp-livechat-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #7ea8cf;
    animation: tp-livechat-dot 1.2s infinite ease-in-out;
}

.tp-livechat-dots span:nth-child(2) { animation-delay: 0.15s; }
.tp-livechat-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes tp-livechat-dot {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
    40% { transform: translateY(-3px); opacity: 1; }
}

.tp-livechat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 14px 12px;
    background: var(--tp-chat-surface);
}

.tp-livechat-quick-btn {
    border: 1px solid #c7d9ec;
    background: #fff;
    color: #173f6a;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.tp-livechat-quick-btn:hover {
    border-color: #8eb2d4;
    background: #f8fbff;
}

.tp-livechat-compose {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 14px;
    border-top: 1px solid #dbe7f2;
    background: #fff;
}

.tp-livechat-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #cfdeec;
    border-radius: 999px;
    padding: 11px 14px;
    font-size: 0.84rem;
    color: var(--tp-chat-text);
    background: #fff;
}

.tp-livechat-input:focus {
    outline: none;
    border-color: #8eb2d4;
    box-shadow: 0 0 0 3px rgba(142, 178, 212, 0.18);
}

.tp-livechat-send {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--tp-chat-navy);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.tp-livechat-send:hover {
    background: var(--tp-chat-navy-2);
}

.tp-livechat-send:disabled,
.tp-livechat-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.tp-livechat-send svg {
    width: 17px;
    height: 17px;
}

.tp-livechat-flights {
    align-self: stretch;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: tp-livechat-pop 0.22s ease;
}

.tp-livechat-flights-head {
    border: 1px solid #c7d9ec;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
    padding: 10px 12px;
}

.tp-livechat-flights-kicker {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5e7691;
    margin-bottom: 4px;
}

.tp-livechat-flights-route {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f2743;
    line-height: 1.2;
}

.tp-livechat-flights-date {
    margin-top: 3px;
    font-size: 0.72rem;
    color: #507094;
}

.tp-livechat-flight-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #c7d9ec;
    border-radius: 14px;
    background: #fff;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 39, 67, 0.06);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.tp-livechat-flight-card:hover {
    border-color: #7ea8cf;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 39, 67, 0.1);
}

.tp-livechat-flight-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px 8px;
    border-bottom: 1px solid #e4eef7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.tp-livechat-flight-airline-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tp-livechat-flight-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 24px;
    padding: 0 6px;
    border-radius: 6px;
    background: #0f2743;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.tp-livechat-flight-airline {
    font-size: 0.78rem;
    font-weight: 700;
    color: #173f6a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-livechat-flight-badge {
    flex-shrink: 0;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0f5f46;
    background: #e7f7ef;
    border: 1px solid #bfe6d1;
    border-radius: 999px;
    padding: 3px 8px;
}

.tp-livechat-flight-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
}

.tp-livechat-flight-point strong {
    display: block;
    font-size: 1.05rem;
    line-height: 1.1;
    color: #12395f;
}

.tp-livechat-flight-point span {
    display: block;
    margin-top: 2px;
    font-size: 0.68rem;
    color: #5e7691;
}

.tp-livechat-flight-point-right {
    text-align: right;
}

.tp-livechat-flight-middle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 72px;
}

.tp-livechat-flight-duration {
    font-size: 0.68rem;
    font-weight: 600;
    color: #507094;
}

.tp-livechat-flight-line {
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, #b8cde0 0%, #173f6a 50%, #b8cde0 100%);
    position: relative;
}

.tp-livechat-flight-line::before,
.tp-livechat-flight-line::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #173f6a;
    transform: translateY(-50%);
}

.tp-livechat-flight-line::before { left: 0; }
.tp-livechat-flight-line::after { right: 0; }

.tp-livechat-flight-stops {
    font-size: 0.64rem;
    color: #5e7691;
}

.tp-livechat-flight-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 12px;
    border-top: 1px solid #e4eef7;
    background: #f8fbff;
}

.tp-livechat-flight-price-value {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #0f2743;
    line-height: 1.1;
}

.tp-livechat-flight-price-label {
    display: block;
    margin-top: 2px;
    font-size: 0.64rem;
    color: #5e7691;
}

.tp-livechat-flight-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: #0f2743;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tp-livechat-flight-card:hover .tp-livechat-flight-cta {
    background: #17395f;
}

.tp-livechat-flights-all {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #b8cde0;
    background: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    color: #173f6a;
    text-decoration: none;
}

.tp-livechat-flights-all:hover {
    border-color: #7ea8cf;
    background: #f8fbff;
}

@media (max-width: 640px) {
    .tp-livechat-presence {
        right: 84px;
        bottom: 24px;
        padding: 8px 12px;
        font-size: 0.68rem;
    }

    .tp-livechat-widget {
        right: 14px;
        left: 14px;
        width: auto;
        bottom: 88px;
    }

    .tp-livechat-messages {
        max-height: 320px;
    }

    .tp-livechat-flight-body {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tp-livechat-flight-middle {
        flex-direction: row;
        justify-content: center;
        min-width: 0;
    }

    .tp-livechat-flight-line {
        width: 56px;
    }

    .tp-livechat-flight-point-right {
        text-align: left;
    }
}
