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

.irmc-widget,
.irmc-launcher {
    font-family: inherit;
}

.irmc-widget[hidden],
.irmc-account-entry[hidden] {
    display: none !important;
}

.irmc-widget {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999998;
    pointer-events: none;
}

.irmc-widget-content {
    position: fixed;
    bottom: 90px;
    width: min(370px, calc(100vw - 24px));
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 38px rgb(0 0 0 / 16%);
    color: #363c47;
    direction: inherit;
    pointer-events: auto;
    animation: irmc-enter .25s ease-out;
}

.irmc-widget-header {
    display: flex;
    min-height: 96px;
    align-items: center;
    gap: 14px;
    padding: 26px 20px 18px;
    background: var(--irmc-widget-color, #2db742);
    color: #fff;
}

.irmc-widget-header-icon {
    flex: 0 0 48px;
}

.irmc-widget-header-icon:empty {
    display: none;
}

.irmc-widget-header-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.irmc-widget-icon-image {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.irmc-widget-heading {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.irmc-widget-description {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.7;
    opacity: .94;
}

.irmc-widget-reply-section {
    padding: 8px 20px 0;
}

.irmc-widget-reply {
    color: #7b818b;
    font-size: 11px;
    line-height: 1.7;
}

.irmc-account-list {
    max-height: min(360px, calc(100vh - 250px));
    padding: 10px 18px 14px;
    overflow: auto;
    overscroll-behavior: contain;
}

.irmc-account-entry + .irmc-account-entry {
    margin-top: 8px;
}

.irmc-account-link {
    display: block;
    color: inherit;
    text-decoration: none !important;
}

.irmc-contact-card {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding: 11px 10px;
    border: 0;
    border-inline-start: 4px solid;
    border-inline-start-color: var(--irmc-widget-color, #2db742);
    border-radius: 8px;
    background: #f5f7f9;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.irmc-account-entry.irmc-is-offline .irmc-contact-card {
    border-color: #aeb4bc !important;
    background: #eceff2;
    box-shadow: none;
}

.irmc-account-entry.irmc-is-offline .irmc-account-image,
.irmc-account-entry.irmc-is-offline .irmc-default-avatar {
    border-color: #aeb4bc !important;
    color: #858b94 !important;
}

.irmc-account-entry.irmc-is-offline .irmc-account-description {
    background: #9aa0a8 !important;
}

.irmc-account-entry.irmc-is-offline .irmc-messenger-link,
.irmc-account-entry.irmc-is-offline .irmc-single-messenger-icon {
    opacity: .68;
    filter: grayscale(.55);
}

.irmc-account-link:hover .irmc-contact-card,
.irmc-account-link:focus-visible .irmc-contact-card,
.irmc-contact-card:hover {
    background: #fff;
    box-shadow: 0 5px 16px rgb(0 0 0 / 8%);
    transform: translateY(-1px);
}

.irmc-account-avatar {
    flex: 0 0 58px;
}

.irmc-account-image,
.irmc-default-avatar {
    width: 58px;
    height: 58px;
    border: 2px solid var(--irmc-widget-color, #2db742);
    border-radius: 50% !important;
    background: #fff;
    object-fit: cover;
}

.irmc-account-image {
    display: block !important;
    padding: 2px;
    opacity: 1 !important;
    visibility: visible !important;
}

.irmc-default-avatar {
    display: grid;
    place-items: center;
    color: var(--irmc-widget-color, #2db742);
    font-size: 30px;
}

.irmc-account-info {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
}

.irmc-account-name {
    max-width: 100%;
    overflow: hidden;
    color: #363c47;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.irmc-account-role {
    color: #858b94;
    font-size: 11px;
    line-height: 1.5;
}

.irmc-availability-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.4;
}

.irmc-availability-status::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.irmc-availability-status.irmc-is-online { color: var(--irmc-widget-color, #168a4b); }
.irmc-availability-status.irmc-is-offline { color: #8a8f98; }

.irmc-account-description {
    display: inline-flex;
    max-width: 100%;
    margin-top: 6px;
    padding: 3px 7px;
    border-radius: 5px;
    background: var(--irmc-widget-color, #2db742);
    color: #fff;
    font-size: 10px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.irmc-messenger-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.irmc-messenger-link,
.irmc-single-messenger-icon {
    display: block;
    border-radius: 9px;
}

.irmc-messenger-link {
    width: 34px;
    height: 34px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.irmc-messenger-link img {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 9px;
}

.irmc-messenger-link:hover,
.irmc-messenger-link:focus-visible {
    outline: none;
    box-shadow: 0 4px 10px rgb(0 0 0 / 16%);
    transform: translateY(-2px);
}

.irmc-single-messenger-icon {
    position: static;
    width: 32px;
    height: 32px;
    margin-top: 9px;
    object-fit: contain;
}

.irmc-launcher {
    position: fixed !important;
    bottom: 20px;
    z-index: 999999999;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.irmc-launcher-button {
    display: grid;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--irmc-widget-color, #2db742);
    box-shadow: 0 5px 18px rgb(0 0 0 / 18%);
    color: #fff;
}

.irmc-default-widget-icon {
    display: block;
    width: 30px;
    height: 30px;
}

.irmc-launcher-close {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
}

.irmc-launcher-close-icon {
    display: block;
    width: 24px;
    height: 24px;
}

.irmc-launcher-close-icon path {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2.4;
}

.irmc-launcher-text {
    display: inline-block;
    margin-inline: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    background: #f7f8fa;
    box-shadow: 0 4px 14px rgb(0 0 0 / 9%);
    color: #34383e;
    font-size: 13px;
    line-height: 1.5;
}

@keyframes irmc-enter {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
    .irmc-widget-content {
        bottom: 86px;
        width: calc(100vw - 20px);
        max-height: calc(100vh - 100px);
    }

    .irmc-widget-header { padding: 22px 16px 15px; }
    .irmc-widget-reply-section { padding-inline: 16px; }
    .irmc-account-list { max-height: calc(100vh - 235px); padding-inline: 12px; }
    .irmc-launcher { bottom: 14px; }
    .irmc-launcher-text { max-width: calc(100vw - 90px); }
}

@media (prefers-reduced-motion: reduce) {
    .irmc-widget-content { animation: none; }
    .irmc-contact-card,
    .irmc-messenger-link { transition: none; }
}
