:root {
    --pointInitSize: 30px;
    --highlightColor: #7a7a7a;
    --highlightActiveColor: #008bf8;
    --tenColor: #008a94;
    --twentyColor: #009456;
    --fiftyColor: #918900;
    --onehunColor: #b26b00;
    --twohunColor: #6e1010;
    --threehunColor: #8d1f6a;
    --fivehunColor: #4f106e;
    --badgeColor:#ff4444;
    --titlesColor:#005761;
}

@font-face {
    font-family: 'Takashimura-Regular';
    src: url('fonts/Roller Coaster.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    overflow-x: hidden;
    overflow-y: auto; /* Permette scroll solo se necessario */
}

/* #region welcome page */
.welcome {
    width: 100%;
    z-index: 5000;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
    align-items: center;
    padding: 2rem 0rem;
    
    /* animazione */
    transform: translateY(0);
    transition: all 0.5s ease-out;

    /* immagine sfondo */
    background: 
        linear-gradient(rgba(255, 255, 255, 0.3), rgba(0, 0, 0, 0.8)),
        url('img/welcome.jpg') center/cover no-repeat;
    /* background-image: url('img/welcome.jpg'); */
    /* background-size: cover;       
    background-position: center;  
    background-repeat: no-repeat; 
    background-attachment: fixed;   */
    background-position: top center;

    overflow-y: auto; /* Abilita lo scroll verticale */
    overscroll-behavior: contain; /* Evita l'effetto rimbalzo */
    -webkit-overflow-scrolling: touch; /* Scroll fluido su mobile */
    min-height: 100dvh;
    min-height: 100vh;

    /* modifiche per compatibilita' iOS */
    -webkit-overflow-scrolling: touch; /* Scroll fluido iOS */
    overscroll-behavior-y: contain; /* Previene l'effetto rimbalzo */
}

/* #region stili per il content */

.welcome-content {
  max-width: 600px;
  padding: 0.8rem;
  text-align: center;
  overflow: visible; /* Importante */
}

.welcome-title {
  color: var(--titlesColor);
  font-size: 6rem;
  margin-bottom: 1rem;
  font-family: 'Takashimura-Regular';
}

.welcome-subtitle {
  color: var(--titlesColor);
  font-size: 3rem;
  margin-top: 0;
  font-family: 'Takashimura-Regular';
}

.welcome-quote {
  font-style: italic;
  color: var(--fiftyColor);
  margin-bottom: 2rem;
}

.welcome-section {
  background-color: #f9f9f9a8;
  border-radius: 15px;
  padding: 0.5rem;
  margin: 0.5rem 0;
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
}

.section-title {
  color: var(--titlesColor);
  margin-top: 0;
  font-family: 'Takashimura-Regular';
  font-size: 2rem;
}

.section-text {
  color: #555;
  line-height: 1.6;
}

.instructions-list {
  text-align: left;
  padding-left: 1.5rem;
  color: #444;
}

.instructions-list li {
  margin-bottom: 1rem;
  line-height: 1.5;
}
/* #endregion stili per il content */

.welcome.hidden {
    transform: translateY(-100%);
}

.btnGo {
    width: fit-content;
    font-size: large;
    height: fit-content;
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 30px;
    padding-right: 30px;
    background: var(--highlightActiveColor);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

/* #endregion welcome page */


body {
    margin: 0;
    overflow-x: hidden;
    font-family: sans-serif;
    background: #fdf7f2;
    padding-bottom: 0%;
}


.container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    --city-radius: 2rem;
    --city-sign-color-back: var(--highlightActiveColor);
    --city-sign-color-font: #fff;
    --city-pin-size-font: 2rem;
    z-index: 10; /* Sopra la mappa */
    padding-top: 20px; /* Spazio per eventuali elementi in alto */
    pointer-events: none;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom); /* Per dispositivi con notch */

    height: 100vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;

    padding-bottom: 2.2rem;
}


#map { position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    height: 100vh;
    z-index: 0; /* Sotto tutti gli altri elementi */
 }


/* #region Cart Sidebar */

