.wtmg-messaging {
    display: grid;
    gap: 22px;
}

.wtmg-messaging-card {
    border: 1px solid var(--wtmg-account-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 35, 68, 0.055);
}

.wtmg-messaging-inbox {
    padding: 22px;
}

.wtmg-messaging-list {
    display: grid;
    gap: 14px;
}

.wtmg-messaging-thread {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--wtmg-account-border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--wtmg-account-text);
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.wtmg-messaging-thread:hover,
.wtmg-messaging-thread:focus {
    border-color: rgba(31, 79, 153, 0.28);
    box-shadow: 0 12px 28px rgba(31, 79, 153, 0.08);
    color: var(--wtmg-account-text);
    text-decoration: none;
    transform: translateY(-1px);
}

.wtmg-messaging-thread h3 {
    margin: 0 0 5px;
    color: var(--wtmg-account-text);
    font-size: 18px;
    line-height: 1.25;
}

.wtmg-messaging-thread p {
    margin: 0 0 7px;
    color: var(--wtmg-account-green);
    font-size: 13px;
    font-weight: 900;
}

.wtmg-messaging-thread span {
    display: block;
    color: var(--wtmg-account-muted);
    font-size: 14px;
    font-weight: 600;
}

.wtmg-messaging-thread-meta {
    display: grid;
    gap: 9px;
    justify-items: end;
}

.wtmg-messaging-thread-meta time {
    color: var(--wtmg-account-muted);
    font-size: 12px;
    font-weight: 800;
}

.wtmg-messaging-thread-meta strong {
    display: inline-flex;
    min-width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--wtmg-account-blue);
    color: #ffffff;
    font-size: 12px;
}

.wtmg-messaging-empty {
    display: grid;
    justify-items: center;
    padding: 42px 24px;
    text-align: center;
}

.wtmg-messaging-empty div {
    display: inline-flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: var(--wtmg-account-blue-soft);
    color: var(--wtmg-account-blue);
}

.wtmg-messaging-empty svg {
    width: 26px;
    height: 26px;
}

.wtmg-messaging-empty h2 {
    margin: 18px 0 8px;
    color: var(--wtmg-account-text);
}

.wtmg-messaging-empty p {
    margin: 0;
    color: var(--wtmg-account-muted);
}

.wtmg-messaging-conversation {
    overflow: hidden;
}

.wtmg-messaging-conversation-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    border-bottom: 1px solid var(--wtmg-account-border);
    background: linear-gradient(135deg, #ffffff 0%, var(--wtmg-account-blue-soft) 100%);
}

.wtmg-messaging-conversation-head a {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--wtmg-account-blue);
    font-size: 13px;
    font-weight: 900;
}

.wtmg-messaging-conversation-head h2 {
    margin: 0 0 5px;
    color: var(--wtmg-account-text);
    font-size: 24px;
}

.wtmg-messaging-conversation-head p {
    margin: 0;
    color: var(--wtmg-account-muted);
    font-weight: 700;
}

.wtmg-messaging-notice {
  margin: 18px 25px 18px;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  background-color: #bef9be !important;
}

.wtmg-messaging-notice.is-success {
    border: 1px solid rgba(22, 138, 53, 0.22);
    background: var(--wtmg-account-green-soft);
    color: var(--wtmg-account-green-dark);
}

.wtmg-messaging-notice.is-error {
    border: 1px solid rgba(185, 28, 28, 0.22);
    background: #fff1f2;
    color: #991b1b;
}

.wtmg-messaging-messages {
    display: grid;
    gap: 14px;
    padding: 26px;
    background: #f8fafc;
}

.wtmg-messaging-bubble {
    max-width: min(620px, 86%);
    padding: 14px 16px;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 35, 68, 0.045);
}

.wtmg-messaging-bubble.is-mine {
    justify-self: end;
    background: #ffffff;
    color: black;
	padding: 15px;
	width: 95%;
}

.wtmg-messaging-bubble.is-theirs {
    justify-self: start;
    border: 1px solid var(--wtmg-account-border);
    background: #ffffff;
    color: var(--wtmg-account-text);
	padding: 15px;
}

.wtmg-messaging-bubble span,
.wtmg-messaging-bubble time {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.76;
}

.wtmg-messaging-bubble p {
    margin: 7px 0;
    font-size: 15px;
    line-height: 1.6;
	color: gray;
}

.wtmg-messaging-composer {
    display: grid;
    gap: 14px;
    padding: 24px 26px 26px;
    border-top: 1px solid var(--wtmg-account-border);
}

.wtmg-messaging-composer label {
    display: grid;
    gap: 8px;
    color: var(--wtmg-account-text);
    font-size: 13px;
    font-weight: 900;
}

.wtmg-messaging-composer textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    border: 1px solid var(--wtmg-account-border);
    border-radius: 14px;
    color: var(--wtmg-account-text);
    font-size: 15px;
    resize: vertical;
}

.wtmg-messaging-composer button {
    justify-self: start;
}

.wtmg-provider-account-lead-start-conversation {
    margin: 0 0 18px;
}

@media (max-width: 760px) {
    .wtmg-messaging-thread,
    .wtmg-messaging-conversation-head {
        grid-template-columns: 1fr;
        display: grid;
    }

    .wtmg-messaging-thread-meta {
        justify-items: start;
    }

    .wtmg-messaging-bubble {
        max-width: 100%;
    }
}

/* Messaging inbox V2 */

.wtmg-messaging-inbox {
    padding:28px;
}


.wtmg-messaging-thread {
    padding:22px;
    border-radius:20px;
}


.wtmg-messaging-thread h3 {
    font-size:19px;
    font-weight:800;
}


.wtmg-messaging-thread p {
    display:inline-flex;
    width:max-content;
    margin:0 0 10px;
    padding:5px 10px;
    border-radius:999px;
    background:var(--wtmg-account-green-soft);
    color:var(--wtmg-account-green-dark);
    font-size:12px;
}


.wtmg-messaging-thread span {
    max-width:620px;
    font-size:14px;
    line-height:1.5;
}


.wtmg-messaging-thread-meta {
    min-width:110px;
}


.wtmg-messaging-thread-meta time {
    white-space:nowrap;
}


.wtmg-messaging-thread-meta strong {
    justify-self:end;
}


@media(max-width:700px){

.wtmg-messaging-thread {
    grid-template-columns:1fr;
}

.wtmg-messaging-thread-meta {
    justify-items:start;
}

}

