﻿/* BOX INFO VIEWPORT (versione ottimizzata) */
.viewport-box {
    font-size: clamp(0.6rem, 0.9vw, 0.85rem);
    color: #555;
    padding: 0.15rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 0.4rem;
    background: #f8f9fa;
    white-space: nowrap;
    margin-right: 0.1rem;
}

/* Footer nascosto quando l'altezza è inferiore a 550px */
@media (max-height: 576px) {
    .sticky-footer {
        display: none !important;
    }
}
/* ============================================================
   BADGE CIRCLE (ANTEPRIMA PROFILO)
============================================================ */
.badge-lay-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #5ca6dc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: 4px !important;
    color: cyan;
    background: black;
}

    .badge-lay-circle img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

/* Desktop >1200px */
@media (min-width: 1200px) {
    .badge-lay-circle {
        width: 48px;
        height: 48px;
    }
}

/* 757–1199px */
@media (max-width: 1199px) and (min-width: 757px) {
    .badge-lay-circle {
        width: 40px;
        height: 40px;
    }
}

/* ≤700px */
@media (max-width: 567px) {
    .badge-lay-circle {
        width: 32px;
        height: 32px;
    }
}

/* ≤576px */
@media (max-width: 576px) {
    .badge-lay-circle {
        display:none;
    }
}
/* Loader dentro il badge */
.badge-lay-circle .loader {
    width: 22px;
    height: 22px;
    border: 3px solid #5ca6dc;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* L’immagine parte nascosta */
.profile-img {
    display: none;
}



.badge-lay-circle.loading {
    position: relative;
}

    .badge-lay-circle.loading::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border: 3px solid #ccc;
        border-top-color: #007bff;
        animation: spin 0.8s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .badge-lay-circle {
        width: 32px;
        height: 32px;
    }

        .badge-lay-circle .profile-img {
            width: 32px;
            height: 32px;
        }
}


@media (max-width: 576px) {
    .nav-item.dropdown .dropdown-menu {
        left: 0 !important;
        right: auto !important;
        transform: none !important;
    }
}



@media (max-width: 576px) {
    #viewport-info,
    .badge-lay-circle {
        display: none !important;
    }

        .badge-lay-circle .profile-img {
            display: none !important;
        }

}


.brand-style {
    color: #41B9E1;
    text-shadow: 1px 1px 2px black;
    font-size: 1.5rem;
    font-weight: bold;
}

.brand-style:hover {
    color: gold;
}

.navbar-cloud:hover,
.navbar-cloud:focus-within {
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(120, 150, 170, 0.25), 0 8px 20px rgba(100, 130, 150, 0.20), 0 12px 32px rgba(80, 110, 130, 0.15);
}


@media (max-width: 576px) {
    .navbar-cloud {
        display: inline-block;
        max-width: max-content;
    }
}
