/* =========================
   Base
   ========================= */

:root {
    --primary-white: #ffffff;
    --dark-grey: #6c757d;
    --light-grey: #dee2e6;
    --primary-black: #000000;

    --green: #8CC4B0;
    --list-item-active-background: #303F46;
    --list-item-active-color: #ffffff;

    --border-radius: 14px;
    --border-radius-small: 9px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5em;
}

.alert {
    border-radius: var(--border-radius);
}

p.small {
    line-height: 1.1em;

}

b,
strong {
    font-weight: 700;
}

h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
h5,
h6 {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    /* Black */
    line-height: 1.5em;
}

h1,
.h1 {
    font-size: 1.5em;
}

h2,
.h2 {
    font-size: 1.1em;
}

h3,
.h3 {
    font-size: 1em;
}

h4 {
    font-size: 1em;
}

h6 {
    font-size: 0.75rem;
    line-height: 1.5em;
}

.error {
    color: red;
    text-transform: lowercase;
}

.fw-400 {
    font-weight: 400;
}

.fw-600 {
    font-weight: 600;
}

h1.small {
    font-size: 1.5rem;
}

a,
button,
input,
a::after,
a::before,
button::after,
button::before,
input::after,
input::before,
a:hover {
    outline: none !important;
    text-decoration: none !important;
    -webkit-transition: all 0.15s ease-in-out;
    -moz-transition: all 0.15s ease-in-out;
    -o-transition: all 0.15s ease-in-out;
    -ms-transition: all 0.15s ease-in-out;
    transition: all 0.15s ease-in-out;
    color: var(--primary-black);
}

.no-margin p {
    margin: 0 !important;
}

.section-divider {
    margin: 2rem 0;
}

.grecaptcha-badge {
    display: none !important;
}

.navbar-brand {
    max-width: 300px;
}

.bi.bi-semi-big {
    font-size: 1.5em;
}

.bi.bi-big {
    font-size: 2em;
}

/* Messaggi/alert (se usi wrapper tuo tipo .page-message) */
.page-message,
.alert.page-message {
    border-radius: var(--border-radius);
}

/* changeUMPuntoVendita */

.list-group-item.active {
    background-color: var(--list-item-active-background);
    border-color: var(--list-item-active-background);
    color: var(--list-item-active-color);
}

.list-group-item.active .text-muted {
    color: var(--list-item-active-color) !important;
}

.pv-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--border-radius-small);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    flex: 0 0 34px;
}

.pv-avatar--blue {
    background: #2F80ED;
}

.pv-img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: var(--border-radius-small);
    /* oppure 50% se la vuoi tonda */
    flex: 0 0 34px;
}

#pvSearch {
    border-radius: var(--border-radius-small);
}

.pv-hidden {
    display: none !important;
}

.store-logo {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: var(--border-radius-small);
}

.panel-small .pv-avatar {
    width: 42px;
    height: 42px;
    font-size: 16px;
}

.store-head {
    min-width: 0;
}



/* =========================
   Panel & Buttons
   ========================= */

