/* =============================================================
   Geolova SM Chat — Frontend Floating Button Styles
   ============================================================= */

/* ---- Wrapper ---- */
.gsc-fab-wrapper {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---- Sub button group ---- */
.gsc-fab-sub-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* ---- Label ---- */
.gsc-fab-label {
    position: absolute;
    bottom: 72px;
    right: 72px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
    white-space: nowrap;
    pointer-events: none;
    opacity: 1;
    transform: translateX(0);
    transition: opacity .3s ease, transform .3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.gsc-fab-label::after {
    content: '';
    position: absolute;
    right: -7px; top: 50%;
    transform: translateY(-50%);
    border-width: 5px 0 5px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #fff;
}
.gsc-fab-label.gsc-label-hidden {
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
}

/* ---- Animations ---- */
@keyframes gsc-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}
@keyframes gsc-pulse {
    0%   { transform: scale(1); opacity: .55; }
    100% { transform: scale(1.85); opacity: 0; }
}
@keyframes gsc-pulse2 {
    0%   { transform: scale(1); opacity: .35; }
    100% { transform: scale(2.25); opacity: 0; }
}
@keyframes gsc-badge-pop {
    0%   { transform: scale(0); }
    100% { transform: scale(1); }
}

/* ---- Main wrap (float) ---- */
.gsc-fab-main-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    animation: gsc-float 3s ease-in-out infinite;
}
.gsc-fab-main-wrap.gsc-no-float { animation: none; }

/* ---- Pulse rings ---- */
.gsc-pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #6366f1;
    animation: gsc-pulse 2.2s ease-out infinite;
    z-index: 0;
}
.gsc-pulse-ring--2 { animation: gsc-pulse2 2.2s ease-out .55s infinite; }
.gsc-no-float .gsc-pulse-ring { animation: none; opacity: 0; }

/* ---- Main button ---- */
.gsc-fab-main {
    position: relative;
    z-index: 2;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(79,70,229,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s ease, box-shadow .3s ease;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.gsc-fab-main:hover {
    background: linear-gradient(135deg, #818cf8, #6366f1);
    box-shadow: 0 8px 28px rgba(79,70,229,.65);
}
.gsc-fab-main:focus-visible {
    outline: 3px solid #818cf8;
    outline-offset: 3px;
}
.gsc-fab-main.gsc-active {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    box-shadow: 0 6px 20px rgba(225,29,72,.5);
}

/* ---- Icon switch ---- */
.gsc-icon-chat,
.gsc-icon-close {
    position: absolute;
    transition: opacity .3s ease, transform .3s ease;
}
.gsc-icon-close { opacity: 0; transform: rotate(-90deg) scale(.5); }

.gsc-fab-main.gsc-active .gsc-icon-chat  { opacity: 0; transform: rotate(90deg) scale(.5); }
.gsc-fab-main.gsc-active .gsc-icon-close { opacity: 1; transform: rotate(0deg) scale(1); }

/* ---- Badge ---- */
.gsc-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    z-index: 10;
    animation: gsc-badge-pop .4s cubic-bezier(.34,1.56,.64,1);
    transition: transform .3s ease, opacity .3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.gsc-fab-badge.gsc-badge-hide {
    transform: scale(0);
    opacity: 0;
}

/* ---- Sub buttons ---- */
.gsc-fab-sub {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0) translateY(15px);
    transition: opacity .3s ease, transform .3s ease, box-shadow .2s, filter .2s;
    position: relative;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.gsc-fab-sub:hover       { box-shadow: 0 6px 18px rgba(0,0,0,.3); filter: brightness(1.12); }
.gsc-fab-sub:focus-visible { outline: 3px solid rgba(255,255,255,.8); outline-offset: 2px; }
.gsc-fab-sub.gsc-visible { opacity: 1; transform: scale(1) translateY(0); }

.gsc-fab-sub--wa { background: #25D366; transition-delay: .10s; }
.gsc-fab-sub--ms { background: #0084FF; transition-delay: .06s; }
.gsc-fab-sub--tg { background: #229ED9; transition-delay: .02s; }

/* ---- Tooltip ---- */
.gsc-fab-sub::after {
    content: attr(data-label);
    position: absolute;
    right: 58px;
    background: #1e293b;
    color: #fff;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    box-shadow: 0 3px 10px rgba(0,0,0,.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.gsc-fab-sub:hover::after { opacity: 1; }

/* ---- Credit ---- */
.gsc-credit {
    position: fixed;
    bottom: 6px;
    right: 10px;
    font-size: 10px;
    color: #94a3b8;
    z-index: 99998;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: .01em;
    pointer-events: auto;
}
.gsc-credit a            { color: #6366f1; text-decoration: none; font-weight: 600; }
.gsc-credit a:hover      { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .gsc-fab-wrapper { bottom: 20px; right: 20px; }
    .gsc-fab-label   { display: none; } /* Sembunyikan label di layar kecil */
}

/* ── Group button badge label ── */
.gsc-fab-sub { position: relative; }
.gsc-fab-sub-badge {
	position: absolute;
	bottom: -2px;
	right: -2px;
	background: rgba(0,0,0,.55);
	color: white;
	font-size: 8px;
	font-weight: 700;
	padding: 1px 4px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: .3px;
	pointer-events: none;
}

/* WA group button - slightly lighter green */
.gsc-fab-sub--wa-grp  { background: #1da851; }
/* FB group */
.gsc-fab-sub--fb-grp  { background: #1877f2; }
/* TG group */
.gsc-fab-sub--tg-grp  { background: #1a86c0; }
