.automation-v3-message-preview {
    background: var(--p-color-bg-surface, #ffffff);
    border: 1px solid var(--p-color-border, #dcdcdc);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(26, 26, 26, 0.12);
    min-block-size: 520px;
    overflow: hidden;
}

.automation-v3-message-preview__header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 16px;
}

.automation-v3-message-preview__sender {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.automation-v3-message-preview__avatar {
    align-items: center;
    background: #007258;
    border-radius: 50%;
    color: #bbffe3;
    display: flex;
    flex: 0 0 32px;
    font-size: 18px;
    font-weight: 700;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.automation-v3-message-preview__sender-name {
    color: var(--p-color-text, #1a1a1a);
    font-size: 14px;
    font-weight: 650;
    line-height: 20px;
    overflow: hidden;
    text-decoration: underline dotted;
    text-overflow: ellipsis;
    text-underline-offset: 5px;
    white-space: nowrap;
}

.automation-v3-message-preview__header-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.automation-v3-message-preview__spinner {
    animation: automation-v3-preview-spin 600ms linear infinite;
    border: 2px solid var(--p-color-border, #dcdcdc);
    border-top-color: var(--p-color-bg-fill-brand, #008060);
    border-radius: 50%;
    height: 18px;
    width: 18px;
}

.automation-v3-message-preview__screen {
    background-color: #efe7dd;
    background-image: url("../images/whatsapp-chat-background.webp");
    min-height: 497px;
    overflow-y: auto;
    padding: 24px;
}

.automation-v3-message-preview__bubble {
    background: var(--p-color-bg-surface, #ffffff);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(26, 26, 26, 0.18);
    color: var(--p-color-text, #1a1a1a);
    max-width: 600px;
    position: relative;
}

.automation-v3-message-preview__bubble::before {
    border-bottom: 12px solid transparent;
    border-right: 12px solid var(--p-color-bg-surface, #ffffff);
    content: "";
    height: 0;
    left: -10px;
    position: absolute;
    top: 4px;
    width: 0;
}

.automation-v3-message-preview__message {
    font-size: 14px;
    line-height: 20px;
    padding: 16px 16px 8px;
}

.automation-v3-message-preview__time {
    color: var(--p-color-text-subdued, #616161);
    display: block;
    font-size: 11px;
    line-height: 16px;
    padding-top: 8px;
    text-align: right;
}

.automation-v3-message-preview__actions {
    border-top: 1px solid var(--p-color-border, #dcdcdc);
    padding: 0 8px;
}

.automation-v3-message-preview__action {
    align-items: center;
    color: var(--p-color-text-link, #005bd3);
    display: flex;
    font-size: 14px;
    font-weight: 550;
    gap: 8px;
    justify-content: center;
    line-height: 20px;
    min-height: 42px;
    text-align: center;
}

.automation-v3-message-preview__action + .automation-v3-message-preview__action {
    border-top: 1px solid var(--p-color-border, #dcdcdc);
}

.automation-v3-message-preview__action-icon {
    fill: currentColor;
    flex: 0 0 18px;
    height: 18px;
    width: 18px;
}

.template-message-header {
    font-weight: 700;
    margin: 0 0 8px;
}

.template-message-text {
    margin: 0;
}

.template-message-footer {
    color: var(--p-color-text-subdued, #616161);
    font-size: 12px;
    line-height: 18px;
    margin-top: 8px;
}

@keyframes automation-v3-preview-spin {
    to {
        transform: rotate(360deg);
    }
}
