/* Frontend Custom Styles */

/* Browse Button Active State */
a[href*="/browse"] {
    background-color: #2563eb !important;
    color: white;
}

/* Support Chat Floating Button */
.support-chat-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    width: 60px;
    height: 60px;
    color: #ffffff;
    background-color: #2563eb;
    border-radius: 50%;
    border: 1px solid #1d4ed8;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    outline: none;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    animation: support-chat-pulse 1.8s infinite;
}

.support-chat-float:hover {
    transform: translateY(-2px) scale(1.04);
    background-color: #1d4ed8;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}

.support-chat-float:focus-visible {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.22), 0 8px 18px rgba(37, 99, 235, 0.24);
}

.support-chat-icon {
    width: 30px;
    height: 30px;
}

.support-chat-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding: 0 6px;
    background-color: #ef4444;
    color: #ffffff;
    border: 2px solid #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.35);
}

/* Support Chat CTA Panel */
.support-chat-panel {
    position: fixed;
    bottom: 92px;
    right: 20px;
    z-index: 998;
    width: min(340px, calc(100vw - 32px));
    background-color: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 16px;
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.22);
    padding: 18px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.98);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.support-chat-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Floating Button Animation */
@keyframes support-chat-pulse {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Smooth transitions for dropdown */
.group:hover .group-hover\:visible {
    visibility: visible;
    opacity: 1;
}

.group .invisible {
    visibility: hidden;
    opacity: 0;
}

/* Mobile dropdown animation */
#dropdown-arrow {
    transition: transform 0.3s ease;
}

#dropdown-arrow.rotate-180 {
    transform: rotate(180deg);
}

/* Mobile navbar toggler animation */
#navbarToggler span {
    transition: all 0.3s ease;
}

#navbarToggler.navbarTogglerActive span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#navbarToggler.navbarTogglerActive span:nth-child(2) {
    opacity: 0;
}

#navbarToggler.navbarTogglerActive span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
