:root {
    color-scheme: light;
    --wc-orange: #e7501e;
    --wc-orange-dark: #d74418;
    --wc-green: #e7501e;
    --wc-green-2: #e7501e;
    --wc-mint: #d9fdd3;
    --wc-paper: #f4f1ea;
    --wc-line: rgba(18, 24, 38, .12);
    --wc-text: #17212b;
    --wc-muted: #667781;
    --wc-danger: #b42318;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

.wc-body {
    margin: 0;
    color: var(--wc-text);
    background: var(--wc-paper);
    font-family: Roboto, Arial, sans-serif;
}

.wc-shell {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
}

.wc-top,
.wc-thread-top {
    min-height: 72px;
    padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
    color: #fff;
    background: var(--wc-green);
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.wc-top {
    justify-content: space-between;
}

.wc-header-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wc-header-brand img {
    width: 118px;
    height: auto;
    display: block;
    flex: 0 0 auto;
}

.wc-header-brand span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.wc-eyebrow {
    display: block;
    font-size: 12px;
    opacity: .82;
}

.wc-top h1,
.wc-auth h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.wc-icon-button,
.wc-search-button,
.wc-send,
.wc-attach {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    color: inherit;
    background: rgba(255, 255, 255, .12);
    text-decoration: none;
    font-size: 21px;
}

.wc-search {
    margin: 10px 12px;
    padding: 0 8px 0 14px;
    height: 48px;
    border: 1px solid var(--wc-line);
    border-radius: 24px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-install-prompt {
    margin: 10px 12px;
    padding: 12px;
    border: 1px solid #ffd5c7;
    border-radius: 8px;
    background: #fff5f2;
    color: var(--wc-text);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 24px rgba(231, 80, 30, .08);
}

.wc-install-prompt[hidden] {
    display: none !important;
}

.wc-install-prompt div {
    min-width: 0;
    flex: 1;
}

.wc-install-prompt strong,
.wc-install-prompt span,
.wc-install-prompt small {
    display: block;
}

.wc-install-prompt strong {
    font-size: 14px;
}

.wc-install-prompt span {
    margin-top: 2px;
    color: var(--wc-muted);
    font-size: 12px;
}

.wc-install-prompt small {
    margin-top: 7px;
    color: #5f6870;
    font-size: 12px;
    line-height: 1.35;
}

.wc-install-prompt button {
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    background: var(--wc-orange);
    color: #fff;
    font-weight: 800;
}

.wc-install-prompt .wc-install-close {
    width: 34px;
    padding: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--wc-orange);
}

.wc-install-prompt.auth-install {
    margin: 18px 0 0;
    text-align: left;
}

.wc-search i {
    color: var(--wc-muted);
}

.wc-search input {
    border: 0;
    outline: 0;
    flex: 1;
    min-width: 0;
    font: inherit;
}

.wc-search-button {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    color: #fff;
    background: var(--wc-green-2);
}

.wc-chat-list {
    background: #fff;
    border-top: 1px solid var(--wc-line);
}

.wc-list-loading,
.wc-list-empty {
    padding: 22px 14px;
    color: var(--wc-muted);
    text-align: center;
    font-weight: 700;
}

.wc-list-loading[hidden] {
    display: none !important;
}

.wc-chat-row {
    min-height: 92px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--wc-line);
    color: inherit;
    text-decoration: none;
    display: flex;
    gap: 12px;
}

.wc-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e7501e, #ff8a4c);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: 0 0 48px;
}

.wc-avatar.small {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
}

.wc-chat-copy {
    min-width: 0;
    flex: 1;
}

.wc-chat-title,
.wc-thread-title {
    display: flex;
    align-items: center;
    min-width: 0;
}

.wc-chat-title {
    justify-content: space-between;
    gap: 12px;
}

.wc-chat-title strong,
.wc-thread-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wc-chat-title time,
.wc-message time {
    color: var(--wc-muted);
    font-size: 12px;
    flex: 0 0 auto;
}

.wc-chat-subtitle,
.wc-chat-preview,
.wc-thread-title small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wc-chat-subtitle {
    margin-top: 2px;
    font-weight: 600;
}

.wc-chat-preview,
.wc-thread-title small {
    color: var(--wc-muted);
    font-size: 13px;
}

.wc-chat-preview.muted {
    margin-top: 4px;
}

