/* ----- Основные стили (общие для обеих ориентаций) ----- */
.wa-phone-mock-2024 {
    background: #1f1f1f;
    border-radius: 24px;
    padding: 16px 12px;
    box-shadow: 0 0 0 2px #2A2A2C;
    position: relative;
    display: flex;
    gap: 12px;
    align-items: stretch; /* Заполнение по высоте */
}

.wa-nav-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
}

.wa-camera {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
}

.wa-camera::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.wa-phone-screen {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wa-status-bar {
    height: 28px;
    background: #075e54;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: Roboto, sans-serif;
    color: #fff;
    font-size: 14px;
}

.wa-status-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wa-status-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-signal-wifi {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wa-battery {
    width: 24px;
    height: 12px;
    border: 1.5px solid #fff;
    border-radius: 2px;
    padding: 1px;
    position: relative;
}

.wa-battery::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 3px;
    width: 2px;
    height: 4px;
    background: #fff;
    border-radius: 0 1px 1px 0;
}

.wa-battery-level {
    background: #fff;
    width: 80%;
    height: 100%;
    border-radius: 1px;
}

.wa-header {
    background: #128c7e;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-family: Roboto, sans-serif;
}

.wa-header-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-avatar svg {
    width: 24px;
    height: 24px;
    color: rgba(255,255,255,0.8);
}

.wa-contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wa-contact-name {
    font-size: 17px;
    font-weight: 500;
    margin: 0;
    color: #fff !important;
    text-transform: none !important;
}

.wa-contact-status {
    font-size: 13px;
    opacity: 0.8;
    margin: 0;
    color: #fff !important;
    text-transform: none !important;
}

.wa-header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.wa-header-action {
    color: #fff;
    opacity: 0.9;
}

.wa-chat-2024 {
    font-family: Roboto, sans-serif;
    background: #efeae2;
    color: #111b21;
    position: relative;
    flex: 1;
    overflow-y: auto;
}

.wa-chat-2024 .wa-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.06;
    z-index: 0;
}

.wa-chat-2024 .wa-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
    position: relative;
    z-index: 1;
}

