/* REVELMONT SUPPORT CHAT V1 */

.support-chat-widget {
    position: fixed;
    right: 20px;
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 4900;
    font-family: var(--rv-font-family, inherit);
}

.support-chat-launcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--rv-teal, #0f8199);
    color: #fff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, .28);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.support-chat-launcher:hover {
    transform: translateY(-1px);
}

.support-chat-launcher__icon {
    font-size: 1.2rem;
}

.support-chat-launcher__badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
}

.support-chat-panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    width: min(390px, calc(100vw - 32px));
    max-height: min(650px, calc(100vh - 120px));
    overflow: hidden;
    border: 1px solid var(--rv-line, #dbe2ea);
    border-radius: 18px;
    background: var(--rv-card, #fff);
    color: var(--rv-text, #1a2435);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.support-chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: var(--rv-teal, #0f8199);
    color: #fff;
}

.support-chat-header strong,
.support-chat-header span {
    display: block;
}

.support-chat-header strong {
    font-size: 1rem;
}

.support-chat-header span {
    margin-top: 2px;
    opacity: .88;
    font-size: .78rem;
}

.support-chat-close {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 1.7rem;
    line-height: 1;
}

.support-chat-start,
.support-chat-conversation {
    padding: 16px;
}

.support-chat-intro {
    margin: 0 0 14px;
    color: var(--rv-muted, #5e6878);
    font-size: .9rem;
    line-height: 1.5;
}

.support-chat-start-form label {
    display: block;
    margin-bottom: 11px;
}

.support-chat-start-form label > span:first-child {
    display: block;
    margin-bottom: 5px;
    font-size: .78rem;
    font-weight: 800;
}

.support-chat-start-form input:not([type="checkbox"]),
.support-chat-start-form textarea,
.support-chat-composer textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--rv-line, #dbe2ea);
    border-radius: 10px;
    background: var(--rv-card, #fff);
    color: inherit;
    font: inherit;
    font-size: .9rem;
}

.support-chat-start-form input:not([type="checkbox"]) {
    min-height: 42px;
    padding: 8px 10px;
}

.support-chat-start-form textarea,
.support-chat-composer textarea {
    padding: 10px;
    resize: vertical;
}

.support-chat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.support-chat-privacy {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    color: var(--rv-muted, #5e6878);
    font-size: .72rem;
    line-height: 1.4;
}

.support-chat-privacy input {
    flex: none;
    margin-top: 2px;
}

.support-chat-privacy a {
    color: var(--rv-teal, #0f8199);
}

.support-chat-primary,
.support-chat-secondary {
    min-height: 42px;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.support-chat-primary {
    border: 1px solid var(--rv-teal, #0f8199);
    background: var(--rv-teal, #0f8199);
    color: #fff;
}

.support-chat-start-form > .support-chat-primary {
    width: 100%;
}

.support-chat-secondary {
    padding: 8px 14px;
    border: 1px solid var(--rv-line, #dbe2ea);
    background: transparent;
    color: inherit;
}

.support-chat-error {
    margin: 12px 16px 0;
    padding: 9px 11px;
    border-radius: 9px;
    background: rgba(220, 38, 38, .10);
    color: #b91c1c;
    font-size: .8rem;
}

.support-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 9px;
    height: min(360px, calc(100vh - 310px));
    min-height: 220px;
    overflow-y: auto;
    padding: 2px 2px 12px;
}

.support-chat-message {
    max-width: 85%;
    padding: 9px 11px;
    border-radius: 12px;
    font-size: .86rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.support-chat-message--visitor {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    background: var(--rv-teal, #0f8199);
    color: #fff;
}

.support-chat-message--operator {
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    background: var(--rv-teal-soft, #e6f5f7);
    color: var(--rv-text, #1a2435);
}

.support-chat-message--system {
    align-self: center;
    max-width: 95%;
    background: transparent;
    color: var(--rv-muted, #687386);
    font-size: .72rem;
    text-align: center;
}

.support-chat-message__time {
    display: block;
    margin-top: 4px;
    opacity: .7;
    font-size: .65rem;
}

.support-chat-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    padding-top: 11px;
    border-top: 1px solid var(--rv-line, #dbe2ea);
}

.support-chat-composer .support-chat-primary {
    padding: 0 14px;
}

.support-chat-closed {
    padding-top: 12px;
    border-top: 1px solid var(--rv-line, #dbe2ea);
    text-align: center;
}

.support-chat-closed p {
    margin: 0 0 9px;
    color: var(--rv-muted, #687386);
    font-size: .8rem;
}

.support-chat-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

html[data-theme="dark"] .support-chat-panel {
    --rv-card: #111827;
    --rv-text: #e5edf7;
    --rv-muted: #9aa8ba;
    --rv-line: #334155;
}

html[data-theme="dark"] .support-chat-message--operator {
    background: #19333b;
    color: #e5edf7;
}

@media (max-width: 640px) {
    .support-chat-widget {
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
    }

    .support-chat-launcher {
        min-height: 48px;
        padding: 0 15px;
    }

    .support-chat-panel {
        position: fixed;
        right: 10px;
        bottom: 72px;
        left: 10px;
        width: auto;
        max-height: calc(100dvh - 90px);
    }

    .support-chat-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .support-chat-messages {
        height: min(310px, calc(100dvh - 330px));
    }
}

/* =========================================================
   SUPPORT_CHAT_V3A_R3_PUBLIC_AVAILABILITY
   ========================================================= */

.support-chat-header__identity {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.support-chat-header__text {
    min-width: 0;
}

.support-chat-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
}

.support-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.support-chat-presence {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: rgba(255, 255, 255, .88);
    font-size: .69rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-chat-presence::before {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: #cbd5e1;
    content: "";
}

.support-chat-presence[data-status="online"]::before {
    background: #86efac;
}

.support-chat-presence[data-status="office"]::before {
    background: #67e8f9;
}

.support-chat-presence[data-status="busy"]::before {
    background: #fbbf24;
}

.support-chat-presence[data-status="away"]::before {
    background: #fdba74;
}

.support-chat-presence[data-status="offline"]::before {
    background: #cbd5e1;
}

.support-chat-offline {
    padding: 25px 20px;
    text-align: center;
}

.support-chat-offline__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 13px;
    border-radius: 50%;
    background: var(--rv-teal-soft, #e4f4f6);
    color: var(--rv-teal, #0f8199);
    font-size: 1.35rem;
    font-weight: 900;
}

.support-chat-offline > strong {
    display: block;
    margin-bottom: 7px;
    font-size: 1rem;
}

.support-chat-offline p {
    margin: 0 auto 8px;
    max-width: 310px;
    color: var(--rv-muted, #5e6878);
    font-size: .88rem;
    line-height: 1.5;
}

.support-chat-offline__hours {
    display: block;
    margin-bottom: 17px;
    color: var(--rv-muted, #5e6878);
    font-size: .76rem;
    font-weight: 700;
}

.support-chat-email {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
}

html[data-theme="dark"] .support-chat-offline__icon {
    background: rgba(15, 129, 153, .18);
}

@media (max-width: 640px) {
    .support-chat-avatar {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .support-chat-header__identity {
        gap: 9px;
    }

    .support-chat-offline {
        padding: 22px 16px;
    }
}

/* SUPPORT_CHAT_V3B_DYNAMIC_DESIGN */

.support-chat-widget {
    --support-font-family: "Segoe UI", Arial, sans-serif;
    --support-font-size: 14px;
    --support-heading-size: 16px;
    --support-radius: 14px;
    --support-header-bg: #0f8199;
    --support-header-text: #fff;
    --support-panel-bg: #fff;
    --support-text: #1a2435;
    --support-muted: #687386;
    --support-border: #dbe2ea;
    --support-visitor-bg: #0f8199;
    --support-visitor-text: #fff;
    --support-operator-bg: #e6f5f7;
    --support-operator-text: #1a2435;
    --support-button-bg: #0f8199;
    --support-button-text: #fff;
    --support-launcher-bg: #0f8199;
    font-family: var(--support-font-family);
}

.support-chat-widget .support-chat-launcher {
    background: var(--support-launcher-bg) !important;
    color: var(--support-button-text) !important;
}

.support-chat-widget .support-chat-panel {
    border-color: var(--support-border) !important;
    border-radius: var(--support-radius) !important;
    background: var(--support-panel-bg) !important;
    color: var(--support-text) !important;
    font-family: var(--support-font-family) !important;
}

.support-chat-widget .support-chat-header {
    background: var(--support-header-bg) !important;
    color: var(--support-header-text) !important;
}

.support-chat-widget .support-chat-header strong {
    color: var(--support-header-text) !important;
    font-size: var(--support-heading-size) !important;
}

.support-chat-widget .support-chat-message {
    border-radius: var(--support-radius) !important;
    font-size: var(--support-font-size) !important;
}

.support-chat-widget .support-chat-message--visitor {
    background: var(--support-visitor-bg) !important;
    color: var(--support-visitor-text) !important;
}

.support-chat-widget .support-chat-message--operator {
    background: var(--support-operator-bg) !important;
    color: var(--support-operator-text) !important;
}

.support-chat-widget .support-chat-primary {
    background: var(--support-button-bg) !important;
    border-color: var(--support-button-bg) !important;
    color: var(--support-button-text) !important;
    border-radius: var(--support-radius) !important;
}