.sidebar {
    position: fixed;
    right: 20px;
    top: 20px;
    width: 450px;
    max-width: 100%;
    max-height: 90dvh;
    max-height: 90vh;
    /* massimo 90% della viewport */
    background: white;
    transform: translateX(110%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    border-radius: 15px;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    height: auto;
    /* adattabile al contenuto */
}

.selected-activities {
    margin: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.delete-btn {
    background: #ffebee;
    border: none;
    border-radius: 50%;
    color: #ff4444;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: 10px;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: #ffcdd2;
    color: #d32f2f;
    transform: rotate(90deg);
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.activity-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background: var(--highlightActiveColor);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:hover {
    background: #00d45a;
    transform: translateY(-2px);
}

/* #endregion Cart Sidebar */

/* #region Map - Cities */
.map-cities {
    width: 100%;
}

.map-city {
    border-radius: var(--city-radius);
    left: calc(var(--x) * 1% - var(--city-radius));
    padding: var(--city-radius);
    position: absolute;
    top: calc(var(--y) * 1% - var(--city-radius));
}

.map-city::after,
.map-city::before {
    font-size: var(--city-pin-size-font);
}

.map-city::before {
    content: "•";
    left: calc(-50% + var(--city-radius));
    position: absolute;
    top: calc(-0.36em + var(--city-radius));
    text-align: center;
    text-shadow: 0 1px 1px #000;
    width: 100%;
}

.map-city::after {
    clip-path: inset(-0.5em 0 0 0);
    content: "📍";
    text-shadow: 1px 1px 2px var(--highlightColor);
    left: calc(-50% + var(--city-radius));
    position: absolute;
    top: calc(-1em + var(--city-radius));
    text-align: center;
    transition: all 300ms ease-out;
    width: 100%;
    z-index: 200;
}

/* #endregion Map - Cities */


/* #region Map - Sign */
.map-city__label {
    display: none;
    left: calc(-5em + 50%);
    position: absolute;
    text-align: center;
    width: 10em;
    z-index: 200;
}

.map-city__sign {
    align-items: center;
    background-color: var(--city-sign-color-back);
    border-radius: 0.2rem;
    border: 0.15em solid var(--city-sign-color-font);
    box-shadow: 0 0 3px #000;
    color: var(--city-sign-color-font);
    column-gap: 0.3em;
    display: flex;
    font-weight: 700;
    justify-content: center;
    margin: 0 auto;
    max-width: 100%;
    overflow: hidden;
    padding: 0.4em 0.6em 0.4em 0.3em;
    text-overflow: ellipsis;
    text-wrap: nowrap;
    width: max-content;
}

.map-city__sign::before {
    content: attr(data-icon);
}

/* #endregion Map - Sign */


/* #region tracking */

/************/
/* Tracking */
/************/

/* Map - Cities */
.map-city:hover::after {
    clip-path: inset(-0.5em 0 0.5em 0);
    transform: translateY(0.5em);
}

/* Map - Sign */
.map-city:hover .map-city__label {
    animation: fadein 300ms forwards ease-out;
    display: block;
}

.map-city:hover .map-city__sign.anim::before {
    animation-duration: 500ms;
    animation-fill-mode: forwards;
}

.map-city:hover .map-city__sign.anim-grow::before {
    animation-name: grow;
    animation-timing-function: ease-in;
}

.map-city:hover .map-city__sign.anim-slidein::before {
    animation-name: slidein;
    animation-timing-function: ease-out;
}

.map-city.hovered::after {
    clip-path: inset(-0.5em 0 0.5em 0);
    transform: translateY(0.5em);
}

.map-city.hovered .map-city__label {
    display: block;
    animation: fadein 300ms forwards ease-out;
}

/* #endregion tracking */

/* #region animations */
/**************/
/* Animations */
/**************/

/* Fade in from top */
@keyframes fadein {
    0% {
        opacity: 0;
        top: calc(var(--city-radius));
    }

    100% {
        opacity: 1;
        top: calc(var(--city-radius) + var(--city-pin-size-font) / 2);
    }
}

/* Grow from the ground */
@keyframes grow {
    0% {
        transform: translate(0, 200%);
    }

    10% {
        transform: translate(5%, 180%);
    }

    20% {
        transform: translate(-10%, 160%);
    }

    30% {
        transform: translate(15%, 140%);
    }

    40% {
        transform: translate(-5%, 120%);
    }

    50% {
        transform: translate(10%, 100%);
    }

    60% {
        transform: translate(-15%, 80%);
    }

    70% {
        transform: translate(5%, 60%);
    }

    80% {
        transform: translate(0, 40%);
    }

    90% {
        transform: translate(0, 20%);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* Slide in from left */
@keyframes slidein {
    0% {
        transform: translateX(-200%);
    }

    100% {
        transform: translateX(0);
    }
}

/* #endregion animations */

.cards-container {
    display: flex;
    flex-wrap: wrap; /* Permette alle card di andare a capo */
    overflow-y: auto; /* Scroll verticale se necessario */
    overflow-x: hidden; /* Disabilita lo scroll orizzontale */
    gap: 1.5rem;
    margin-top: 40dvh; /* Inizia a circa 50% della viewport */
    margin-top: 40vh; /* Inizia a circa 50% della viewport */
    scroll-snap-type: y mandatory; /* Rimuovi lo snap orizzontale */
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    scroll-behavior: smooth;
    will-change: scroll-position;
    position: relative;
    justify-items: center;
    justify-content: center; /* Centra le card orizzontalmente */
    max-height: 55dvh; /* Altezza massima */
    max-height: 55vh; /* Altezza massima */
    height: auto;
    flex: 1;
}

.cards-container::-webkit-scrollbar {
    display: none;
}

.cards-container::-webkit-scrollbar-thumb {
    background: #ccc;
    /* border-radius: 4px; */
}

.cards-container.active {
    cursor: grabbing;
}

/* #region CARD */

.card {
    width: 190px;
    height: 150px;
    border-radius: 20px;
    background: #f5f5f5;
    position: relative;
    padding: 1rem;
    border: 2px solid #c3c6ce;
    transition: 0.5s ease-out;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    scroll-snap-align: start;
    flex: 0 0 auto;
    scroll-snap-align: start;
    flex: 0 0 auto;
    border-color: var(--highlightColor);
    box-shadow: 0 4px 18px 0 rgba(0, 0, 0, 0.25);
}

.card-details {
    color: black;
    gap: 0.5em;
}

.card-image {
    max-width: -webkit-fill-available;
    width: 100%;
    border-radius: 1rem; 
    height: 127px;
    object-fit: cover; /* Scala e ritaglia l'immagine per riempire il contenitore */
    object-position: center; /* Centra l'immagine nel ritaglio */
    pointer-events: none;
}

.text-title {
    font-weight: bold;
    margin-bottom: 0.5em;
}

.text-body {
    color: rgb(134, 134, 134);
    font-size: 0.9em;
}

.card-button {
    transform: translate(-50%, 50%);
    width: 60%;
    height: 35px;
    border-radius: 1rem;
    border: none;
    background-color: var(--highlightColor);
    color: #fff;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    margin: 8px;
    left: 46.5%;
    bottom: 0;
    opacity: 1;
    transition: 0.3s ease-out;
    text-decoration: none;
    text-align: center;
    align-items: center;
    display: flex;
    justify-content: center;

    position: absolute; /* Aggiunto per posizionare l'icona */
    overflow: hidden; /* Per nascondere l'icona quando è fuori */
}


.card-button.selected {
    border-radius: 3rem;
    font-size: 1.7rem;
    font-weight: bold;
}

.card-button.selected::before {
        content: "\f00c"; 
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        left: -1.5rem;
        top: 50%;
        transform: translateY(-50%);
        opacity: 0;
        transition: all 0.3s ease-out;
        font-size: 1.5rem;
    }

    .card-button.selected.show-icon::before {
        left: 1rem; 
        opacity: 1;
    }

/* #region done icon */
@media (min-width: 769px){
    

    

    .card-button::after {
        content: "";
        position: absolute;
        right: -30px;
        /* Inizia fuori dal bottone */
        top: 43%;
        transform: translateY(-50%);
        transition: all 0.3s ease-out;
        opacity: 0;
        top: calc(50% + 1px);
        /* Micro-regolazione verticale */
    }

    .card:hover .card-button::after {
        content: "\f07a";
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 23px;
        /* Dimensione fissa in pixel */
        /* width: 20px; Larghezza fissa per allineamento migliore */
        text-align: center;
        /* Centra l'icona */
        right: 18px;
        /* Posizione finale dentro il bottone */
        opacity: 1;
    }
}


/* #endregion done icon */

.card-button.selected::after {
    content: none;
    /* Rimuove l'icona del carrello se presente */
}


.card:hover {
    transition: 0.3s ease-out;
}




/* #endregion CARD */



/* Bottone per aprire la sidebar */
 .toggle-cart-btn{
    position: fixed;
    top: 10px;
    right: 20px;
    background-color: #008bf8;
    color: white;
    border: none;
    padding: 14px 18px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    z-index: 1001;
    display: block;
    margin-top: 3dvh;
    margin-top: 3vh;
    cursor: pointer;
    /* margin-right: 3vh;
    margin-right: 3dvh; */
}


/* #region Badge carrello */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--badgeColor);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Animazione pallina volante*/
.flying-ball {
    position: fixed;
    width: 18px;
    height: 18px;
    background-color: #ff4444;
    border: 2px solid white;
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.8);
    animation: flyToCart 0.75s cubic-bezier(0.42, 0, 0.58, 1) forwards;
    opacity: 1;
}

@keyframes flyToCart {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    40% {
        transform: translate(
            calc(var(--move-x) * 0.8), 
            calc(var(--move-y) * 0.8)
        ) scale(0.9);
    }
    100% {
        transform: translate(var(--end-x), var(--end-y)) scale(0.5);
        opacity: 0.8;
    }
}

/* body {
    contain: paint;
}    */

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.toggle-cart-btn.bounce {
    animation: cartBounce 0.3s ease;
}

/* #endregion Badge carrello */



/* Contenuto popup dei marker */
.popup-image{
    width:100%;
    margin-bottom:8px
}


/* Stile base - nascosto su desktop */
.mobile-details {
    display: none;
    position: absolute;
    left: 16px;
    bottom: 16px;
    color: #613058;
    font-weight: bold;
    font-size: 0.8em;
    letter-spacing: 1px;
    border-radius: 4px;
}

.sidebar.open {
    transform: translateX(0);
}


/* Versione Mobile */
@media (max-width: 768px) {

    .toggle-cart-btn {
        margin-top: 1dvh;
        margin-top: 1vh;
    }

    .sidebar {
        right: 0;
        top: 0;
        transform: translateX(100%);
        width: 100%;
    }

    .card-button {
        width: 30%;
        height: 1.5rem;
        font-size: 1rem;
        left: unset;
        padding: 0.3rem 0.6rem;
        bottom: 0px;
        position: absolute;
        transform: unset;
        right: 0%;
    }

    .card-button.selected {
        padding: 0.3rem 0.2rem 0.3rem 2rem;
    }


    .card {
        width: 70vw; /* Usa viewport width invece del 100% */
        height: auto; /* Adatta l'altezza automaticamente */
        padding: 0.4rem;
        position: relative;
        padding-bottom: 2.6rem;
    }


    .cards-container {
        flex-direction: column;
        flex-wrap: nowrap; /* Disabilita il wrapping su più righe */
        overflow-x: hidden; /* Disabilita scroll orizzontale */
        overflow-y: auto; /* Abilita scroll verticale */
        gap: 0.3rem;
        padding: 0 1rem;
        margin-top: 40dvh;
        margin-top: 40vh;
        height: 60dvh;
        height: 60vh;
        justify-items: baseline;


        /* max-height: 60vh; */
        -webkit-overflow-scrolling: touch;
        user-select: none;
        scroll-behavior: smooth;
        will-change: scroll-position;
        position: relative;

        display: grid;
        grid-auto-rows: minmax(auto, auto);
        max-height: calc(var(--vh, 0dvh) * 100 - 40dvh - 2.2rem) !important;
        max-height: calc(var(--vh, 0vh) * 100 - 40vh - 2.2rem) !important;

        padding-bottom: 2.2rem;
    }


    .text-body {
        display: none; /* Nasconde la descrizione */
    }
    
    .text-title {
        font-size: 1em; /* Titolo più piccolo */
        margin-bottom: 0.2em;
    }

    .popup-image{
        max-width: 250px; /* Più piccola su mobile */
        max-height: 135px;
        margin-bottom:8px;
        width: auto; /* Adatta alla larghezza mantenendo le proporzioni */
    }


    /* Aggiungi l'effetto per le card selezionate */
    .card.selected {
        width: 120%;
        z-index: 10; /* Porta in primo piano le card selezionate */
        transform: translateX(-10%); /* Centra l'allargamento */
        transition: all 0.3s ease-out;
    }

    .card-image {
        display: none;
    }

    .mobile-details {
        display: block;
    }


    .welcome {
        -webkit-overflow-scrolling: touch;
        overflow-y: scroll;
        height: auto;
        min-height: 100dvh;
        min-height: 100vh;
        padding-bottom: env(safe-area-inset-bottom);
        background: 
            linear-gradient(rgba(255, 255, 255, 0.3), rgba(0, 0, 0, 0.8)),
            url('img/welcome.jpg') center;
        background-position: top center;
    }
    
    .welcome-content {
        padding: 20px;
    }
}


/* #region payment modal */

/* Modal Pagamento */
.modal {
    display: none;
    position: fixed;
    position-area: center;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 25px;
    border-radius: 12px;
    max-width: 900px;
    width: calc(100% - 40px); 
    box-sizing: border-box; 
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    font-family: sans-serif;
    border-top: 5px solid #ff6b6b;
    position: relative; 
    left: 0; 
    transform: none; 
    max-height: 90dvh;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-inner{
    overflow: hidden;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-header i {
    font-size: 2.5rem;
    color: #ff6b6b;
    margin-bottom: 10px;
}

.modal-header h3 {
    color: #333;
    margin: 0;
    font-size: 1.5rem;
}

.selected-experiences {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    max-height: 30dvh;
    max-height: 30vh;
    overflow-y: auto;
}

.selected-experiences h4 {
    margin-top: 0;
    color: #495057;
}

#experiences-list {
    padding-left: 20px;
    margin: 10px 0;
    list-style-type: disc;
}

#experiences-list li {
    margin-bottom: 8px;
    color: #343a40;
}

.total-amount {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px 0;
    border-top: 1px dashed #ddd;
    border-bottom: 1px dashed #ddd;
    margin-bottom: 20px;
}

.payment-options h4 {
    color: #495057;
    margin-bottom: 15px;
    text-align: center;
    flex: 1;
    min-height: 0;
}

.bank-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.detail-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.detail-label {
    font-weight: bold;
    min-width: 100px;
    color: #212529;
}

.detail-value {
    flex: 1;
    margin-right: 10px;
    word-break: break-all;
    width: 100%;
}

.copy-btn {
    background: #008bf8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #0069d9;
}

.copy-btn:disabled {
    background: #058a00;
}

.modal-footer {
    font-size: 0.9rem;
    text-align: center;
    color: #6c757d;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.modal-footer i {
    color: #ff6b6b;
    margin: 0 3px;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
}

.close-modal:hover {
    color: #333;
}

.causale-input {
    display: flex;
    flex: 1;
    gap: 5px;
}

.causale-field {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
}

.causale-field:focus {
    outline: none;
    border-color: #008bf8;
    box-shadow: 0 0 0 2px rgba(0, 139, 248, 0.2);
}

.confirmation-form {
        padding-top: 20px;
    }


@media (max-width: 768px) {

    .welcome-title {
        font-size: 3rem;
    }

    .welcome-subtitle {
        font-size: 2rem;
    }

    .modal {
        padding: 0 10px; 
    }

    .modal-content {
        margin: 20px auto;
        width: calc(100% - 20px);
        padding: 20px 15px;
    }
    
    .selected-experiences {
        max-height: 25dvh; /* Meno spazio per la lista su mobile */
        max-height: 25vh; /* Meno spazio per la lista su mobile */
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .detail-label {
        margin-bottom: 5px;
    }
    
    .copy-btn {
        margin-top: 5px;
        width: 100%;
        justify-content: center;
    }

    .causale-input {
        flex-direction: column;
        width: 100%;
    }

    .detail-value
    .causale-field {
        word-break: break-word; /* Migliora la gestione del testo lungo */
        overflow-wrap: anywhere; 
    }
    
    .causale-input .copy-btn {
        width: 100%;
    }
    
    .button-group {
        flex-direction: row; /* Mantiene i pulsanti in orizzontale */
    }


    /* Form di conferma */
    .confirmation-form {
        margin-top: 20px;
        border-top: 1px dashed #eee;
        padding-top: 20px;
    }

    .confirmation-form label {
        display: block;
        margin-bottom: 5px;
        font-size: 0.9rem;
        color: #495057;
    }

    .confirmation-form input,
    .confirmation-form textarea {
        width: 100%;
        padding: 8px;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        box-sizing: border-box;
    }

    .confirmation-form textarea {
        min-height: 80px;
        resize: vertical;
    }

    .submit-btn {
        background: #ff6b6b;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 4px;
        cursor: pointer;
        width: 100%;
        font-weight: bold;
        transition: background 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .submit-btn:hover {
        background: #e05555;
    }

    .form-status {
        margin-top: 10px;
        padding: 10px;
        border-radius: 4px;
        text-align: center;
    }

    .form-status.success {
        background: #e6ffed;
        color: #22863a;
    }

    .form-status.error {
        background: #ffebee;
        color: #cb2431;
    }

    @media (max-width: 600px) {
        .confirmation-form {
            padding: 15px 0;
        }
    }

    .payment-methods {
        flex-direction: column;
    }
    
    .payment-method {
        width: 100%;
        justify-content: center;
    }
    
    .paypal-btn {
        width: 100%;
        padding: 12px;
    }
}

/* Stili per i metodi di pagamento */
.payment-methods {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.payment-method {
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.payment-method:hover {
    border-color: #008bf8;
}

.payment-method.active {
    border-color: #008bf8;
    background-color: #f0f8ff;
}

.payment-method i {
    font-size: 1.2em;
}

.paypal-btn {
    background: #003087;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
    transition: background 0.3s;
}

.paypal-btn:hover {
    background: #001f5e;
}

.paypal-details {
    text-align: left;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.payment-details {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* #endregion payment modal */




.cards-container, 
.toggle-cart-btn, 
.sidebar, 
.card, 
.card-button {
    pointer-events: auto;
}



.instructions-list, .section-text {
    text-shadow: 
        1px 1px 3px rgba(255, 255, 255, 0.3), /* Ombra primaria */
        0 0 5px rgba(255,255,255,0.9); /* Alone bianco per contrasto */
}

.welcome-title, .welcome-subtitle {
    text-shadow: 
        2px 2px 4px rgb(255, 255, 255), /* Ombra primaria */
        0 0 5px rgba(255,255,255,0.9); /* Alone bianco per contrasto */
}

/* Stili per le frecce del carrello */
.toggle-cart-btn .left-arrow {
  display: inline-block;
}

.toggle-cart-btn .right-arrow {
  display: none;
}

.sidebar.open ~ .toggle-cart-btn .left-arrow {
  display: none;
}

.sidebar.open ~ .toggle-cart-btn .right-arrow {
  display: inline-block;
}

html, body {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: auto;
    height: 100%;
    /* overflow: hidden; */
}


/* #region version style */
.version-info {
    position: fixed;
    bottom: 12px;
    left: 12px;
    font-size: 11px;
    color: #666;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 4px 8px;
    border-radius: 8px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    pointer-events: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Nascondi su mobile se necessario */
@media (max-width: 768px) {
    .version-info {
        bottom: 8px;
        left: 8px;
        font-size: 10px;
        background-color: rgba(255, 255, 255, 0.8);
    }
    
    /* Opzionale: nascondi completamente su mobile */
    /* .version-info {
        display: none;
    } */
}


/* version style */
