/* ===== WhatsApp AI Chat - CSS Variables ===== */
/* Based on official WhatsApp brand guidelines: whatsappbrand.com */
:root {
    /* Primary - Official WhatsApp Brand Colors */
    --wa-green: #25D366;          /* Mountain Meadow - primary accent */
    --wa-teal: #128C7E;           /* Teal Green - secondary */
    --wa-teal-dark: #075E54;      /* Bangladesh Green - header */
    --wa-light-green: #DCF8C6;    /* Tea Green - outgoing messages */
    --wa-blue: #34B7F1;           /* Picton Blue - links, media */

    /* Neutrals */
    --wa-dark: #111B21;
    --wa-gray: #667781;
    --wa-gray-light: #8696A0;
    --wa-light: #F0F2F5;
    --wa-white: #FFFFFF;
    --wa-border: #E9EDEF;

    /* Chat Background - Official WhatsApp */
    --wa-chat-bg: #ECE5DD;        /* White Chocolate */

    /* Message Colors */
    --msg-bot-bg: #FFFFFF;
    --msg-user-bg: #DCF8C6;

    /* Blue checkmarks - exact WhatsApp color */
    --wa-blue-check: #53BDEB;

    /* Semantic */
    --wa-danger: #EA0038;
    --wa-warning: #F58300;

    /* Shadows - subtle like WhatsApp */
    --shadow-sm: 0 1px 0.5px rgba(11,20,26,0.13);
    --shadow-md: 0 1px 3px rgba(11,20,26,0.08);
    --shadow-lg: 0 2px 5px rgba(11,20,26,0.1);

    /* Radius - WhatsApp uses 7.5px for message bubbles */
    --radius-sm: 7.5px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.15s ease;
}

/* ===== Sidebar - Hidden by default (shown only on desktop) ===== */
.sidebar {
    display: none;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* WhatsApp Web uses 1rem = 1px trick, but we keep standard for better mobile */
}

body {
    /* Official WhatsApp font stack - system fonts for each platform */
    /* iOS: SF Pro, Android: Roboto, Windows: Segoe UI */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    background: var(--wa-teal-dark);
    color: var(--wa-dark);
    line-height: 1.3; /* WhatsApp uses 1.3 */
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Chat Wrapper ===== */
.chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    min-width: 320px;
    max-width: 100%;
    margin: 0 auto;
    background: var(--wa-white);
    position: relative;
}

/* ===== Chat Header (WhatsApp Mobile Style) ===== */
.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px 8px 4px;
    background: var(--wa-teal-dark);
    color: var(--wa-white);
    position: relative;
    z-index: 100;
    min-height: 56px; /* Standard Android header height */
}

.chat-header__back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 48px;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 4px;
}

.chat-header__back svg {
    width: 24px;
    height: 24px;
}

.chat-header__avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: none; /* WhatsApp doesn't have border on avatar */
}

.online-indicator {
    display: none; /* WhatsApp mobile doesn't show online dot on avatar in chat */
}

.chat-header__info {
    flex: 1;
    min-width: 0;
    padding-left: 4px;
}

.chat-header__name {
    font-size: 17px;
    font-weight: 500; /* WhatsApp uses medium weight */
    color: var(--wa-white);
    letter-spacing: normal;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-header__status {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    line-height: 1.2;
}

.chat-header__actions {
    display: flex;
    gap: 0;
    margin-left: auto;
}

.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--wa-white);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.header-btn:active {
    background: rgba(255,255,255,0.1);
}

/* ===== Chat Messages ===== */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    padding-bottom: 80px; /* Отступ = высота footer + запас */
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
    /* Original WhatsApp doodle background */
    background-color: #E4DDD6;
    background-image: url('../images/wa-bg.png');
    background-repeat: repeat;
}

/* Custom Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

/* ===== Message Bubbles (WhatsApp Style - With Tails) ===== */
.message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: messageIn 0.3s ease-out;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message--bot {
    align-self: flex-start;
}

.message--user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message__avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    align-self: flex-end;
}

.message__avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.message--user .message__avatar {
    display: none;
}

.message__content {
    position: relative;
    padding: 6px 7px 8px 9px;
    border-radius: 7.5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-shadow: var(--shadow-sm);
    max-width: 100%;
}

/* Bot messages - White with left tail */
.message--bot .message__content {
    background: var(--msg-bot-bg);
    color: var(--wa-dark);
    border-top-left-radius: 0;
}

/* Bot message tail - exact WhatsApp shape */
.message--bot .message__content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 8px;
    height: 13px;
    background: var(--msg-bot-bg);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

/* User messages - Light green with right tail */
.message--user .message__content {
    background: var(--msg-user-bg);
    color: var(--wa-dark);
    border-top-right-radius: 0;
}

