:root {
    --wa-green: #25D366;
    --wa-green-rgb: 37, 211, 102;
    --wa-dark-green: #075E54;
    --wa-bg: #f8faf7;
    --white: #ffffff;
    --gray-text: #5a6b64;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.main-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.walink-container {
    display: flex;
    gap: 0rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
}

.walink-panel {
    background: #ffffff;
    border-radius: 24px;
    padding: 2rem 1.8rem;
    box-shadow: 0 24px 48px -20px rgba(16,185,129,0.18), 0 8px 20px -8px rgba(15,32,27,0.08);
    border: 1px solid rgba(16,185,129,0.08);
    flex: 1 1 450px;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    align-self: center;
}

.walink-field {
    display: flex;
    flex-direction: column;
}

.walink-label {
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #3a5448;
    margin-bottom: .35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.walink-hint {
    font-size: .68rem;
    text-transform: none;
    font-weight: 500;
    color: #889992;
    letter-spacing: 0;
}

.walink-phone-outer {
    position: relative;
}

.walink-phone-row {
    display: flex;
    align-items: stretch;
    border-radius: 14px;
    border: 1.5px solid #e8efec;
    background: #fbfdfc;
    overflow: hidden;
    transition: all .25s;
}

.walink-phone-row:focus-within {
    border-color: #10B981;
    box-shadow: 0 0 0 4px rgba(16,185,129,0.12);
    background: #ffffff;
}

.walink-phone-row.error {
    border-color: #e74c3c;
}

.walink-flag-btn {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 1rem;
    background: #f5faf7;
    border-right: 1px solid #e0e8e3;
    cursor: pointer;
    font-weight: 600;
    font-size: .85rem;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
    min-width: 100px;
}

.walink-flag-btn:hover {
    background: #e8f7ee;
}

.walink-flag-btn.open .walink-drop-arrow {
    transform: rotate(180deg);
}

.walink-flag-img {
    width: 26px!important;
    height: 18px!important;
    border-radius: 2px!important;
    object-fit: cover!important;
    flex-shrink: 0!important;
    display: inline-block!important;
    max-width: 26px!important;
    box-shadow: 0 1px 2px rgba(0,0,0,.1)!important;
}

.walink-code-text {
    color: #0b2b25;
}

.walink-drop-arrow {
    font-size: .6rem;
    transition: transform .25s;
}

.walink-number-input {
    flex: 1;
    padding: .85rem 1rem;
    border: none;
    font-family: 'Inter',system-ui,sans-serif;
    font-size: .95rem;
    outline: none;
    background: transparent;
    color: #0b2b25;
    min-width: 140px;
}

.walink-number-input::placeholder {
    color: #b0bfb7;
}

.walink-error-msg {
    font-size: .7rem;
    color: #e74c3c;
    margin-top: .25rem;
    display: none;
    font-weight: 500;
}

.walink-error-msg.show {
    display: block;
}

.walink-country-popup {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 35px rgba(0,0,0,.14);
    border: 1px solid #e0e8e3;
    z-index: 999;
    display: none;
    overflow: hidden;
}

.walink-country-popup.show {
    display: block;
}

.walink-country-search {
    width: 100%;
    padding: .65rem .9rem;
    border: none;
    border-bottom: 1px solid #eef3f0;
    font-family: 'Inter',system-ui,sans-serif;
    font-size: .82rem;
    outline: none;
    background: #fafdfb;
    color: #0b2b25;
}

.walink-country-list {
    max-height: 200px;
    overflow-y: auto;
}

.walink-country-item {
    padding: .55rem .9rem;
    cursor: pointer;
    font-size: .8rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    border-bottom: 1px solid #f8faf9;
}

.walink-country-item:hover {
    background: #f5faf7;
}

.walink-country-item.selected {
    background: #e8f7ee;
    font-weight: 600;
}

.walink-country-item .walink-flag-img {
    width: 26px!important;
    height: 18px!important;
    border-radius: 2px!important;
    object-fit: cover!important;
    flex-shrink: 0!important;
    display: inline-block!important;
    max-width: 26px!important;
    box-shadow: 0 1px 2px rgba(0,0,0,.1)!important;
}

.walink-msg-outer {
    position: relative;
}

.walink-msg-input {
    width: 100%;
    padding: .85rem 2.8rem .85rem 1rem;
    border-radius: 14px;
    border: 1.5px solid #e8efec;
    font-family: 'Inter',system-ui,sans-serif;
    font-size: .92rem;
    outline: none;
    transition: all .25s;
    background: #fbfdfc;
    color: #0b2b25;
}

.walink-msg-input:focus {
    border-color: #10B981;
    box-shadow: 0 0 0 4px rgba(16,185,129,0.12);
    background: #ffffff;
}

.walink-msg-input::placeholder {
    color: #b0bfb7;
}

.walink-emoji-trigger {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: .3rem;
    border-radius: 50%;
}

.walink-emoji-trigger:hover {
    background: #f0faf3;
}

.walink-emoji-popup {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0,0,0,.15);
    border: 1px solid #e0e8e3;
    padding: .5rem;
    display: none;
    z-index: 999;
    flex-wrap: wrap;
    gap: .25rem;
    width: 260px;
    margin-top: 3px;
}

