/* Radial menu wrapper */
.radial-menu-wrapper {
    position: relative;
    height: 92px;
}

.radial-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: -1;
}

.radial-menu-wrapper.open .radial-menu-overlay {
    opacity: 1;
    pointer-events: auto;
    z-index: 1000;
}

.radial-menu {
    position: relative;
    width: 100%;
    height: 100%;
    --total: 1;
    z-index: 1010;
}

.radial-menu__center {
    position: absolute;
    inset: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--color-blue), var(--color-main, #0d56a0));
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    position: relative;
    outline: none;
}

.radial-menu__center:hover {
    -webkit-transform: translate(-50%, -50%) scale(1.05);
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.radial-menu.open .radial-menu__center {
    background: linear-gradient(135deg, var(--color-blue), var(--color-main, #0d56a0));
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.radial-menu__center::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid rgba(255, 255, 255, 0.7);
    opacity: 0;
    pointer-events: none;
}

.radial-menu-wrapper:not(.open) .radial-menu__center::after {
    animation: radial-center-pulse 1.8s infinite;
}

@keyframes radial-center-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

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

.burger-line {
    position: absolute;
    left: 50%;
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: #dee2e6;
    transform: translateX(-50%);
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.burger-line--top {
    top: 16px;
}

.burger-line--middle {
    top: 50%;
    transform: translate(-50%, -50%);
}

.burger-line--bottom {
    bottom: 16px;
}

.radial-menu.open .burger-line--middle {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0);
}

.radial-menu.open .burger-line--top {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.radial-menu.open .burger-line--bottom {
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.radial-menu__item {
    --radius: 95px;
    --index: 0;
    --angle-start: 0deg;
    --angle-range: -180deg;
    --angle: calc(var(--angle-start) + (var(--angle-range) / (var(--total) - 1) * var(--index)));

    position: absolute;
    inset: 50%;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    outline: none;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--radius))) scale(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        opacity 0.3s ease;
    transition-delay: 0s;
}

.radial-menu.open .radial-menu__item {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--radius))) scale(1);
    opacity: 1;
    pointer-events: auto;
    transition-delay: calc(0.05s * var(--index));
}

.radial-menu.open .radial-menu__item:hover {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--radius))) scale(1.08);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.radial-menu__item>*:not(.radial-menu__label) {
    transform: rotate(calc(-1 * var(--angle)));
    display: inline-block;
}

.radial-menu__item i,
.radial-menu__item svg {
    width: 24px;
    height: 24px;
}

.radial-menu__item img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}

.radial-menu__item::after {
    content: attr(data-label);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(calc(-1 * var(--angle))) translateX(-80px);
    padding: 4px 8px;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 999px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.radial-menu.open .radial-menu__item:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(calc(-1 * var(--angle))) translateX(-95px);
}

.item-yellow {
    background: #ffc928;
}

.item-blue {
    background: #1f2ae3;
}

.item-purple {
    background: #5b2b90;
}

.item-green {
    background: #1c9b35;
}

.item-orange {
    background: #ff9800;
}

.radial-menu__item.is-active {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9),
        0 14px 32px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--radius))) scale(1.12);
}

#radialPhoneSub {
    position: absolute;
    bottom: 40px;
    right: 88px;
    min-width: 180px;
    max-width: 240px;
    background-color: var(--color-main, #0d56a0);
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    padding: 4px 0;
    transform-origin: bottom right;
    transform: scale(0);
    transition: transform 0.25s ease;
    z-index: 1020;
    pointer-events: none;
}

#radialPhoneSub.open {
    transform: scale(1);
    pointer-events: auto;
}

#radialPhoneSub::before {
    content: "";
    position: absolute;
    bottom: -8px;
    right: 12px;
    border-width: 8px 6px 0 6px;
    border-style: solid;
    border-color: var(--color-main, #0d56a0) transparent transparent transparent;
}

/* Chatbox Container Styles */
.chatbox-container {
    position: relative;
}

.chatbox-iframe-container {
    position: fixed;
    bottom: 0;
    right: 90px;
    width: 380px;
    height: 560px;
    background: transparent;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 30px 60px rgb(0 0 0 / 0.25);
    overflow: visible;
    z-index: 9999;
    transform: translateY(110%) scale(0.85);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.chatbox-iframe-container.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.chatbox-iframe-wrapper {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
    background: #fff;
}

.chatbox-iframe-container.active+.chatbox-tail {
    opacity: 1;
    visibility: visible;
}

.chatbox-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.chatbox-toggle {
    position: relative;
    transition: all 0.3s ease;
}

.chatbox-notice {
    position: absolute;
    right: 60px;
    top: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.chatbox-notice.visible {
    opacity: 1;
    transform: translateY(8px);
    pointer-events: auto;
}

.chatbox-notice__bubble {
    background: var(--color-main, #0d56a0);
    color: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    box-shadow: 0 6px 18px rgb(0 0 0 / 0.15);
    white-space: nowrap;
}

.chatbox-notice__indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffdd57;
    box-shadow: 0 0 0 4px rgb(255 221 87 / 0.4);
    animation: pulse-chatbox 2s infinite;
}

.fixed-social .chatbox-button {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    width: 46px;
    height: 46px;
    background: none;
    margin-bottom: 0.625rem;
    border-radius: 50%;
    text-decoration: none;
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
    transition: transform 0.3s ease, -webkit-transform 0.3s ease;
}

.chat-box-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* Close button inside chatbox */
.chatbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbox-close:hover {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

/* Animation for pulse effect */
.pulse-chatbox {
    animation: pulse-chatbox 2s infinite;
}

@keyframes pulse-chatbox {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Responsive design */
@media (max-width: 480px) {
    .chatbox-iframe-container {
        width: calc(100vw - 40px);
        height: calc(100vh - 150px);
        bottom: 80px;
        right: 20px;
        left: 20px;
    }
}

/* Notification badge */
.chatbox-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: bounce 1s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}