/* AGASTYA balloon survey invite overlay */
#agastya-invite {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; flex-direction: column;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(165deg, #6b1825 0%, #8f2438 42%, #b84a35 78%, #cf7a2e 100%);
    animation: agi-in 300ms ease-out both;
}
#agastya-invite.closing { animation: agi-out 240ms ease-in both; }
@keyframes agi-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes agi-out { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }
#agastya-invite .agi-top {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; background: #fff;
}
#agastya-invite .agi-top .crest { width: 38px; height: 39px; }
#agastya-invite .agi-top .name { font-weight: 700; letter-spacing: 0.06em; color: #7b1e2b; font-size: 15px; line-height: 1.1; display: flex; flex-direction: column; }
#agastya-invite .agi-top .name small { font-size: 9px; letter-spacing: 0.28em; color: #6f6467; }
#agastya-invite .agi-top .mascot { width: 46px; margin-left: auto; align-self: flex-end; margin-bottom: -6px; animation: agi-bob 4.2s ease-in-out infinite; }
#agastya-invite .agi-body { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 30px 20px; }
#agastya-invite .agi-badge {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    background: #1d3557; border: 3px dashed #ffd60a; border-radius: 24px;
    padding: 20px 30px; text-decoration: none; text-align: center;
    box-shadow: 0 12px 26px rgba(29,53,87,0.45);
    animation: agi-wiggle 2.4s ease-in-out infinite;
}
#agastya-invite .agi-badge .star { font-size: 24px; color: #ffd60a; }
#agastya-invite .agi-badge strong { font-size: 21px; color: #ffd60a; }
#agastya-invite .agi-badge .sub { font-size: 13px; color: #ffe98a; }
#agastya-invite .agi-badge:active { transform: scale(0.96); animation: none; }
@keyframes agi-wiggle { 0%,100% { transform: rotate(-1.2deg) scale(1); } 50% { transform: rotate(1.2deg) scale(1.04); } }
#agastya-invite .agi-skip {
    position: relative; z-index: 2; display: block; margin: 0 auto 22px;
    background: none; border: 0; font: inherit; font-size: 14px; font-weight: 600;
    color: #ffe9d9; text-decoration: underline; cursor: pointer; text-align: center;
}
#agastya-invite .balloon {
    position: absolute; z-index: 1;
    border-radius: 50% 50% 50% 50% / 56% 56% 44% 44%;
    animation: agi-bob 3s ease-in-out infinite;
    filter: drop-shadow(0 6px 6px rgba(60,10,20,0.25));
}
#agastya-invite .balloon::before { content: ""; position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: inherit; }
#agastya-invite .balloon::after { content: ""; position: absolute; bottom: -44px; left: 50%; width: 2px; height: 38px; background: rgba(255,255,255,0.55); border-radius: 2px; }
@keyframes agi-bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
#agastya-invite .toy { position: absolute; z-index: 1; filter: drop-shadow(0 4px 5px rgba(60,10,20,0.3)); animation: agi-bob 3.4s ease-in-out infinite; }
#agastya-invite .plane { animation-name: agi-drift; }
#agastya-invite .plane.alt { animation-name: agi-drift2; }
@keyframes agi-drift { 0%,100% { transform: translate(0,0) rotate(-14deg); } 50% { transform: translate(9px,-10px) rotate(-10deg); } }
@keyframes agi-drift2 { 0%,100% { transform: translate(0,0) rotate(12deg); } 50% { transform: translate(-7px,-8px) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) {
    #agastya-invite .balloon, #agastya-invite .toy, #agastya-invite .agi-top .mascot, #agastya-invite .agi-badge { animation: none; }
}

/* Returning visits: small balloon floating in the corner - never blocks the page */
#agastya-invite-float {
    position: fixed; right: 14px; bottom: 84px; z-index: 9000;
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    animation: agi-bob 3s ease-in-out infinite;
}
#agastya-invite-float .agi-mini-balloon {
    position: relative; width: 44px; height: 56px;
    border-radius: 50% 50% 50% 50% / 56% 56% 44% 44%;
    background: radial-gradient(circle at 32% 28%, #f5839a, #d13954);
    filter: drop-shadow(0 6px 6px rgba(60,10,20,0.25));
}
#agastya-invite-float .agi-mini-balloon::before { content: ""; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #d13954; }
#agastya-invite-float .agi-mini-balloon::after { content: ""; position: absolute; bottom: -34px; left: 50%; width: 2px; height: 30px; background: rgba(60,10,20,0.3); border-radius: 2px; }
#agastya-invite-float .agi-mini-label {
    margin-top: 32px;
    display: flex; flex-direction: column; align-items: center; line-height: 1.25; text-align: center;
    background: #1d3557; color: #ffd60a; font-size: 12px; font-weight: 700;
    padding: 6px 12px; border-radius: 999px; border: 2px dashed #ffd60a;
    box-shadow: 0 6px 14px rgba(29,53,87,0.35);
}
#agastya-invite-float .agi-mini-label small { color: #ffe98a; font-size: 10px; font-weight: 600; }
#agastya-invite-float:active { transform: scale(0.95); }
@media (prefers-reduced-motion: reduce) {
    #agastya-invite-float { animation: none; }
}