.walink-emoji-popup.show {
    display: flex;
}

.walink-emoji-item {
    width: 33px;
    height: 33px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 6px;
}

.walink-emoji-item:hover {
    background: #f0faf3;
    transform: scale(1.2);
}

.walink-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.walink-quick-chip {
    background: #f5faf7;
    border: 1.5px solid #e0e8e3;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
    white-space: nowrap;
    color: #3a5448;
}

.walink-quick-chip:hover {
    background: #e8f7ee;
    border-color: #10B981;
    color: #1a7a3a;
    font-weight: 600;
}

.btn-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.walink-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    padding: .7rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: .8rem;
    cursor: pointer;
    transition: all .25s;
    border: none;
    font-family: 'Inter',system-ui,sans-serif;
    white-space: nowrap;
    flex: 1;
}

.walink-btn-green {
    background: #10B981;
    color: #fff;
    box-shadow: 0 12px 24px -8px rgba(16,185,129,0.55);
}

.walink-btn-green:hover {
    background: #0e9f72;
    transform: translateY(-2px);
}

.walink-btn-white {
    background: #fff;
    color: #1B1F27;
    border: 1.5px solid #e8efec;
}

.walink-btn-white:hover {
    border-color: #10B981;
    transform: translateY(-2px);
}

.walink-btn.copied {
    background: #0e9f72!important;
    color: white!important;
}

.walink-connector {
    font-size: .68rem;
    color: #889992;
    font-weight: 500;
    white-space: nowrap;
    align-self: center;
    letter-spacing: .3px;
}

.walink-connector-arrow {
    display: inline-block;
    animation: walinkSlide 1.5s ease-in-out infinite;
}

@keyframes walinkSlide {
    0%,100% { transform: translateX(0); opacity: .5; }
    50% { transform: translateX(5px); opacity: 1; }
}

#walinkMockupOuter {
    display: flex;
    flex: 0 0 275px;
    align-self: flex-start;
    position: sticky;
    top: 1rem;
    margin: 0;
    padding: 0 8px 8px 0;
    border: 0;
    box-sizing: border-box;
    overflow: visible;
}

#walinkMockupOuter * {
    font-family: 'Inter',system-ui,sans-serif!important;
    line-height: 1.4!important;
    letter-spacing: normal!important;
    text-transform: none!important;
}

#walinkMockupBody {
    position: relative;
    display: block;
    width: 275px;
    background: #1a1a1a;
    border-radius: 34px;
    padding: 9px;
    box-shadow: 8px 8px 0 rgba(37,211,102,.2), 16px 16px 32px -10px rgba(0,0,0,.12);
    border: 3px solid #333;
    margin: 0;
    box-sizing: border-box;
}