.panel-std {
    --panel-radius: var(--border-radius);
    --panel-padding: 1rem;
    --panel-border: #e5e7eb;

    background: #fff;
    border-radius: var(--panel-radius);
    padding: var(--panel-padding);
    border: 1px solid var(--panel-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.no-shadow {
    box-shadow: none;
}

.panel-std.panel-small {
    --panel-padding: 1rem;
}

.panel-std.panel-medium {
    --panel-padding: 1.5rem;
}

.panel-std.panel-large {
    --panel-padding: 2rem;
}

/* =========================
   Sidebar - Brand
   ========================= */

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.sidebar-brand img {
    max-height: 42px;
}


/* =========================
   Sidebar - Container & Links
   ========================= */

.sidebar {
    --sidebar-primary: #111827;
    --sidebar-secondary: #6b7280;

    display: flex;
    flex-direction: column;
}

/* forza colori “neutri” anche se Bootstrap mette text-primary */
.sidebar .text-primary,
.sidebar a,
.sidebar a:link,
.sidebar a:visited,
.sidebar a:hover,
.sidebar a:active,
.sidebar i {
    color: var(--sidebar-primary) !important;
}

.sidebar .text-secondary {
    color: var(--sidebar-secondary) !important;
}

.sidebar a {
    text-decoration: none;
    color: inherit;
}

.sidebar a.active {
    font-weight: 600;
}

/* Submenu generico: i link dentro il collapse sono “secondary”, active scuro */
.sidebar a[data-bs-toggle="collapse"]+.collapse a {
    color: var(--sidebar-secondary) !important;
}

.sidebar a[data-bs-toggle="collapse"]+.collapse a:hover,
.sidebar a[data-bs-toggle="collapse"]+.collapse a.active,
.sidebar a[data-bs-toggle="collapse"]+.collapse a.fw-semibold {
    color: var(--sidebar-primary) !important;
}

.sidebar-toggle .btn-label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}


/* Icon circle */
.icon-circle {
    width: 28px;
    height: 28px;
    border: 1px solid var(--panel-border, #e5e7eb);
    border-radius: var(--border-radius-small);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

/* Desktop: il nav sidebar resta sempre aperto */
@media (min-width: 992px) {
    #sidebarNav {
        display: block !important;
    }
}

/* =========================
   Collapse arrows (robusto)
   ========================= */

/* Arrow link “Campagne” ecc. */
.sidebar [data-bs-toggle="collapse"] .bi-caret-down-fill,
.sidebar-toggle .bi-caret-down-fill {
    display: inline-block;
    transition: transform .2s ease;
}

/* quando NON è collapsed => aperto */
.sidebar [data-bs-toggle="collapse"]:not(.collapsed) .bi-caret-down-fill,
.sidebar-toggle:not(.collapsed) .bi-caret-down-fill {
    transform: rotate(180deg);
}


/* =========================
   Sidebar - Help box
   ========================= */

.sidebar-help {
    margin-top: auto;
    /* resta sempre in fondo */
    padding-top: 2rem;
    /* distanza dal menu sopra (desktop) */
}

.sidebar-help__box {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: 14px 16px;
}

.sidebar-help__icon {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-small);
    background: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    flex: 0 0 36px;
}

.sidebar-help__title {
    font-size: .7rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
}

.sidebar-help__title a {
    color: inherit;
    text-decoration: underline;
}

.sidebar-help__text {
    margin-top: .25rem;
    font-size: .6rem;
    line-height: 1.3;
    color: var(--sidebar-secondary);
}


/* =========================
   Content typography wrapper
   ========================= */

.content-std h1 {
    font-size: 2rem;
    margin-bottom: .75rem;
}

.content-std h2 {
    font-size: 1rem;
    margin-top: 1.25rem;
    margin-bottom: .5rem;
}

.content-std p {
    color: #6b7280;
    margin-bottom: 1em;
    /*max-width: 75ch;*/
}


/* =========================
   Tabs (Whatsapp / SMS / Altro)
   ========================= */

.tabs-std.nav-tabs {
    border-bottom: 1px solid #e5e7eb;
}

.tabs-std .nav-link {
    border: 0;
    color: #111827;
    font-weight: 600;
    padding: .75rem 1.25rem;
    background: transparent;
}

.tabs-std .nav-link.active {
    position: relative;
}

.tabs-std .nav-link.active::after {
    content: "";
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    bottom: -1px;
    height: 2px;
    background: #111827;
}



/* =========================
   Mobile tweaks
   ========================= */

@media (max-width: 992px) {

    .store-head {
        min-width: 0;
    }

    .store-info {
        min-width: 0;
    }

    .store-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }


    .store-status {
        font-size: .85rem;
        color: var(--bs-secondary-color);
        margin-top: .15rem;
    }

    .store-switch {
        margin-top: .5rem;
        /* separazione dal blocco sopra */
    }

    /* brand centrato e più piccolo */
    .sidebar-brand {
        justify-content: center;
        text-align: center;
    }

    .sidebar-brand img {
        max-height: 22px;
    }

    /* sidebar container: un pelo più leggera in mobile */
    .sidebar.panel-std {
        --panel-padding: 1rem;
        box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
        padding-bottom: .75rem;
        /* aria dal fondo (evita box appiccicato) */
    }

    /* store switch flat (niente doppio panel) */
    .sidebar .panel-std.panel-small {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;

        /* IMPORTANT: in mobile evita “spazio bianco” sotto */
        margin-bottom: 0 !important;
    }

    /* tipografia store switch */
    .sidebar .panel-std.panel-small .fw-semibold {
        font-size: .95rem;
        line-height: 1.2;
    }

    .sidebar .panel-std.panel-small .small {
        font-size: .75rem;
    }

    /* bottone Menu più compatto */
    .sidebar .panel-std.panel-small .btn {
        padding: .35rem .6rem;
        font-size: .75rem;
        --border-radius: 10px;
    }

    /* bottone Cambia (mobile, full width) */
    .sidebar #sidebarNav .btn.w-100 {
        padding: .5rem .75rem;
        font-size: .85rem;
    }

    /* help box: meno distanza dall’alto in mobile */
    .sidebar-help {
        padding-top: 1.25rem;
    }
}


.upload-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: .2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.upload-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}


.upload-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
    transform: translateY(-3px);
}

.btn-upload {
    border-radius: 999px;
    padding: .6rem 1.25rem;
}

.upload-link {
    display: inline-block;
    font-size: .9rem;
    text-decoration: underline;
}