/* Floating support chat widget — booking page */

.support-chat-root {
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    z-index: 1050;
    font-family: inherit;
}

.support-chat-fab {
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #73BCB1 0%, #5aa89c 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(115, 188, 177, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.support-chat-fab:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 28px rgba(115, 188, 177, 0.55);
    color: #fff;
}

.support-chat-fab i {
    font-size: 1.45rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.support-chat-fab .fab-close {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
}

.support-chat-root.is-open .support-chat-fab .fab-chat {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
}

.support-chat-root.is-open .support-chat-fab .fab-close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.support-chat-panel {
    position: absolute;
    bottom: 72px;
    inset-inline-end: 0;
    width: min(380px, calc(100vw - 32px));
    height: min(560px, calc(100vh - 120px));
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.support-chat-root.is-open .support-chat-panel {
    display: flex;
    animation: supportChatIn 0.22s ease;
}

@keyframes supportChatIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.support-chat-header {
    background: linear-gradient(135deg, #73BCB1 0%, #5aa89c 100%);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.support-chat-header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.support-chat-header h6 {
    margin: 0;
    font-weight: 700;
    font-size: 0.95rem;
}

.support-chat-header small {
    opacity: 0.9;
    font-size: 0.75rem;
}

.support-chat-header-close {
    margin-inline-start: auto;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-chat-body {
    flex: 1;
    overflow: auto;
    background: #f4f6f9;
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.support-chat-messages {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 2px;
    min-height: 0;
}

.support-chat-messages:has(.support-chat-empty) {
    flex: 1;
    margin-top: 0;
    justify-content: center;
}

.support-chat-login {
    margin: auto;
    text-align: center;
    padding: 20px 12px;
    max-width: 280px;
}

.support-chat-login i {
    font-size: 2.2rem;
    color: #73BCB1;
    margin-bottom: 12px;
}

.support-chat-login p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.support-chat-login .btn {
    background: #73BCB1;
    border-color: #73BCB1;
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.55rem 1.25rem;
}

.support-chat-login .btn:hover {
    background: #5aa89c;
    border-color: #5aa89c;
    color: #fff;
}

.sc-bubble {
    max-width: 82%;
    padding: 10px 12px;
    font-size: 0.9rem;
    line-height: 1.45;
    word-wrap: break-word;
}

.sc-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    width: 100%;
}

.sc-row.me {
    align-items: flex-start;
}

.sc-row.them {
    align-items: flex-end;
}

.sc-sender-label {
    font-size: 0.68rem;
    font-weight: 700;
    margin-bottom: 3px;
    padding-inline: 2px;
}

.sc-row.me .sc-sender-label {
    color: #0f766e;
}

.sc-row.them .sc-sender-label {
    color: #475569;
}

.sc-bubble.me {
    background: linear-gradient(135deg, #73BCB1 0%, #5aa89c 100%);
    color: #fff;
    border-radius: 14px;
    border-end-start-radius: 4px;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(115, 188, 177, 0.35);
}

.sc-bubble.them {
    background: #fff;
    color: #1e293b;
    border-radius: 14px;
    border-end-end-radius: 4px;
    border: 1px solid #e2e8f0;
    border-inline-end: 3px solid #94a3b8;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.sc-bubble .sc-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    margin-top: 4px;
}

.sc-bubble.me .sc-meta {
    color: rgba(255, 255, 255, 0.85);
}

.sc-bubble.them .sc-meta {
    color: #64748b;
}

.sc-date-sep {
    align-self: center;
    margin: 10px 0 12px;
}

.sc-date-sep span {
    background: #e9eef3;
    color: #54656f;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 8px;
}

.support-chat-footer {
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid #eef2f7;
    display: none;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.support-chat-footer.is-visible {
    display: flex;
}

.support-chat-footer textarea {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    resize: none;
    min-height: calc(1.45em * 2 + 1rem);
    max-height: 100px;
    font-size: 0.9rem;
    line-height: 1.45;
    box-shadow: none;
}

.support-chat-footer textarea:focus {
    outline: none;
    border-color: #a7d4cd;
    box-shadow: 0 0 0 0.12rem rgba(115, 188, 177, 0.25);
}

.support-chat-send {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #73BCB1;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.support-chat-send:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.support-chat-empty,
.support-chat-loading {
    margin: auto;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 24px;
}

.support-chat-top-loader {
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 6px;
}

@media (max-width: 576px) {
    .support-chat-root {
        bottom: 16px;
        inset-inline-end: 16px;
        inset-inline-start: auto;
    }

    .support-chat-fab {
        margin-inline-start: auto;
    }

    .support-chat-panel {
        inset-inline-end: 0;
        inset-inline-start: auto;
        width: min(380px, calc(100vw - 32px));
        height: min(70vh, 560px);
        bottom: 70px;
    }
}

[dir="ltr"] .sc-row.me {
    align-items: flex-end;
}

[dir="ltr"] .sc-row.them {
    align-items: flex-start;
}

[dir="ltr"] .sc-bubble.me {
    border-radius: 14px;
    border-end-end-radius: 4px;
    border-inline-end: none;
}

[dir="ltr"] .sc-bubble.them {
    border-radius: 14px;
    border-end-start-radius: 4px;
    border-inline-start: 3px solid #94a3b8;
    border-inline-end: 1px solid #e2e8f0;
}
