/* ========================================
   LAYOUT PRINCIPALE
   ======================================== */

.ui.top.menu {
    padding-left: .5rem;
}

.pusher {
    margin-top: 45px;
}

.page-wrapper {
    padding: 1rem;
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 0;
    }
}

/* ========================================
   BACKGROUND
   ======================================== */

.page-wrapper::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: url(/static/img/background.png) center center/cover no-repeat;
    opacity: 0.3;
    pointer-events: none;
}

/* ========================================
   SIDEBAR
   ======================================== */

#mainSidebar.menu {
    display: flex !important;
    flex-direction: column;
}

#mainSidebar .bottom-fixed {
    margin-top: auto !important;
}

/* ========================================
   TABELLE
   ======================================== */

.ui.table .group-start {
    border-left: 3px solid rgba(34, 36, 38, .15) !important;
}

.ui.table .group-end {
    border-right: 3px solid rgba(34, 36, 38, .15) !important;
}

.ui.table.blue-border {
    border-left: 3px solid #2185d0;
}

/* ========================================
   TESTO E OMBRE
   ======================================== */

.ui.text-shadow-light {
    text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

.ui.text-shadow-strong {
    text-shadow: 0 2px 4px rgba(0, 0, 0, .6);
}

.team-name {
    text-overflow: ellipsis;
    overflow: hidden;
    display: block;
}

/* ========================================
   STATISTICHE — ANDAMENTO (grafici)
   ======================================== */

.stat-controls {
    margin-bottom: 0.5rem !important;
}

.stat-controls .ui.label {
    margin-bottom: 0.35rem;
    display: inline-block;
}

.stat-chart-wrap {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 320px;
}

@media (max-width: 767px) {
    .stat-chart-wrap {
        height: 55vh;
        min-height: 260px;
    }
    .stat-controls .ui.buttons {
        font-size: 0.85rem;
    }
}

/* ========================================
   BOX TOP / FLOP (classifica generale)
   ======================================== */

.top-flop-grid {
    margin: 0 0 0.6rem 0 !important;
}

.top-flop-grid > .column {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.top-flop-box {
    padding: 0.5rem 0.7rem !important;
    margin: 0 !important;
}

.top-flop-head {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.top-flop-label {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
}

.top-flop-badge {
    margin-left: auto !important;
}

.top-flop-users {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
}

.top-flop-user {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.top-flop-avatar {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f0f0f0;
    flex: 0 0 auto;
}

.top-flop-name {
    font-size: 0.9rem;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .top-flop-label { font-size: 0.8rem; }
    .top-flop-name { font-size: 0.8rem; }
    .top-flop-avatar { width: 1.4rem; height: 1.4rem; }
    .top-flop-box { padding: 0.45rem 0.5rem !important; }
}

/* ========================================
   AVATAR E IMMAGINI
   ======================================== */

.avatar-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 50%;
    background-color: #f0f0f0;
    object-fit: cover;
}

.avatar-container-floating {
    position: relative;
    width: 15rem;
    height: 15rem;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-mini-container {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 50%;
    background-color: #f0f0f0;
    justify-content: center;
    object-fit: cover;
}

.avatar-supermini-container {
    position: relative;
    max-width: 1.5rem;
    height: 1.5rem;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 50%;
    background-color: #f0f0f0;
    object-fit: cover;
    aspect-ratio: 1;

}

.avatar-image {
    position: absolute;
    cursor: move;
    transition: transform 0.1s;
    object-fit: cover; /* riempie tutto, può tagliare parti */

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

/* ========================================
   STATI UTENTI
   ======================================== */

tr[data-utente-cancellabile="true"] {
    background-color: #fff8f8 !important;
}

tr[data-utente-cancellabile="true"] .ui.red.button {
    opacity: 1;
}

tr[data-utente-cancellabile="false"] .ui.red.button {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ========================================
   FORM E INPUT
   ======================================== */

/* Nascondi spinner nei campi numerici */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ========================================
   MEDIA QUERIES - RESPONSIVE
   ======================================== */

/* Desktop */
@media only screen and (min-width: 768px) {
    .page-wrapper {
        padding-top: 2rem;
    }
}

/* Mobile - Nasconde bordi tabelle */
@media only screen and (max-width: 1600px) {
    .ui.table .group-start {
        border-left: none !important;
    }

    .ui.table .group-end {
        border-right: none !important;
    }

    .ui.table .blue-border {
        border-left: none !important;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .statistic .value {
        font-size: 1.5rem !important;
    }

    .statistic .label {
        font-size: 0.8rem !important;
    }
}


@media (max-width: 991px) {
    .ui.stackable.grid > .column:not(.row),
    .ui.stackable.grid > .row > .column {
        width: 100% !important;
        margin: 0 0 1em !important;
        box-shadow: none !important;
        padding: 1rem 1rem !important;
    }
}


@media (max-width: 1600px) {
    .uo-group {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }
}

/* Mobile piccolo */
@media (max-width: 480px) {
    .statistic .value {
        font-size: 1.2rem !important;
    }

    .statistic .label {
        font-size: 0.7rem !important;
    }
}

div.shadowed {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

button.shadowed {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

