:root {
    --wlg-primary: #25D366;
    /* WhatsApp Green */
    --wlg-primary-dark: #128C7E;
    --wlg-bg-light: #f0f2f5;
    --wlg-chat-bg: #E5DDD5;
    --wlg-bubble-out: #DCF8C6;
    --wlg-text: #111b21;
    --wlg-secondary-text: #667781;
    --wlg-border: #e9edef;
    --wlg-white: #ffffff;
    --wlg-radius: 24px;
}

.wlg-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--wlg-text);
}

@media (min-width: 768px) {
    .wlg-container {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

/* Left Column: Form */
.wlg-inputs h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--wlg-text);
}

.wlg-form-group {
    margin-bottom: 20px;
}

.wlg-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--wlg-text);
}

.wlg-input,
.wlg-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--wlg-border);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: var(--wlg-white);
    box-sizing: border-box;
    font-family: inherit;
}

.wlg-input:focus,
.wlg-textarea:focus {
    border-color: var(--wlg-primary);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
    outline: none;
}

.wlg-textarea {
    min-height: 120px;
    resize: vertical;
}

.wlg-helper-text {
    font-size: 12px;
    color: var(--wlg-secondary-text);
    margin-top: 6px;
    display: block;
}

.wlg-char-count {
    text-align: right;
    font-size: 12px;
    color: var(--wlg-secondary-text);
    margin-top: 4px;
}

.wlg-btn {
    background-color: var(--wlg-primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.wlg-btn:hover {
    background-color: var(--wlg-primary-dark);
}

/* Result Box */
.wlg-result {
    margin-top: 24px;
    padding: 16px;
    background: var(--wlg-bg-light);
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wlg-result p {
    margin: 0 0 8px;
    font-weight: 600;
    font-size: 14px;
}

.wlg-link-box {
    display: flex;
    gap: 8px;
}

.wlg-link-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--wlg-border);
    border-radius: 8px;
    background: white;
    color: var(--wlg-secondary-text);
    font-size: 14px;
}

.wlg-link-box button {
    background: var(--wlg-text);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

/* Right Column: Phone Mockup */
.wlg-phone-mockup {
    background: var(--wlg-white);
    border: 8px solid var(--wlg-text);
    border-radius: 40px;
    height: 580px;
    width: 300px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.wlg-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 24px;
    background: var(--wlg-text);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 10;
}

.wlg-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--wlg-chat-bg);
    background-image: url('../../images/whatsapp-bg.png');
    /* WhatsApp Doodle bg pattern */
    background-size: 300px;
}

.wlg-header {
    background: var(--wlg-primary-dark);
    padding: 40px 16px 12px;
    display: flex;
    align-items: center;
    color: white;
}

.wlg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    margin-right: 12px;
    background-image: url('../../images/pagespeedcare-icon.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.wlg-contact-info {
    display: flex;
    flex-direction: column;
}

.wlg-contact-name {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
}

.wlg-status {
    font-size: 11px;
    opacity: 0.8;
}

.wlg-chat-area {
    padding: 20px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Messages at bottom like real chat? Or top? Usually top. keeping default for now but flex-end looks more "recent" */
    justify-content: flex-start;
}

.wlg-message-bubble {
    background-color: var(--wlg-bubble-out);
    padding: 8px 12px;
    border-radius: 8px;
    border-top-right-radius: 0;
    position: relative;
    max-width: 85%;
    align-self: flex-end;
    /* Sent message is on the right */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-right: 8px;
    /* Space for tail */
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wlg-bubble-tail {
    position: absolute;
    top: 0px;
    right: 0px;
    color: var(--wlg-bubble-out);
    transform: rotate(40deg);
}

.wlg-preview-text {
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.wlg-meta-time {
    display: block;
    text-align: right;
    font-size: 10px;
    color: rgba(0, 0, 0, 0.45);
    margin-top: 4px;
    margin-bottom: -2px;
}

/* Intl Tel Input Overrides */
.iti {
    width: 100%;
}

.iti__flag-container {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.iti__selected-flag {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}