.wc-fab {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    position: fixed;
    right: 18px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 15;
    color: #fff;
    background: #25d366;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 32px;
}

.wc-auth-body {
    background-color: #f4f7fa;
    background-image: url("../../assets/images/background_lg.svg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: min(92vw, 920px) auto;
}

.wc-auth {
    width: min(420px, calc(100vw - 32px));
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 44px 0 28px;
    color: #222;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.wc-auth-logo {
    margin-bottom: 28px;
}

.wc-auth-logo img {
    display: block;
    width: 100%;
    max-width: 285px;
    margin: 0 auto;
}

.wc-auth p {
    margin: 8px 0 24px;
    opacity: .82;
}

.wc-field {
    display: block;
    margin-bottom: 24px;
}

.wc-field span {
    display: block;
    margin-bottom: 8px;
    color: inherit;
    font-size: 16px;
    font-weight: 700;
}

.wc-field input,
.wc-field select,
.wc-field textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #d9dfe6;
    border-radius: 9px;
    padding: 8px 12px;
    background: #fff;
    color: var(--wc-text);
    font: inherit;
    text-align: center;
}

.wc-field textarea {
    min-height: 128px;
    resize: vertical;
}

.wc-primary-button {
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    padding: 15px 18px;
    color: #fff;
    background: var(--wc-orange);
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    display: block;
}

.wc-primary-button:hover,
.wc-primary-button:focus {
    color: #fff;
    background: var(--wc-orange-dark);
    text-decoration: none;
}

.wc-alert {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff4ed;
    color: var(--wc-danger);
}

.wc-form-shell {
    background: #fff;
}

.wc-editor {
    padding: 16px 14px 88px;
}

.wc-bottom-action {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .95);
    border-top: 1px solid var(--wc-line);
}

.wc-thread-shell {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.wc-thread-frame {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wc-thread-frame[style*="display:none"],
.wc-thread-frame[style*="display: none"] {
    display: none !important;
}

.wc-thread-frame > .aspNetHidden,
.wc-thread-shell > .aspNetHidden {
    display: none !important;
}

.wc-thread-frame > div {
    min-height: 0;
}

.wc-thread-title {
    border: 0;
    background: transparent;
    color: #fff;
    flex: 1;
    gap: 10px;
    text-align: left;
}

.wc-thread-logo {
    width: 82px;
    height: auto;
    display: block;
    flex: 0 0 auto;
}

.wc-promemoria-banner {
    margin: 10px 10px 8px;
    padding: 11px 10px;
    border: 1px solid #ffd5c7;
    border-left: 4px solid var(--wc-orange);
    border-radius: 8px;
    background: #fff8e9;
    color: var(--wc-text);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 10px 24px rgba(47, 52, 56, .08);
}

.wc-promemoria-banner[hidden] {
    display: none !important;
}

.wc-promemoria-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--wc-orange);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    font-size: 18px;
}

.wc-promemoria-copy {
    min-width: 0;
    flex: 1;
}

.wc-promemoria-copy strong {
    display: block;
    color: #2f3438;
    font-size: 13px;
}

.wc-promemoria-copy p {
    margin: 3px 0 0;
    color: #4e565d;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.wc-promemoria-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(231, 80, 30, .1);
    color: var(--wc-orange);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    font-size: 18px;
}

.wc-channel-tabs {
    padding: 8px;
    background: #fff;
    border-bottom: 1px solid var(--wc-line);
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.wc-channel-tabs.is-loading::after {
    content: "...";
    min-width: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--wc-muted);
    background: #f4f5f5;
    font-weight: 800;
    text-align: center;
}

.wc-channel-tabs a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--wc-muted);
    background: #f4f5f5;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 700;
    font-size: 13px;
}

.wc-channel-tabs a.active {
    color: #fff;
    background: var(--wc-green-2);
}

.thread-alert {
    margin: 8px 12px;
}

.wc-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 10px 16px;
    background:
        linear-gradient(rgba(244, 241, 234, .92), rgba(244, 241, 234, .92)),
        repeating-linear-gradient(45deg, rgba(7, 94, 84, .08) 0 2px, transparent 2px 12px);
}

.wc-message {
    width: fit-content;
    max-width: min(82%, 620px);
    margin: 0 0 10px;
    padding: 8px 10px 6px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}

.wc-message.own {
    margin-left: auto;
    background: var(--wc-mint);
}

