/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
/* 
# DEBUG SPAZI COMPONENTI
* {
    outline: 1px solid rgba(255,0,0,0.2);
  } */

  body {
    font-family: "Raleway", sans-serif;
    color: #333F;
    background-color: #fff;
    /* height: 100vh; */
    display: flex;
    flex-direction: column;
}

body,
html {
    height: 100%;
}

main {
    min-height: 100vh;
    /* height: auto; */
    flex: 1;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    line-height: normal;
}

.title-section {
    font-size: 1.5rem;
    font-weight: 600;
}

.subtitle {
    font-size: 1.25rem !important;
    font-weight: 500 !important;
}

.body-text {
    font-size: 1rem;
    font-weight: 500;
}

.text {
    font-size: 0.875rem;
    font-weight: 500;
}

.small-text {
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .title {
        font-size: 1.75rem;
        font-weight: 700;
        line-height: normal;
    }

    .title-section {
        font-size: 1.25rem;
        font-weight: 600;
    }

    .subtitle {
        font-size: 1rem;
        font-weight: 500;
    }

    .body-text {
        font-size: 0.875rem;
        font-weight: 500;
    }

    .text {
        font-size: 0.825rem;
        font-weight: 500;
    }

    .small-text {
        font-size: 0.75rem;
    }
}

.note-text {
    font-size: 11px;
    font-weight: 500;
}

.btn {
    border: 3px solid #6dc8f2;
    background: #fff;
    color: #333;
    transition: all 0.3s;
    border-radius: 30px;
    padding: 9px 22px;
    font-weight: 500;
}

.btn:hover {
    background: #6dc8f2;
    color: #fff;
}

.btn-reverse {
    border: 3px solid #fff;
    background: #6dc8f2;
    color: #fff;
    transition: all 0.3s;
    border-radius: 30px;
    padding: 9px 22px;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
}

.btn-reverse:hover {
    background: #fff;
    color: #333;
}

.btn-mobile {
    border: unset;
    background: #fff;
    color: #333;
    padding: 9px 22px;
}

.btn-back {
    background-color: unset;
    border: unset;
    border-radius: 20px;
    /* border: 2px solid #6dc8f2; */
}

.btn-send {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #4D82AA;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Ottimizzazioni touch per mobile */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-send i {
    font-size: 20px;
}

.btn-send:hover {
    /* background: #6dc8f2;
    color: #fff; */
    transform: translateY(-50%) scale(1.04);
}

.btn-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.btn-action {
    margin-left: 5px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
}

a {
    color: #333;
}

a:hover {
    color: #000000;
}

.border-blue {
    border: 0;
    height: 5px;
    background-color: #7bd1f898;
    opacity: 0.3;
    margin: 1rem 0;
}

.LogoCopilot {
    width: auto;
    height: 40px;
}

#userFullName {
    /* Styles for userFullName element */
    display: inline-block;
}

.boxBianco {
    background-color: #fff;
    border-radius: 30px;
    /* height: 100vh; */
}

.icon-fill {
    opacity: 1 !important;
    color: #4D82AA !important;
}

.bot-avatar {
    display: inline-block;
    padding-right: 8px;
}

/*--------------------------------------------------------------
# Sidebar & Offcanvas Mobile 
--------------------------------------------------------------*/
.sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    background: #fff;
    position: fixed;
    margin-left: 10px;
}

.sidebar .nav-link.active {
    background: #99d9f6b3;
    /* color: #4D82AA !important; */
}

.sidebar .nav-link.active .icon-sidebar {
    color: #4D82AA !important;
}

.sidebar .nav-link:hover {
    background: #99d9f6b3;
    /* color: #4D82AA !important; */
}

.sidebar .nav-link:hover .icon-sidebar {
    color: #4D82AA !important;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    border-radius: 25px;
    margin-bottom: 5px;
    gap: 8px;
    padding: 7px 12px;
    color: #000;
    height: auto;
    /* consente wrapping se serve */
    cursor: pointer;
}

.sidebar .other-links .nav-link {
    font-size: 0.98rem;
}

.offcanvas-header {
    padding: 2rem 2rem 0 2rem;
}

.offcanvas-header .btn-close {
    filter: invert(1);
    opacity: 1;
}