/* User message tail - exact WhatsApp shape */
.message--user .message__content::before {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 8px;
    height: 13px;
    background: var(--msg-user-bg);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.message__text {
    font-size: 14.2px; /* WhatsApp default message font size */
    line-height: 19px;
    color: #111B21;
}

.message__time {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    float: right;
    margin-left: 4px;
    margin-top: 2px;
    margin-bottom: -5px;
    color: rgba(0, 0, 0, 0.45);
    line-height: 15px;
}

/* Blue checkmarks for user messages - exact WhatsApp style */
.message--user .message__time::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 11px;
    margin-left: 3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='11' viewBox='0 0 16 11'%3E%3Cpath fill='%2353BDEB' d='M11.071.653a.457.457 0 0 0-.304-.102.493.493 0 0 0-.381.178l-6.19 7.636-2.405-2.272a.463.463 0 0 0-.336-.146.47.47 0 0 0-.343.146l-.311.31a.445.445 0 0 0-.14.337c0 .136.047.25.14.343l2.996 2.996a.724.724 0 0 0 .27.18.506.506 0 0 0 .58-.14l6.764-8.345a.458.458 0 0 0 .1-.313.462.462 0 0 0-.154-.334l-.286-.229zm-2.945 7.636l.616.616a.724.724 0 0 0 .27.18.506.506 0 0 0 .58-.14l6.764-8.345a.458.458 0 0 0 .1-.313.462.462 0 0 0-.154-.334l-.286-.229a.457.457 0 0 0-.304-.102.493.493 0 0 0-.381.178l-6.19 7.636-.001.001-.614.652z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.message--bot .message__time,
.message--user .message__time {
    color: rgba(0, 0, 0, 0.45);
}

/* ===== Answer Buttons (WhatsApp Business Style) ===== */
.buttons-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 85%;
    align-self: flex-end;
    animation: messageIn 0.3s ease-out;
}

.answer-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: var(--wa-white);
    color: var(--wa-teal);
    border: 1.5px solid var(--wa-teal);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
}