.wc-message-author {
    display: block;
    margin-bottom: 2px;
    color: var(--wc-green-2);
    font-size: 12px;
    font-weight: 800;
}

.wc-message p {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.wc-message time {
    display: block;
    margin-top: 4px;
    text-align: right;
}

.wc-attachments {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.wc-attachments img {
    max-width: 210px;
    max-height: 210px;
    border-radius: 8px;
    display: block;
}

.wc-file {
    min-height: 42px;
    padding: 8px;
    border-radius: 8px;
    color: var(--wc-text);
    background: rgba(255, 255, 255, .65);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-composer {
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: #f0f2f5;
    border-top: 1px solid var(--wc-line);
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.wc-composer textarea {
    min-height: 44px;
    max-height: 120px;
    flex: 1;
    border: 0;
    border-radius: 22px;
    padding: 12px 14px;
    resize: none;
    font: inherit;
}

.wc-attach {
    color: var(--wc-muted);
    background: #fff;
}

.wc-attach input {
    display: none;
}

.wc-send {
    color: #fff;
    background: var(--wc-green-2);
}

.wc-info-panel {
    position: fixed;
    top: calc(76px + env(safe-area-inset-top));
    right: 10px;
    left: auto;
    bottom: auto;
    width: min(420px, calc(100vw - 20px));
    z-index: 20;
    max-height: min(68vh, calc(100vh - 96px - env(safe-area-inset-top)));
    overflow-y: auto;
    padding: 14px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .32);
    transform-origin: top right;
}

.wc-info-panel.is-opening {
    animation: wcPanelPop .2s cubic-bezier(.2, .8, .2, 1);
}

.wc-info-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.wc-info-panel .wc-icon-button {
    color: var(--wc-text);
    background: #f4f5f5;
}

.wc-info-panel dl {
    margin: 0;
}

.wc-info-panel dt {
    margin-top: 12px;
    color: var(--wc-muted);
    font-size: 12px;
    font-weight: 800;
}

.wc-info-panel dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.wc-info-person {
    padding: 9px 10px;
    border: 1px solid #edf0f3;
    border-radius: 8px;
    background: #fbfcfd;
    white-space: normal;
}

.wc-info-person.highlighted {
    border-color: #ffd5c7;
    background: #fff5f2;
    box-shadow: inset 3px 0 0 var(--wc-orange);
}

.wc-info-person strong,
.wc-info-person span {
    display: block;
}

.wc-info-person strong {
    color: #2f3438;
    font-size: 14px;
}

.wc-info-person span {
    margin-top: 3px;
    color: var(--wc-muted);
    font-size: 13px;
    line-height: 1.35;
}

.wc-info-subject-group {
    margin-top: 10px;
}

.wc-info-subject-group:first-child {
    margin-top: 0;
}

.wc-info-subject-group h3 {
    margin: 0 0 6px;
    color: var(--wc-orange);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.wc-info-subject-group .wc-info-person + .wc-info-person {
    margin-top: 6px;
}

.wc-info-empty {
    padding: 9px 10px;
    border-radius: 8px;
    background: #f7f7f8;
    color: var(--wc-muted);
    font-size: 13px;
    white-space: normal;
}

@keyframes wcPanelPop {
    from {
        opacity: 0;
        transform: translate(12px, -10px) scale(.92);
    }

    to {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}

.wc-missing {
    padding: 24px;
}

.wc-missing .wc-icon-button {
    color: var(--wc-text);
    background: #fff;
}

@media (min-width: 760px) {
    .wc-shell {
        width: min(760px, 100vw);
        margin: 0 auto;
        border-left: 1px solid var(--wc-line);
        border-right: 1px solid var(--wc-line);
        background: #fff;
    }

    .wc-thread-shell {
        height: 100vh;
    }
}

.wc-secondary-button {
    display: block;
    margin-top: 12px;
    min-height: 48px;
    padding: 13px 18px;
    border: 2px solid var(--wc-orange);
    border-radius: 8px;
    color: var(--wc-orange-dark);
    background: transparent;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}
.wc-secondary-button:visited { color: var(--wc-orange-dark); }
.wc-secondary-button:hover,
.wc-secondary-button:focus { color: #fff; background: var(--wc-orange-dark); border-color: var(--wc-orange-dark); text-decoration: none; }
.wc-secondary-button:focus-visible { outline: 3px solid var(--wc-orange); outline-offset: 3px; }