.wa-chat-2024 .wa-msg-wrapper {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.wa-chat-2024 .wa-msg {
    padding: 6px 7px 8px 9px;
    border-radius: 7.5px;
    max-width: 75%;
    position: relative;
    box-shadow: 0 1px 0.5px rgba(11,20,26,.13);
}

.wa-chat-2024 .wa-tail {
    position: absolute;
    top: 0;
    width: 8px;
    height: 13px;
    content: '';
}

.wa-chat-2024 .wa-received {
    background: #fff;
    margin-right: auto;
    border-top-left-radius: 0;
}

.wa-chat-2024 .wa-received .wa-tail {
    left: -8px;
}

.wa-chat-2024 .wa-sent {
    background: #e7ffdb;
    margin-left: auto;
    border-top-right-radius: 0;
}

.wa-chat-2024 .wa-sent .wa-tail {
    right: -8px;
}

.wa-chat-2024 .wa-msg p {
    margin: 0;
    line-height: 1.35;
    font-size: 14.2px;
    color: #111b21;
}

.wa-chat-2024 .wa-msg p + p {
    margin-top: 2px;
}

.wa-chat-2024 .wa-time {
    font-size: 11px;
    color: #667781;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    float: right;
    margin-left: 24px;
    margin-bottom: -5px;
    line-height: 15px;
}

/* SVG галочка задана один раз через background-image */
.wa-chat-2024 .wa-check {
    display: inline-block;
    width: 14px;
    height: 11px;
    margin-left: 3px;
    background-image: url("data:image/svg+xml,%3Csvg%20viewBox='0%200%2016%2011'%20fill='%2353bdeb'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20d='M11.0714%200.652832C10.991%200.585124%2010.8894%200.55127%2010.7667%200.55127C10.6186%200.55127%2010.4916%200.610514%2010.3858%200.729004L4.19688%208.36523L1.79112%206.09277C1.70801%206.01693%201.61763%205.96764%201.51997%205.94489C1.42231%205.92214%201.32739%205.93311%201.23522%205.97779C1.14304%206.02246%201.06268%206.09147%200.994141%206.18481C0.925602%206.27816%200.891602%206.37858%200.891602%206.48608C0.891602%206.61224%200.938477%206.72656%201.03223%206.82904L3.86997%209.50635C4.01479%209.64974%204.18164%209.72144%204.37051%209.72144C4.55938%209.72144%204.71598%209.64974%204.84031%209.50635L11.4223%201.27271C11.5101%201.17022%2011.554%201.05241%2011.554%200.919254C11.554%200.786101%2011.5062%200.674153%2011.4106%200.583411L11.0714%200.652832ZM15.1728%200.652832C15.0923%200.585124%2014.9907%200.55127%2014.868%200.55127C14.7199%200.55127%2014.5929%200.610514%2014.4871%200.729004L8.29821%208.36523L7.56934%207.67334L6.94527%208.39772L8.2771%209.50635C8.42192%209.64974%208.58877%209.72144%208.77764%209.72144C8.96651%209.72144%209.12311%209.64974%209.24744%209.50635L15.8237%201.27271C15.9114%201.17022%2015.9553%201.05241%2015.9553%200.919254C15.9553%200.786101%2015.9075%200.674153%2015.8119%200.583411L15.1728%200.652832Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    vertical-align: middle;
}

.wa-chat-2024 .wa-sent strong {
    font-weight: 600;
}

.wa-chat-2024 .wa-time-static {
    font-size: 11px;
    color: #667781;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    float: right;
    margin-left: 24px;
    margin-bottom: -5px;
    line-height: 15px;
}

/* ---------- Стили для горизонтальной ориентации ---------- */
.wa-phone-horizontal {
    flex-direction: row; /* Горизонтальное расположение элементов */
    max-width: none; /* Снять ограничение ширины */
    width: 800px; /* Или любая другая подходящая ширина */
}

.wa-phone-horizontal .wa-phone-screen {
    aspect-ratio: 2.4/1; /* Горизонтальное соотношение сторон */
}

/* ---------- Стили для вертикальной ориентации ---------- */
.wa-phone-vertical {
    flex-direction: column; /* Вертикальное расположение */
    max-width: 400px; /* Ограничение ширины */
}

.wa-phone-vertical .wa-phone-screen {
    aspect-ratio: 9/16; /* Вертикальное соотношение сторон */
}

/* Используем flexbox для центрирования камеры */
.wa-phone-vertical .wa-nav-buttons {
    display: flex;
    justify-content: center; /* Центрирование по горизонтали */
    align-items: flex-start; /* Выравнивание по верхнему краю */
    margin-top: 12px; /* Контроль высоты верхней рамки */
    width: 100%; /* Важно, чтобы занимать всю ширину контейнера */
}

/* Typing Indicator */
.wa-chat-2024 .wa-typing {
    background: #fff;
}

.wa-chat-2024 .wa-typing p {
    display: flex;
    align-items: center;
}

.wa-chat-2024 .wa-typing p span {
    width: 6px;
    height: 6px;
    background-color: #999;
    border-radius: 50%;
    margin-right: 3px;
    animation: pulse 1.5s infinite ease-in-out;
}

.wa-chat-2024 .wa-typing p span:nth-child(2) {
    animation-delay: 0.2s;
}

.wa-chat-2024 .wa-typing p span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* ----- Основные стили (общие для обеих ориентаций) ----- */
/* ... (основные стили, как в предыдущем ответе) ... */

/* ---------- Стили для горизонтальной ориентации ---------- */
.wa-phone-horizontal {
    flex-direction: row; /* Горизонтальное расположение элементов */
    max-width: none; /* Снять ограничение ширины */
    width: 800px; /* Или любая другая подходящая ширина */
}

.wa-phone-horizontal .wa-phone-screen {
    aspect-ratio: 2.4/1; /* Горизонтальное соотношение сторон */
}

/* ---------- Стили для вертикальной ориентации ---------- */
.wa-phone-vertical {
    flex-direction: column; /* Вертикальное расположение */
    max-width: 400px; /* Ограничение ширины */
}

.wa-phone-vertical .wa-phone-screen {
    aspect-ratio: 9/16; /* Вертикальное соотношение сторон */
}

/* Используем flexbox для центрирования камеры */
.wa-phone-vertical .wa-nav-buttons {
    display: flex;
    justify-content: center; /* Центрирование по горизонтали */
    align-items: flex-start; /* Выравнивание по верхнему краю */
    margin-top: 12px; /* Контроль высоты верхней рамки */
    width: 100%; /* Важно, чтобы занимать всю ширину контейнера */
}

/* ---------- Медиа-запрос для мобильных устройств ---------- */
@media (max-width: 768px) {
    .wa-phone-mock-2024 {
        flex-direction: column; /* Вертикальная ориентация */
        max-width: 100%; /* Занять всю ширину экрана */
        width: auto; /* Автоматическая ширина */
    }

    .wa-phone-mock-2024 .wa-phone-screen {
        aspect-ratio: 9/16; /* Вертикальное соотношение */
    }
}