/* ── HelloThaiGo CTA ── */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600&display=swap');

#htgo-cta-wrap {
    position: fixed !important;
    bottom: 28px !important;
    right: 28px !important;
    z-index: 999999 !important;
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* ── Collapsed pill ── */

.htgo-cta-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 18px 12px 24px !important;
    border: none !important;
    border-radius: 50px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    cursor: pointer !important;
    transition: transform 0.2s, background 0.2s !important;
    white-space: nowrap !important;
    color: inherit !important;
    font-size: inherit !important;
    line-height: normal !important;
    text-align: left !important;
}

.htgo-cta-pill:hover,
.htgo-cta-pill:focus {
    transform: translateY(-2px) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: inherit !important;
    outline: none !important;
    text-decoration: none !important;
}

.htgo-cta-pill__text {
    font-size: 20px !important;
    font-weight: 400 !important;
    color: #002A89 !important;
    letter-spacing: 0.01em !important;
}

.htgo-cta-pill__icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

/* ── Expanded channels ── */

.htgo-cta-channels {
    display: flex !important;
    align-items: flex-end !important;
    gap: 10px !important;
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transform: translateY(12px) !important;
    transition: opacity 0.3s, transform 0.3s !important;
}

#htgo-cta-wrap[data-state="expanded"] .htgo-cta-channels {
    pointer-events: auto !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

#htgo-cta-wrap[data-state="expanded"] .htgo-cta-pill {
    pointer-events: none !important;
    opacity: 0 !important;
}

.htgo-cta-channels__list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* ── Channel button ── */

.htgo-cta-channel {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 160px !important;
    padding: 10px 6px 10px 22px !important;
    border: none !important;
    border-radius: 50px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    cursor: pointer !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: transform 0.15s !important;
    font-family: inherit !important;
    font-size: 15px !important;
    line-height: normal !important;
    color: inherit !important;
    text-align: left !important;
    box-shadow: none !important;
}

.htgo-cta-channel:hover,
.htgo-cta-channel:focus,
a.htgo-cta-channel:hover,
a.htgo-cta-channel:focus {
    transform: translateY(-2px) !important;
    text-decoration: none !important;
    color: inherit !important;
    background: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    outline: none !important;
}

.htgo-cta-channel__text {
    flex: 1 !important;
    text-align: center !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    color: #002A89 !important;
}

.htgo-cta-channel__icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}

.htgo-cta-channel__icon--messenger { background: #0084FF !important; }
.htgo-cta-channel__icon--whatsapp  { background: #25D366 !important; }
.htgo-cta-channel__icon--wechat    { background: #09B83E !important; }
.htgo-cta-channel__icon--line      { background: #06C755 !important; }

/* ── Close button ── */

.htgo-cta-close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    align-self: flex-end !important;
    transition: transform 0.15s !important;
    padding: 0 !important;
    color: inherit !important;
}

.htgo-cta-close:hover,
.htgo-cta-close:focus {
    transform: scale(1.1) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: inherit !important;
    outline: none !important;
}

/* ── Stagger animation ── */

#htgo-cta-wrap[data-state="expanded"] .htgo-cta-channel {
    animation: htgo-slide-in 0.3s ease both !important;
}
#htgo-cta-wrap[data-state="expanded"] .htgo-cta-channels__list .htgo-cta-channel:nth-child(1) { animation-delay: 0.05s !important; }
#htgo-cta-wrap[data-state="expanded"] .htgo-cta-channels__list .htgo-cta-channel:nth-child(2) { animation-delay: 0.1s !important; }
#htgo-cta-wrap[data-state="expanded"] .htgo-cta-channels__list .htgo-cta-channel:nth-child(3) { animation-delay: 0.15s !important; }
#htgo-cta-wrap[data-state="expanded"] .htgo-cta-channels__list .htgo-cta-channel:nth-child(4) { animation-delay: 0.2s !important; }

@keyframes htgo-slide-in {
    from {
        opacity: 0;
        transform: translateX(16px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ── WeChat Modal ── */

.htgo-cta-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transition: opacity 0.25s !important;
}

.htgo-cta-modal[aria-hidden="false"] {
    pointer-events: auto !important;
    opacity: 1 !important;
}

.htgo-cta-modal__backdrop {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.45) !important;
}

.htgo-cta-modal__content {
    position: relative !important;
    background: #fff !important;
    border-radius: 16px !important;
    padding: 10px !important;
    max-width: 500px !important;
    width: 90vw !important;
    box-shadow: none !important;
    text-align: center !important;
    overflow: hidden !important;
    animation: htgo-modal-slide-up 0.35s ease-out !important;
}

@keyframes htgo-modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.htgo-cta-modal__close {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 10 !important;
    width: 28px !important;
    height: 28px !important;
    border: none !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.4) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    padding: 0 !important;
}

.htgo-cta-modal__close svg {
    width: 12px !important;
    height: 12px !important;
}

.htgo-cta-modal__close svg path {
    stroke: #fff !important;
}

.htgo-cta-modal__close:hover,
.htgo-cta-modal__close:focus {
    background: rgba(0, 0, 0, 0.65) !important;
    background-color: rgba(0, 0, 0, 0.65) !important;
    color: #fff !important;
    outline: none !important;
}

.htgo-cta-modal__qr {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 0 !important;
    padding: 30px !important;
}

.htgo-cta-modal__qr img {
    width: auto !important;
    max-width: 100% !important;
    height: 380px !important;
    border-radius: 10px !important;
    display: block !important;
    margin: 0 auto !important;
}

.htgo-cta-modal__label {
    font-family: 'Instrument Sans', sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #666 !important;
    margin: 0 0 12px !important;
}

.htgo-cta-modal__id-row {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: #fff !important;
    height: 42px !important;
    padding: 0 4px 0 18px !important;
}

.htgo-cta-modal__id-input {
    flex: 1 !important;
    display: block !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    font-family: 'Instrument Sans', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #1F2E61 !important;
    outline: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 42px !important;
    margin: 0 !important;
    user-select: all !important;
    text-align: left !important;
}

.htgo-cta-modal__copy-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    color: #2652CF !important;
}

.htgo-cta-modal__copy-btn:hover,
.htgo-cta-modal__copy-btn:focus {
    opacity: 0.7 !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #2652CF !important;
    outline: none !important;
}

/* ── Toast ── */

.htgo-cta-toast {
    position: fixed !important;
    bottom: 40px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(20px) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #d4fbe1 !important;
    color: #15803d !important;
    padding: 14px 32px !important;
    border-radius: 999px !important;
    font-family: 'Instrument Sans', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease !important;
    z-index: 99999999 !important;
    white-space: nowrap !important;
    border: none !important;
}

.htgo-cta-toast svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
    color: #16a34a !important;
}

.htgo-cta-toast.htgo-cta-toast--visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* ── Mobile adjustments ── */

@media (max-width: 480px) {
    #htgo-cta-wrap {
        bottom: 16px !important;
        right: 16px !important;
    }

    .htgo-cta-pill {
        padding: 10px 14px 10px 18px !important;
    }

    .htgo-cta-pill__text {
        font-size: 14px !important;
    }

    .htgo-cta-channel {
        padding: 8px 14px 8px 18px !important;
    }

    .htgo-cta-modal__content {
        padding: 28px 20px 22px !important;
    }

    .htgo-cta-modal__qr img {
        width: 180px !important;
        height: 180px !important;
    }
}