.logo-box {
    padding: 2rem 0 1.5rem 0;
}

.logo-box img {
    max-height: 130px;
}

/* Header fisso con logo e benvenuto */
.sidebar-header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    padding-bottom: 1rem;
}

.welcome-box {
    padding: 0.5rem 0;
}

/* Contenuto scrollabile della sidebar con layout flex */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE / Edge Legacy */
}

.sidebar-content::-webkit-scrollbar {
    display: none;                /* Chrome, Safari, Edge, Opera */
}

.sidebar-content .nav {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/*--------------------------------------------------------------
# Marketplace
--------------------------------------------------------------*/
.product-card svg {
    height: 45px;
    width: 45px;
}

/* Stile per le ultime 4 voci ancorate in basso */
.sidebar-content .nav-item.mt-auto .icon-sidebar::before {
    font-weight: 100 !important;
}

.main-content {
    background: #99d9f6b3;
    border-radius: 30px;
    margin: 3rem;
    margin-top: 2rem;
    padding: 3rem;
    padding-top: 2.5rem;
}

.evidenza-box {
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: start;
    border-radius: 30px;
    min-height: 240px;
    gap: 1.1rem;
    margin: 0 10px;
    padding: 20px;
    height: 100%;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.evidenza-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.featured-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.35rem;
}

.featured-title-section {
    color: #333F;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

.icon-carousel {
    font-size: 6rem;
    position: relative;
    top: 15%;
    color: #4D82AA;
}

.icon-dettaglio {
    font-size: 7rem;
    color: #4D82AA;
    padding-right: 2rem;
}

.icon-dettaglio img {
    width: 7rem;
    height: auto;
}

.icon-evidenza.icon-carousel .bi::before {
    font-weight: 100 !important;
}

.icon-sidebar {
    font-size: 26px;
    margin-right: 8px;
    padding: 2px;
}

.icon-prodotti::before {
    font-size: 1.8rem;
    color: #4D82AA;
    font-weight: bold !important;
}

.product-card {
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 2px 12px #d2ebf69a;
    padding: 1.2rem 1.4rem;
    min-height: 110px;
    align-content: center;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.icone-prodotti i {
    font-size: 3rem;
}

.icone-prodotti img {
    width: auto;
    height: 3rem;
}

.icone-prodotti {
    color: #4D82AA !important;
    align-items: center;
}

.show-more-link {
    color: #5c5c5c;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    margin-top: 1rem;
    justify-content: flex-end;
}

.show-more-link span:hover {
    color: #333F;
}

.carousel-control-next {
    width: auto;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: none;
    padding: 0 10px;
}

.carousel-control-next {
    right: -50px;
}

.carousel-control-prev {
    width: auto;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: none;
    padding: 0 10px;
}

.carousel-control-prev {
    left: -70px;
}

.custom-arrow-icon {
    font-size: 5rem;
    color: #4D82AA;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    right: -10px;
}

.carousel-item {
    transition: transform 0.3s ease-in-out;
}

.gx-5 {
    --bs-gutter-x: 5rem;
}

.blue-text {
    color: #4D82AA !important;
}

nav {
    font-size: 14px;
}

.offcanvas .nav-link {
    font-size: 24px;
    color: #fff;
    font-weight: 600;
}

.offcanvas.offcanvas-top {
    height: 100vh;
    background: #99d9f6;
    color: #fff;
}

/* Migliora usabilità su mobile: scroll contenuto e safe area */
.offcanvas.offcanvas-top .offcanvas-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom);
    display: flex;
    flex-direction: column;
}

/* Benvenuto mobile */
.mobile-welcome {
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 1rem !important;
}

/* Stile migliorato per i link mobile */
.offcanvas .nav-link {
    font-size: 18px;
    color: #fff;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.offcanvas .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.offcanvas .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Icone mobile */
.offcanvas .nav-link i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.offcanvas .nav-link img {
    opacity: 0.9;
}

/* Link disabilitati per siteId === 1 */
.sidebar .nav-link.disabled,
.offcanvas .nav-link.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
    transition: none;
}

.sidebar .nav-link.disabled:hover,
.offcanvas .nav-link.disabled:hover {
    background: unset !important;
}

.sidebar .nav-link.disabled:hover .icon-sidebar,
.offcanvas .nav-link.disabled:hover .icon-sidebar {
    color: unset !important;
}

.evidenza-box i.bi-check-circle::before {
    font-weight: 600 !important;
    color: #4D82AA !important;
    margin-left: .25rem !important;
}

i.bi-chevron-left::before {
    font-weight: 600 !important;
}


@media (max-width: 768px) {
    .main-content {
        background: unset;
        border-radius: unset;
        margin: 0;
        padding: 1.5rem;
    }

    .container-fluid {
        padding: 1px;
    }

    .evidenza-box {
        border-radius: 30px;
        min-height: 200px;
        gap: 1.1rem;
        margin: 0 2rem;
        padding: 20px;
        height: 100%;
    }

    .custom-arrow-icon {
        right: 0px;
    }

    .product-card {
        background: #fff;
        border-radius: 30px;
        box-shadow: 0 2px 12px #d2ebf69a;
        padding: 1.2rem 1.4rem;
        min-height: 110px;
        align-content: center;
    }

    body {
        background-color: #99d9f6b3;
    }

    .icon-carousel {
        font-size: 4rem;
    }
}

@media (max-width:992px) {
    .testo {
        text-align: center;
    }

    .main-content .gx-5 {
        --bs-gutter-x: 1rem;
    }

    .main-content {
        padding: 2rem !important;
    }

    .carousel-control-next {
        display: none;
    }
}

@media (max-width:768px) {
    .main-content {
        padding: 1rem !important;
    }
}

.img-servizio {
    width: 300px;
    height: auto;
}

.Dettaglio-content {
    height: calc(100vh - 11rem);
}

.header-container {
    height: 100px;
    margin-bottom: 25px;
}

.close-btn {
    margin: 30px 30px 0 0;
    position: relative;
    opacity: 1;
}

.modal-content {
    border-radius: 25px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Skeleton loading */
.skeleton {
    position: relative;
    background-color: #e0e0e0;
    overflow: hidden;
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.6),
            transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Placeholder per card prodotto/servizio */
.skeleton-card {
    background: transparent;
    box-shadow: none;
    cursor: default;
}

.skeleton-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.2rem;
    width: 60%;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-title-section {
    height: 1rem;
    width: 40%;
    border-radius: 4px;
}

.evidenza-box.skeleton-card {
    background-color: transparent;
    box-shadow: none;
    border: 1px solid #e0e0e0;
    padding: 1rem;
    border-radius: 12px;
    min-height: 150px;
}

.input-group .form-select {
    border: none;
    background-color: white;
}

#searchTypeSelect {
    max-width: 120px;
    flex-shrink: 0;
}

/*--------------------------------------------------------------
# ChatBot AI 
--------------------------------------------------------------*/
/* .bi-send::before {
    content: "\f6c0";
    font-weight: 600 !important;
} */

/*--------------------------------------------------------------
# Servizio RUI 
--------------------------------------------------------------*/
.cerca {
    width: 80%;
    height: 80px;
}

.custom-input-group {
    border: 4px solid #99D9F6;
    border-radius: 40px;
    overflow: hidden;
    padding: 0 10px;
    background-color: #fff;
}

.custom-input-group .form-control,
.custom-input-group .input-group-text {
    border: none;
    background-color: white;
}

.custom-input-group .form-control:focus {
    box-shadow: none;
}

.input-group-text i::before {
    font-size: 1.5rem;
    /* color: #4D82AA; */
    font-weight: bold !important;
}

.input-group-text {
    cursor: pointer;
}

.RUI-icon i::before {
    font-weight: bold !important;
}

.icon-end {
    font-size: 2rem !important;
    color: #4D82AA;
}

.icon-verify {
    font-size: 1.5rem !important;
    transform: translate(-30%, -70%) !important;
    color: #FFD700;
    top: 10px;
}

.icon-persona {
    font-size: 8rem !important;
    color: #4D82AA;
}

.info-intermediario {
    width: 100%;
    background-color: #99d9f64d;
    border-radius: 30px;
    padding: 1rem 2.5rem 2.5rem 2.5rem;
    display: flex;
    flex-direction: column;

}

.icon-ricerca {
    font-size: 4rem;
    color: #4D82AA;
}

@media (max-width: 768px) {
    .icon-persona {
        font-size: 4rem !important;
    }

    .icon-ricerca {
        font-size: 2rem !important;
    }

    .p-3 {
        padding: 1rem !important;
    }

    .mt-4 {
        margin-top: 1rem !important;
    }

    .info-intermediario {
        gap: 0.5rem;
        padding: 1rem 1.5rem 1.5rem 1.5rem;
    }

    .me-2 {
        margin-right: 0.5rem !important;
    }

    .body-text {
        font-size: 14px;
        margin-bottom: 0;
    }

    /* .body-text-title {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 0rem;
    } */
}

@media (max-width: 768px) {
    .cerca {
        width: 100%;
        height: 55px;
        border-width: 2px;
        border-radius: 20px;
    }

    .cerca .input-group-text {
        padding: 0.25rem 0.5rem !important;
        font-size: 12px !important;
    }

    .cerca .form-control {
        padding: 0.25rem 0.5rem !important;
        font-size: 12px !important;
    }

    .cerca img {
        height: 18px !important;
    }

    .custom-input-group {
        font-size: 12rem !important;
    }

    .RUI-icon {
        gap: 0.5rem !important;
    }

    .RUI-icon .icon-end {
        font-size: 19px !important;
    }

    .RUI-icon .icon-verify {
        font-size: 12px !important;
        top: -4px !important;
        right: -5px !important;
    }

    .d-flex.justify-content-between.align-items-center.mb-4 {
        gap: 0.5rem !important;
        flex-wrap: nowrap !important;
    }
}

/*--------------------------------------------------------------
# Impostazioni
--------------------------------------------------------------*/
.form-control {
    border-radius: 10px;
}

.icon-modal {
    color: #4D82AA !important;
}

.iti--allow-dropdown input,
.iti--allow-dropdown input[type=tel] {
    height: calc(3.5rem + calc(1px * 2));
    min-height: calc(3.5rem + calc(1px * 2));
}

.iti__selected-flag {
    padding: 0 6px 0 12px !important;
}

.form-floating .iti.iti--allow-dropdown {
    width: 100% !important;
}

.iti__country-list {
    z-index: 9 !important;
}

#feedbackMessage {
    font-weight: 600;
    font-size: 16px;
}

