.gtwcf-widget {
    position: fixed;
    right: var(--gtwcf-right, 24px);
    bottom: var(--gtwcf-bottom, 96px);
    z-index: 99999;
    width: var(--gtwcf-size, 58px);
    height: var(--gtwcf-size, 58px);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.gtwcf-trigger {
    position: relative;
    width: 100%;
    height: 100%;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 28%, #6df59f 0%, #2ed466 46%, #19b14e 100%);
    box-shadow: 0 16px 26px rgba(24, 142, 70, 0.24);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.gtwcf-trigger:hover,
.gtwcf-trigger:focus-visible,
.gtwcf-widget.gtwcf-open .gtwcf-trigger {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 20px 36px rgba(24, 142, 70, 0.32);
    outline: none;
}

.gtwcf-icon {
    width: 64%;
    height: 64%;
    display: inline-flex;
}

.gtwcf-icon svg {
    width: 100%;
    height: 100%;
}

.gtwcf-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gtwcf-ripple {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(77, 227, 131, 0.36);
    animation: gtwcfPulse 2.4s ease-out infinite;
}

.gtwcf-card {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    min-width: 0;
    max-width: min(300px, calc(100vw - 112px));
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    color: #3f3f46;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0;
    opacity: 0;
    transform: translateY(-50%) translateX(10px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.gtwcf-card::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-50%) rotate(45deg);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    border-right: 1px solid rgba(148, 163, 184, 0.18);
}

.gtwcf-card-text {
    font-size: 15px;
    line-height: 1.2;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gtwcf-copy {
    display: none;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.gtwcf-copy:hover,
.gtwcf-copy:focus-visible {
    background: #d1fae5;
    color: #065f46;
    outline: none;
}

.gtwcf-widget:hover .gtwcf-card,
.gtwcf-widget:focus-within .gtwcf-card,
.gtwcf-widget.gtwcf-open .gtwcf-card {
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
    pointer-events: auto;
}

@keyframes gtwcfPulse {
    0% {
        transform: scale(0.96);
        opacity: 0.7;
    }

    70% {
        transform: scale(1.16);
        opacity: 0;
    }

    100% {
        transform: scale(1.16);
        opacity: 0;
    }
}

@media (max-width: 782px) {
    .gtwcf-widget {
        right: max(14px, calc(var(--gtwcf-right, 24px) - 8px));
        bottom: max(82px, calc(var(--gtwcf-bottom, 96px) - 12px));
    }

    .gtwcf-card {
        max-width: min(280px, calc(100vw - 98px));
    }

    .gtwcf-card-text {
        font-size: 14px;
    }
}

@media (hover: none), (pointer: coarse) {
    .gtwcf-card {
        display: none;
        right: calc(100% + 8px);
        min-width: 176px;
        max-width: min(78vw, 280px);
        padding: 12px 14px;
        border-radius: 18px;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 10px;
        opacity: 0;
        transform: translateY(-50%) translateX(12px);
        pointer-events: none;
    }

    .gtwcf-card::after {
        right: 18px;
        top: auto;
        bottom: -6px;
        transform: rotate(45deg);
    }

    .gtwcf-card-text {
        white-space: normal;
        line-height: 1.35;
    }

    .gtwcf-copy {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .gtwcf-widget.gtwcf-open .gtwcf-card {
        display: flex;
        opacity: 1;
        transform: translateY(-50%) translateX(0);
        pointer-events: auto;
    }
}

@media (max-width: 782px) {
    .gtwcf-hide-mobile {
        display: none;
    }
}