#walinkMockupNotch {
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    width: 65px;
    height: 20px;
    background: #1a1a1a;
    border-radius: 0 0 12px 12px;
    z-index: 10;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#walinkMockupScreen {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    height: 460px;
    border: 1px solid #444;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

#walinkMockupHeader {
    display: flex;
    align-items: center;
    gap: .45rem;
    background: #075e54;
    color: #fff;
    padding: 1.6rem .6rem .45rem;
    margin: 0;
    box-sizing: border-box;
    min-height: auto!important;
}

#walinkMockupBack {
    display: inline;
    font-size: .95rem;
    flex-shrink: 0;
    line-height: 1;
    color: #fff;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#walinkMockupAvatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    font-weight: 700;
    font-size: .75rem;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#walinkMockupInfo {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#walinkPhoneContactName {
    display: block;
    font-size: .74rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#walinkMockupStatus {
    display: block;
    font-size: .57rem;
    opacity: .85;
    color: #fff;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#walinkMockupMenu {
    display: inline;
    font-size: .85rem;
    flex-shrink: 0;
    color: #fff;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#walinkPhoneChat {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    flex: 1;
    padding: .35rem .55rem;
    background: #e5ddd5;
    overflow-y: auto;
    margin: 0;
    box-sizing: border-box;
}

#walinkMockupDate {
    display: block;
    text-align: center;
    padding: .2rem 0;
    margin: 0;
    box-sizing: border-box;
}

#walinkMockupDateText {
    display: inline-block;
    background: #e1f3fb;
    color: #4a7c96;
    font-size: .57rem;
    padding: .18rem .55rem;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    margin: 0;
    box-sizing: border-box;
}

#walinkPhoneOutgoing {
    display: none;
    max-width: 84%;
    padding: .35rem .5rem;
    font-size: .67rem;
    line-height: 1.4;
    border-radius: 7px 2px 7px 7px;
    background: #dcf8c6;
    align-self: flex-end;
    color: #303030;
    margin: 0;
    box-sizing: border-box;
}

#walinkPhoneOutgoing.show {
    display: block;
}

#walinkPhoneMsgPreview {
    display: inline;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#walinkPhoneMsgTime {
    display: block;
    font-size: .47rem;
    color: #999;
    text-align: right;
    margin-top: .05rem;
    padding: 0;
    box-sizing: border-box;
}

#walinkMockupFooter {
    display: flex;
    align-items: center;
    gap: .25rem;
    background: #f0f0f0;
    padding: .3rem .5rem;
    border-top: 1px solid #e0e0e0;
    margin: 0;
    box-sizing: border-box;
}

#walinkMockupEmoji {
    display: inline;
    font-size: .95rem;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#walinkPhoneFooterInput {
    display: block;
    flex: 1;
    background: #fff;
    border-radius: 18px;
    padding: .35rem .6rem;
    font-size: .65rem;
    color: #333;
    border: none;
    outline: none;
    font-family: 'Inter',system-ui,sans-serif;
    margin: 0;
    box-sizing: border-box;
}

#walinkPhoneSendBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    font-size: .65rem;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@media(max-width:900px) {
    .walink-connector { display: none; }
}

@media(max-width:860px) {
    .walink-container { flex-direction: column; gap: 1.5rem; }
    .walink-panel { max-width: 100%; }
    #walinkMockupOuter { position: static; max-width: 275px; margin: 0 auto; width: 100%; padding: 0; }
}

@media(max-width:480px) {
    .walink-panel { padding: 1.2rem .9rem; }
    #walinkMockupScreen { height: 430px; }
}
/* wb-hide-mockup-mobile: on phones the result shows inline; the phone mockup is desktop-only */
@media (max-width: 860px) { #walinkMockupOuter, .walink-connector, .walink-live-bridge { display: none !important; } }