/* Short buttons (2 items, short text) display in row */
.buttons-container.buttons-inline {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.buttons-container.buttons-inline .answer-btn {
    width: auto;
    flex: 0 0 auto;
    padding: 10px 24px;
    border-radius: var(--radius-full);
}

.answer-btn:hover {
    background: var(--wa-teal);
    color: var(--wa-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.answer-btn:active {
    transform: translateY(0);
}

.answer-btn:disabled,
.answer-btn--disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.answer-btn:disabled:hover,
.answer-btn--disabled:hover {
    background: var(--wa-white);
    color: var(--wa-teal);
    transform: none;
}

.buttons-container.buttons-used {
    pointer-events: none;
}

.answer-btn--selected {
    background: var(--wa-teal);
    color: var(--wa-white);
}

/* ===== Typing Indicator ===== */
.typing-indicator-wrapper {
    animation: messageIn 0.3s ease-out;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--wa-gray-light);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* ===== Chat Input (WhatsApp Mobile Style) ===== */
.chat-input {
    padding: 5px 5px 5px 5px;
    background: #F0F2F5;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.chat-input__container {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--wa-white);
    border-radius: 21px;
    padding: 5px 8px 5px 12px;
    border: none;
    box-shadow: var(--shadow-sm);
    flex: 1;
    min-height: 42px;
}

.chat-input__container:focus-within {
    box-shadow: var(--shadow-sm);
}

.input-field {
    flex: 1;
    padding: 0;
    display: flex;
    align-items: center;
}

.input-field input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: var(--wa-dark);
    outline: none;
    line-height: 20px;
    padding: 8px 0;
}

.input-field input::placeholder {
    color: #667781;
}

/* Send Button - круглая зелёная кнопка справа от инпута */
.send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--wa-teal);
    border: none;
    color: var(--wa-white);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.send-btn:active {
    background: var(--wa-teal-dark);
}

.send-btn:disabled {
    background: var(--wa-teal);
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Date Separator ===== */
.date-separator {
    display: flex;
    justify-content: center;
    margin: 16px 0;
    animation: fadeIn 0.5s ease;
}

.date-separator__text {
    background: #E1F2FB;
    color: #54656F;
    font-size: 12.5px;
    font-weight: 400;
    padding: 5px 12px 6px;
    border-radius: 7.5px;
    text-transform: uppercase;
    letter-spacing: 0;
    box-shadow: 0 1px 0.5px rgba(11,20,26,0.13);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Validation Error ===== */
.input-error {
    color: var(--wa-danger);
    font-size: 0.8rem;
    margin-top: 8px;
    padding-left: 16px;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ===== Desktop Styles (WhatsApp Web Layout) ===== */
@media (min-width: 769px) {
    body {
        background: var(--wa-chat-bg);
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 0;
        min-height: 100vh;
        position: relative;
    }

    /* Sidebar (Chat list) */
    .sidebar {
        display: flex;
        flex-direction: column;
        width: 30%;
        min-width: 340px;
        max-width: 500px;
        height: 100vh;
        background: var(--wa-white);
        position: relative;
        z-index: 1;
        border-right: 1px solid var(--wa-border);
        box-shadow: 0 6px 18px rgba(11,20,26,0.05);
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
        background: var(--wa-light);
        min-height: 59px;
    }

    .sidebar-header__title {
        font-size: 22px;
        font-weight: 700;
        color: var(--wa-dark);
    }

    .sidebar-search {
        padding: 8px 12px;
        background: var(--wa-white);
        border-bottom: 1px solid var(--wa-border);
    }

    .sidebar-search__input {
        width: 100%;
        padding: 8px 32px 8px 12px;
        background: var(--wa-light);
        border: none;
        border-radius: 8px;
        font-size: 14px;
        color: var(--wa-dark);
        outline: none;
    }

    .sidebar-search__input::placeholder {
        color: var(--wa-gray);
    }

    .chat-list {
        flex: 1;
        overflow-y: auto;
    }

    .chat-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        cursor: pointer;
        transition: background 0.15s;
        border-bottom: 1px solid var(--wa-border);
    }

    .chat-item:hover {
        background: var(--wa-light);
    }

    .chat-item.active {
        background: var(--wa-light);
    }

    .chat-item__avatar {
        width: 49px;
        height: 49px;
        border-radius: 50%;
        flex-shrink: 0;
    }

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

    .chat-item__name {
        font-size: 17px;
        font-weight: 400;
        color: var(--wa-dark);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .chat-item__last-message {
        font-size: 14px;
        color: var(--wa-gray);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .chat-item__time {
        font-size: 12px;
        color: var(--wa-gray);
        align-self: flex-start;
        margin-top: 4px;
    }

    /* Main chat area */
    .chat-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
        height: 100vh;
        min-height: 0;
        border-radius: 0;
        max-width: 70%;
        width: auto;
        box-shadow: 0 6px 18px rgba(11,20,26,0.05);
        position: relative;
        z-index: 1;
    }

    .chat-header {
        border-radius: 0;
        padding: 10px 16px;
    }

    .chat-header__back {
        display: none; /* Hide back button on desktop */
    }

    .message {
        max-width: 65%;
    }

    .buttons-container {
        max-width: 65%;
    }

    .chat-messages {
        padding: 20px 60px;
    }
}

/* ===== Tablet Styles ===== */
@media (min-width: 481px) and (max-width: 768px) {
    body {
        background: linear-gradient(180deg, var(--wa-teal-dark) 0%, var(--wa-teal-dark) 15%, var(--wa-chat-bg) 15%);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 16px;
    }

    .chat-wrapper {
        max-width: 100%;
        height: 95vh;
        border-radius: var(--radius-md);
        overflow: hidden;
        box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    }
}

/* ===== Mobile Styles (Primary - WhatsApp is mobile-first) ===== */
@media (max-width: 480px) {
    html {
        font-size: 16px;
    }

    .chat-header {
        padding: 8px 4px 8px 4px;
        gap: 8px;
        min-height: 56px;
    }

    .chat-header__back {
        width: 24px;
        height: 48px;
        margin-left: 4px;
    }

    .avatar-img {
        width: 40px;
        height: 40px;
    }

    .chat-header__name {
        font-size: 17px;
    }

    .chat-header__status {
        font-size: 13px;
    }

    .header-btn {
        width: 48px;
        height: 48px;
    }

    .chat-messages {
        padding: 8px 8px;
        padding-bottom: 65px;
        gap: 2px; /* WhatsApp has minimal gap between messages */
    }

    .message {
        max-width: 85%;
        margin-bottom: 2px;
    }

    .message__content {
        padding: 6px 7px 8px 9px;
    }

    .message__text {
        font-size: 14.2px;
        line-height: 19px;
    }

    .buttons-container {
        max-width: 90%;
        padding: 0;
        gap: 6px;
    }

    .answer-btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .chat-input {
        padding: 5px;
    }

}

/* ===== Small Mobile (iPhone SE, small Androids) ===== */
@media (max-width: 360px) {
    .chat-header__name {
        font-size: 16px;
    }

    .chat-header__status {
        font-size: 12px;
    }

    .avatar-img {
        width: 36px;
        height: 36px;
    }

    .message__text {
        font-size: 14px;
    }

    .answer-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .send-btn {
        width: 38px;
        height: 38px;
    }

    .chat-input__container {
        min-height: 38px;
    }
}

/* ===== Very Small Mobile (iPhone 5/SE 1st gen, 320px) ===== */
@media (max-width: 320px) {
    .chat-header {
        padding: 6px 2px;
        gap: 6px;
        min-height: 50px;
    }

    .avatar-img {
        width: 32px;
        height: 32px;
    }

    .chat-header__name {
        font-size: 15px;
    }

    .chat-header__status {
        font-size: 11px;
    }

    .message {
        max-width: 90%;
    }

    .message__text {
        font-size: 13px;
    }
}

/* ===== Landscape Mobile ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .chat-header {
        padding: 4px 4px;
        min-height: 48px;
    }

    .avatar-img {
        width: 36px;
        height: 36px;
    }

    .chat-messages {
        padding: 6px 8px;
        padding-bottom: 55px;
    }

    .chat-input {
        padding: 3px 5px;
    }

    .send-btn {
        width: 36px;
        height: 36px;
    }

    .chat-input__container {
        min-height: 36px;
    }
}

/* ===== Notch/Dynamic Island Support (iPhone X+) ===== */
@supports (padding: max(0px)) {
    .chat-wrapper {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .chat-header {
        padding-top: max(8px, env(safe-area-inset-top));
    }

    .chat-input {
        padding-bottom: max(5px, env(safe-area-inset-bottom));
    }
}

/* ===== High DPI Displays (Retina) ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .message__content {
        box-shadow: 0 1px 0.5px rgba(11,20,26,0.13);
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.answer-btn:focus-visible,
.header-btn:focus-visible,
.send-btn:focus-visible {
    outline: 2px solid var(--wa-teal);
    outline-offset: 2px;
}

/* ===== Print Styles ===== */
@media print {
    .chat-header,
    .chat-input {
        display: none;
    }

    .chat-wrapper {
        height: auto;
        max-width: 100%;
    }

    .chat-messages {
        overflow: visible;
    }
}

/* ===== Real-time Validation States ===== */
.input-field.input-valid {
    border-color: var(--wa-green) !important;
}

.input-field.input-valid::after {
    content: "✓";
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wa-green);
    font-size: 1.2rem;
    font-weight: bold;
}

.input-field.input-invalid {
    border-color: var(--wa-danger) !important;
}

.chat-input__container.input-valid {
    box-shadow: 0 0 0 2px var(--wa-green);
}

.chat-input__container.input-invalid {
    box-shadow: 0 0 0 2px var(--wa-danger);
}

/* ===== Social Proof Toast ===== */
.social-proof-toast {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid var(--wa-green);
    color: var(--wa-teal-dark);
    padding: 12px 20px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transition: top 0.3s ease;
    white-space: nowrap;
    max-width: 90%;
    text-align: center;
}

.social-proof-toast.show {
    top: 20px;
}

@media (max-width: 480px) {
    .social-proof-toast {
        font-size: 0.8rem;
        padding: 10px 16px;
        white-space: normal;
        max-width: 85%;
    }
}

/* ===== Resume Dialog ===== */
.resume-dialog {
    display: flex;
    justify-content: center;
    padding: 16px;
    animation: messageIn 0.3s ease-out;
}

.resume-dialog__content {
    background: var(--wa-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    max-width: 300px;
    box-shadow: var(--shadow-md);
}

.resume-dialog__text {
    font-size: 0.95rem;
    color: var(--wa-dark);
    margin-bottom: 16px;
    line-height: 1.5;
}

.resume-dialog__buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resume-dialog__btn {
    padding: 12px 20px;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.resume-dialog__btn--primary {
    background: var(--wa-teal);
    color: white;
}

.resume-dialog__btn--primary:hover {
    background: var(--wa-teal-dark);
}

.resume-dialog__btn--secondary {
    background: transparent;
    color: var(--wa-gray);
    border: 1px solid var(--wa-border);
}

.resume-dialog__btn--secondary:hover {
    background: var(--wa-light);
    color: var(--wa-dark);
}

/* ===== Trust Badges in Message ===== */
.message__text .trust-badge {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--wa-teal);
    margin-top: 8px;
}

/* ===== Hidden State for Chat Input ===== */
.chat-input.hidden {
    display: none;
}

/* ===== Lead Submit Loader ===== */
.lead-submit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 27, 33, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.lead-submit-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.lead-submit-overlay__card {
    min-width: 220px;
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.lead-submit-overlay__spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 10px;
    border: 3px solid #d9e2e8;
    border-top-color: var(--wa-teal);
    border-radius: 50%;
    animation: leadSubmitSpin 0.8s linear infinite;
}

.lead-submit-overlay__text {
    margin: 0;
    color: #243a4c;
    font-size: 14px;
    font-weight: 600;
}

@keyframes leadSubmitSpin {
    to {
        transform: rotate(360deg);
    }
}