#feedbackMessage .invalid-feedback {
    font-weight: 600;
    font-size: 16px;
}

.toggle-password {
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    cursor: pointer;
}

.was-validated .form-check-input:invalid~.form-check-label {
    color: #333;
}

.was-validated .form-control:valid {
    background-image: none;
    /* border-color: unset; */
}

.was-validated .form-control:invalid {
    background-image: none;
}

.form-control.is-invalid,
.form-control.is-valid,
.was-validated .form-control:invalid {
    background-image: unset;
}

.bi-check-circle::before {
    font-weight: 600 !important;
}

.was-validated .form-check-input:valid~.form-check-label {
    color: #333;
}

/* Spostiamo il feedback fuori dal flusso (non cambia l'altezza del .form-floating) */
/* .form-floating .invalid-feedback {
    position: absolute;

} */

/* .form-control.is-invalid~.invalid-feedback {
    display: block !important;
} */

/* .bi::before,
[class*=" bi-"]::before,
[class^=bi-]::before {
    font-weight: 600 !important;
} */

.text-warning {
    color: #FFC107 !important;
}

.text-success {
    color: #4CAF50 !important;
}

.tooltip-inner {
    text-align: center;
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    border: 3px solid #FFC107;
    background-color: #fff;
    color: #333;
    font-family: "Raleway", sans-serif;
    font-weight: 600;
    max-width: 210px;
}

.tooltip {
    --bs-tooltip-opacity: 1;
}

.tooltip-arrow {
    --bs-tooltip-bg: #FFC107;
}

.tooltip-inner.success {
    text-align: center;
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    border: 3px solid #4CAF50;
    background-color: #fff;
    color: #333;
    font-family: "Raleway", sans-serif;
    font-weight: 600;
}

.tooltip-arrow.success {
    --bs-tooltip-bg: #4CAF50;
}

/*--------------------------------------------------------------
# Servizio SEPASS
--------------------------------------------------------------*/
.box-input {
    border-radius: 10px;
    width: 100%;
}