/* ==========================================================================
   TICKETCROCIERE PWA - MASTER CSS
   ========================================================================== */
/* PWA */
/* --- FONTS & RESET --- */
@font-face {
    font-family: "Fira Sans Extra Condensed";
    font-style: normal;
    font-display: swap;
    font-weight: 300;
    src: local('FiraSansExtraCondensed-Light'), url("../font/FiraSansExtraCondensed-Light-AxqB3dJ.woff2") format('woff2');
}

@font-face {
    font-family: "Fira Sans Extra Condensed";
    font-style: normal;
    font-display: swap;
    font-weight: 600;
    src: local('FiraSansExtraCondensed-Bold'), url("../font/FiraSansExtraCondensed-Bold-6aC0KV0.woff2") format('woff2');
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

/* --- GLOBALS --- */
html, body {
    min-height: 100vh;
}
html {
    scroll-behavior: smooth;
}

body {
    background: #f4f4f4;
    font-family: 'Fira Sans Extra Condensed', sans-serif;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}

.app-footer {
    height: 0;
}

/* --- HEADER & NAVIGATION --- */
.app-header {
    background: #17b7aa;
    color: #fff;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: env(safe-area-inset-top);
    padding-left: 10px;
    padding-right: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 20;
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding-top: env(safe-area-inset-top);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.header-center a { pointer-events: auto; }
.header-center img { height: 32px; width: auto; }

.header-btn {
    background: transparent;
    border: none;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.header-btn:active { opacity: 0.7; }
.header-btn.disabled { opacity: 0.3; pointer-events: none; cursor: default; }
.header-icon { width: 24px; height: 24px; fill: white; }

/* --- SIDEBAR MENU --- */
.pwa-sidebar {
    position: fixed; top: 0; left: -280px; width: 280px; height: 100%;
    background: white; z-index: 2000; transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2); display: flex; flex-direction: column;
}
.pwa-sidebar.active { left: 0; }
.menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1999; display: none;
}
.menu-overlay.active { display: block; }
.sidebar-header { background: #17b7aa; color: white; padding: 20px; display: flex; justify-content: space-between; align-items: center; }
.user-welcome { font-weight: bold; font-size: 18px; }
.close-btn { font-size: 30px; cursor: pointer; line-height: 1; }
.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { border-bottom: 1px solid #eee; }
.sidebar-nav li a { display: block; padding: 15px 20px; color: #333; text-decoration: none; font-size: 16px; }
.sidebar-nav li.separator { background: #f4f4f4; color: #888; font-size: 12px; padding: 10px 20px; text-transform: uppercase; font-weight: bold; }

/* --- COMPONENTS: CARDS & BUTTONS --- */
.info-card { background: white; margin-bottom: 15px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.card-header { font-size: 15px; font-weight: bold; color: #17b7aa; padding: 12px 15px; border-bottom: 1px solid #f0f0f0; background: #fff; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.card-body-padded { padding: 15px; }

.btn-confirm {
    background: #ff6600; color: white; border: none; border-radius: 50px;
    font-size: 16px; font-weight: bold; text-transform: uppercase; cursor: pointer;
    padding: 15px 20px; display: inline-block; text-decoration: none; text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); width: 100%;
}
.btn-select-sm {
    background-color: #ff6600; color: white; font-size: 12px; font-weight: bold;
    text-transform: uppercase; padding: 6px 12px; border-radius: 4px; text-decoration: none; display: inline-block;
}

.actions-container { display: flex; gap: 10px; margin-top: 15px; flex-wrap: wrap; }
.btn-action-pwa {
    flex: 1; min-width: 120px; text-align: center; padding: 10px 5px; border-radius: 6px;
    text-decoration: none; color: white; font-weight: bold; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: opacity 0.2s;
}
.btn-action-pwa:active { opacity: 0.8; }


/* ==========================================================================
   UTILITIES & INLINE STYLES EXTRACTED (Login, Profilo, Preferiti, ecc.)
   ========================================================================== */

/* Layout e Wrapper di base */
.auth-wrapper { padding: 40px 20px; text-align: center; min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }
.page-wrapper { padding: 20px; padding-bottom: 80px; background-color: #f4f4f4; min-height: 100vh; }
.auth-logo { max-width: 200px; filter: invert(1) brightness(0.2); margin-bottom: 30px; }

/* Form e Campi Input */
.form-input { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; box-sizing: border-box; }

/* Alert e Messaggi Flash */
.alert { padding: 10px; border-radius: 5px; margin-bottom: 15px; font-size: 14px; text-align: left; }
.alert-danger { background: #ffe6e6; color: #d9534f; }
.alert-success { background: #d4edda; color: #155724; }

/* Badges per stati pratica (Preventivi, Acquisti) */
.badge { padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; display: inline-block; }
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-secondary { background: #e2e3e5; color: #383d41; }
.badge-primary { background: #17b7aa; color: white; }

/* Utilità Testo e Margini */
.text-primary { color: #17b7aa; }
.text-danger { color: #d9534f; }
.text-muted { color: #888; }
.text-center { text-align: center; }
.fw-bold { font-weight: bold; }
.mt-15 { margin-top: 15px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

/* Componenti Profilo */
.points-total { font-size: 32px; font-weight: bold; color: #17b7aa; }
.agent-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid #17b7aa; }

/* Voci di Lista (Preventivi, Preferiti, Pagamenti) */
.list-header { display: flex; justify-content: space-between; font-size: 16px; color: #666; margin-bottom: 5px; }
.list-title { font-weight: bold; font-size: 16px; color: #333; margin-bottom: 5px; }
.list-subtitle { font-size: 14px; color: #555; margin-bottom: 10px; }
.list-meta { font-size: 14px; color: #666; margin-top: 3px; }


/* --- HOME PAGE (Banner & Search) --- */
.pwa-banner-wrap { max-width: 600px; margin: 0 auto; padding: 10px 15px; }
.pwa-banner-container { position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.15); background: #fff; }
.pwa-banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.pwa-banner-track::-webkit-scrollbar { display: none; }
.pwa-banner-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; display: block; text-decoration: none; aspect-ratio: 16 / 9; }
.pwa-banner-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pwa-banner-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 15px; background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%); color: white; }
.pwa-banner-title { font-size: 18px; font-weight: bold; margin-bottom: 4px; }
.pwa-banner-text { font-size: 13px; opacity: 0.9; }

.search-container { 
    background: #ffffff; 
    margin: 20px 15px; 
    padding: 20px; 
    border-radius: 16px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
    position: relative; 
    z-index: 5; 
}

.input-box { 
    background-color: #f8f9fa; 
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    display: flex; 
    align-items: center; 
    padding: 0 15px; 
    height: 55px; 
    margin-bottom: 12px;
    position: relative; 
    cursor: pointer; 
    transition: all 0.2s ease;
}
.input-box:active { border-color: #17b7aa; background-color: #f0fcfb; }
.input-icon { width: 22px; height: 22px; fill: #17b7aa; margin-right: 15px; flex-shrink: 0; }
.input-label { width: 100%; font-size: 18px; color: #555; text-transform: uppercase; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.input-label.selected { color: #000; font-weight: 800; }
.input-box.selected-box {
    border-color: #17b7aa;
    background-color: #f0fcfb; /* Sfondo leggermente azzurrino per evidenziare */
}

/* Nuove utility estratte dalla Home */
.d-block { display: block; }
.text-decoration-none { text-decoration: none; }
.mt-10 { margin-top: 10px; }
.rotate-45 { transform: rotate(45deg); }

/* Messaggio a fine countdown (sostituisce lo stile inline JS) */
.countdown-welcome {
    font-size: 16px;
    font-weight: bold;
    padding: 10px;
    position: relative;
    z-index: 2;
    color: #17b7aa; /* Usato il verde primario per renderlo visibile su sfondo bianco */
}

.custom-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: white; z-index: 2000; display: none; flex-direction: column; }
.custom-modal.active { display: flex; animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- HEADER MODAL RICERCA (HOME) --- */
.custom-modal .modal-header { 
    background-color: #ffffff; 
    padding: 15px 20px; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    color: #333; 
    border-bottom: 1px solid #eee; 
    box-shadow: none;
}

/* Stondatura barra di input */
.search-input-wrapper { 
    flex: 1; 
    background: #f4f4f4; 
    border: 1px solid #e4e4e4;
    border-radius: 12px; 
    padding: 10px 15px; 
    display: flex; 
    align-items: center; 
}

.search-input { 
    width: 100%; 
    background: transparent; 
    border: none; 
    color: #333; 
    font-size: 16px; 
    outline: none; 
}

/* --- PULSANTE "X" TONDO (Coerente con Filtri/Preventivo) --- */
.close-modal-btn { 
    background: #f0f0f0; 
    color: #666; 
    border: none; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    font-size: 22px; 
    line-height: 1; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0;
    transition: background 0.2s;
}
.close-modal-btn:active { 
    background: #e0e0e0; 
}

.modal-list { flex: 1; overflow-y: auto; padding: 0; -webkit-overflow-scrolling: touch; }
.list-item { padding: 15px 20px; border-bottom: 1px solid #eee; font-size: 18px; font-weight: 600; color: #333; cursor: pointer; display: flex; align-items: center; justify-content: space-between; text-transform: uppercase; }
.list-item:active { background-color: #f0f0f0; }
.list-item.selected-item { color: #17b7aa; font-weight: bold; background-color: #f0fcfb; }

.buttons-row { display: flex; gap: 15px; margin-top: 20px; }
.btn { flex: 1; height: 55px; border: none; border-radius: 12px; color: white; font-weight: 800; font-size: 16px; cursor: pointer; text-transform: uppercase; box-shadow: 0 4px 10px rgba(0,0,0,0.15); transition: transform 0.1s; }
.btn:active { transform: scale(0.98); }
.btn-reset { background-color: #777777; }
.btn-search { background: linear-gradient(135deg, #ff7a1f 0%, #ff5e00 100%); }
.spacer-bottom { height: 80px; }

.search-loader { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.7); z-index: 10; display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.spinner { width: 40px; height: 40px; border: 4px solid #f3f3f3; border-top: 4px solid #17b7aa; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- CRUISE DETAILS PAGE --- */
.detail-container { padding-bottom: 30px; background-color: #f4f4f4; min-height: 100vh; }
.hero-section { position: relative; height: 250px; width: 100%; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); padding: 20px 15px; color: white; }
.hero-title { font-size: 24px; font-weight: bold; margin: 0; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); line-height: 1.2; }
.hero-subtitle { font-size: 14px; opacity: 0.9; margin-top: 5px; display: flex; align-items: center; gap: 5px; }

.date-slider-container { margin: 20px 0; position: relative; }
.date-slider-title { font-size: 16px; font-weight: bold; color: #333; margin: 0 0 15px 15px; }
.swiper-prices { padding: 0 35px 20px 35px !important; }
.price-card { background: white; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.pc-header { padding: 10px 5px; text-align: center; color: white; font-weight: bold; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.pc-header.active { background-color: #ff6600; }
.pc-header.inactive { background-color: #17b7aa; }
.pc-row { padding: 10px 5px; text-align: center; border-bottom: 1px solid #eee; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 85px; }
.pc-row:last-child { border-bottom: none; }
.pc-type { font-size: 12px; color: #666; margin-bottom: 2px; }
.pc-price { font-size: 18px; font-weight: 800; color: #333; margin-bottom: 5px; }
.pc-price.na { font-size: 14px; color: #ccc; font-weight: normal; margin-bottom: 0; padding: 10px 0;}
.swiper-button-next, .swiper-button-prev { color: #17b7aa !important; width: 25px !important; height: 25px !important; margin-top: -30px; }
.swiper-button-next:after, .swiper-button-prev:after { font-size: 28px !important; font-weight: bold; }

.split-layout { display: flex; flex-direction: column; }
#map { width: 100%; height: 350px; border-bottom: 1px solid #eee; }
.itinerary-scroll { height: 350px; overflow-y: auto; padding: 20px 15px; background: #fff; }
@media (min-width: 768px) { .split-layout { flex-direction: row; } #map { width: 50%; border-bottom: none; border-right: 1px solid #eee; } .itinerary-scroll { width: 50%; } }

.timeline { position: relative; padding-left: 25px; border-left: 2px solid #e0e0e0; margin-left: 5px; }
.timeline-item { position: relative; margin-bottom: 25px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot { position: absolute; left: -31px; top: 0; width: 14px; height: 14px; background: #17b7aa; border-radius: 50%; border: 3px solid white; box-shadow: 0 0 0 2px #17b7aa; }
.t-day { font-size: 11px; color: #888; text-transform: uppercase; font-weight: bold; margin-bottom: 2px;}
.t-port { font-size: 15px; font-weight: bold; color: #333; margin-bottom: 4px; display: block;}
.t-times { font-size: 12px; color: #666; display: flex; gap: 8px; flex-wrap: wrap;}
.t-times span { background: #f0fcfb; padding: 2px 6px; border-radius: 4px; color: #17b7aa; font-weight: 500;}
.marker-map { background-color: #17b7aa; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; justify-content: center; align-items: center; border: 2px solid white; box-shadow: 2px 2px 4px rgba(0,0,0,0.3); cursor: pointer; margin-top: -30px; margin-left: -15px; }
.marker-map span { transform: rotate(45deg); color: white; font-weight: bold; font-size: 12px; display: block; }

.ship-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.ship-stat { background: #f9f9f9; padding: 10px; border-radius: 8px; }
.ship-stat strong { display: block; font-size: 11px; color: #888; text-transform: uppercase; }
.ship-stat span { font-size: 14px; font-weight: bold; color: #333; }
.hero-logo-container { position: absolute; top: 15px; left: 15px; z-index: 10; background: rgba(255, 255, 255, 0.9); padding: 5px 10px; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.hero-logo { height: 35px; width: auto; display: block; }

.fab-heart { position: absolute; bottom: -25px; right: 20px; z-index: 20; width: 50px; height: 50px; border-radius: 50%; background: white; box-shadow: 0 4px 6px rgba(0,0,0,0.2); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s; }
.fab-heart:active { transform: scale(0.95); }
.fab-icon { width: 28px; height: 28px; }
.fab-share { position: absolute; bottom: -25px; right: 80px; z-index: 20; width: 50px; height: 50px; border-radius: 50%; background: #17b7aa; box-shadow: 0 4px 6px rgba(0,0,0,0.2); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s; }
.fab-share:active { transform: scale(0.95); }
.fab-share svg { width: 24px; height: 24px; fill: white; }

/* --- MODAL PREVENTIVO --- */
.modal-preventivo-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); z-index: 2000; display: none; align-items: flex-end; justify-content: center; }
.modal-preventivo-content { background: #fff; width: 100%; max-width: 600px; max-height: 90vh; border-radius: 24px 24px 0 0; box-shadow: 0 -10px 25px rgba(0,0,0,0.15); animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); overflow-y: auto; display: block; position: relative; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-drag-handle { width: 40px; height: 5px; background-color: #ddd; border-radius: 3px; margin: 12px auto 0 auto; }
.modal-preventivo-content .modal-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 24px 20px 24px; border-bottom: 1px solid #f0f0f0; background: #fff; position: sticky; top: 0; z-index: 10; }
.modal-header h2 { margin: 0; font-size: 20px; color: #222; font-weight: 800; }
.btn-close { background: #f0f0f0; border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 22px; line-height: 1; color: #666; cursor: pointer; display: flex; align-items: center; justify-content: center; }

#formPreventivo { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.modal-body { padding: 24px; }
.form-group { margin-bottom: 20px; }
.form-row-custom { display: flex; gap: 15px; margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 8px; text-transform: capitalize; }
.form-control { width: 100%; padding: 14px 16px; border: 1.5px solid #e4e4e4; border-radius: 12px; font-size: 15px; background-color: #f8f9fa; transition: all 0.2s ease; box-sizing: border-box; color: #333; }
.form-control:focus { outline: none; border-color: #17b7aa; background-color: #fff; box-shadow: 0 0 0 4px rgba(23, 183, 170, 0.1); }
.form-control::placeholder { color: #aaa; }
textarea.form-control { resize: none; height: 90px; }
.ages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 10px; }

.privacy-title { font-weight: bold; margin-bottom: 12px; display: block; color: #333; font-size: 14px;}
.privacy-options { display: flex; gap: 10px; }
.radio-card { flex: 1; cursor: pointer; }
.radio-card input { display: none; }
.radio-card-content { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 10px; text-align: center; background: #fff; border: 2px solid #e4e4e4; border-radius: 10px; color: #777; font-size: 13px; font-weight: bold; transition: all 0.2s; }
.radio-card input:checked + .radio-card-content { border-color: #17b7aa; background: #f0fcfb; color: #17b7aa; }

.modal-footer { padding: 10px 24px 30px 24px; }
.btn-submit-preventivo { width: 100%; background: linear-gradient(135deg, #ff7a1f 0%, #ff5e00 100%); color: white; border: none; padding: 16px; border-radius: 12px; font-size: 17px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3); transition: transform 0.1s, box-shadow 0.2s; }
.btn-submit-preventivo:active { transform: scale(0.98); box-shadow: 0 2px 6px rgba(255, 102, 0, 0.2); }

/* --- SEARCH RESULTS --- */
.results-container { padding: 15px; padding-bottom: 80px; min-height: calc(100vh - 50px); }
.results-info-bar { margin-bottom: 15px; color: #666; font-size: 14px; font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.cruise-card { background: white; border-radius: 8px; overflow: hidden; margin-bottom: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: flex; flex-direction: column; position: relative; transition: all 0.3s ease; }
.cruise-card.disabled {
    opacity: 0.8;
    filter: none !important; /* Disattiva il bianco e nero sull'intera card */
    pointer-events: none;
}
.cruise-card.disabled .card-img {
    filter: grayscale(100%); /* Applica il bianco e nero SOLO all'immagine */
}
.cruise-card a, .cruise-card .disabled-wrapper { text-decoration: none; color: inherit; display: block; }

.card-img { height: 150px; width: 100%; object-fit: cover; display: block; }
.card-body { padding: 15px; }
.ship-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.ship-name { 
    font-size: 20px; 
    font-weight: bold; 
    color: #333; 
    margin: 0; 
    flex: 1; /* Occupa lo spazio disponibile a sinistra */
}

.cruise-details { font-size: 15px; color: #333; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 12px; }
.detail-icon { width: 16px; height: 16px; fill: #17b7aa; }
.itinerary { font-size: 14px; color: #888; margin-bottom: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.price-box { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: 5px; 
    border-top: 1px solid #f0f0f0; 
    padding-top: 10px; 
    flex-wrap: nowrap; /* FORZA a stare su una riga */
    width: 100%;
}
.price { 
    color: #333; 
    font-size: 24px; /* Leggermente ridotto per sicurezza sui mobile piccoli */
    font-weight: bold; 
    line-height: 1;
}
.price small { font-size: 13px; color: #999; font-weight: normal; }

.btn-view { 
    background-color: #ff6600; /* ARANCIO */
    color: white; 
    padding: 8px 16px; 
    border-radius: 50px; 
    font-size: 14px; 
    font-weight: bold; 
    text-transform: uppercase; 
    white-space: nowrap; /* IL TESTO NON VA A CAPO */
    flex-shrink: 0; /* IL BOTTONE NON SI SCHIACCIA */
}
.pagination-container { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 30px; margin-bottom: 20px; }
.page-btn { background-color: white; color: #17b7aa; border: 1px solid #17b7aa; padding: 8px 16px; border-radius: 20px; text-decoration: none; font-weight: bold; font-size: 14px; }
.card-company-logo { position: absolute; top: 10px; left: 10px; z-index: 5; background: white; padding: 3px 6px; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); height: 25px; width: auto; }
.card-company-logo img { height: 100%; width: auto; display: block; }

.cruise-zone {
    font-size: 13px;
    font-weight: bold;
    color: #17b7aa; /* VERDE UFFICIALE APP */
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    text-align: right;
    flex-shrink: 0; /* Impedisce che si rimpicciolisca troppo */
}
.cruise-zone svg { width: 14px; height: 14px; fill: #17b7aa; }

/* --- ACQUISTI (COUNTDOWN / HYPE) --- */
.countdown-card { background: linear-gradient(135deg, #17b7aa 0%, #0d8a7f 100%); color: white; border-radius: 12px; padding: 20px 15px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(23, 183, 170, 0.3); text-align: center; position: relative; overflow: hidden; }
.countdown-card::before { content: ''; position: absolute; top: -20px; left: -20px; width: 80px; height: 80px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.countdown-card::after { content: ''; position: absolute; bottom: -10px; right: -10px; width: 60px; height: 60px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.hype-message { font-size: 16px; font-weight: bold; text-transform: uppercase; margin-bottom: 15px; letter-spacing: 0.5px; text-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.timer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; position: relative; z-index: 2; }
.timer-box { background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(5px); border-radius: 8px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; }
.timer-val { font-size: 20px; font-weight: 800; line-height: 1.2; }
.timer-label { font-size: 9px; text-transform: uppercase; opacity: 0.9; }
.badge-imminent { background: #ff6600; color: white; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; display: inline-block; margin-bottom: 10px; box-shadow: 0 2px 4px rgba(255, 102, 0, 0.3); animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* --- E-COMMERCE IFRAME (STEP 2) --- */
.iframe-container { width: 100%; min-height: 100vh; background: #fff; padding-bottom: 20px; }
.iframe-container iframe { width: 100%; border: none; min-height: 600px; }
.header-step { background: #f4f4f4; padding: 15px; text-align: center; font-weight: bold; color: #333; border-bottom: 1px solid #ddd; }

/* --- OFFLINE PAGE (Namespaced) --- */
body.offline-body { background: #0b1f3a; color: #fff; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.offline-body .card { width: min(520px, calc(100vw - 32px)); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 18px; padding: 22px 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); text-align: center; backdrop-filter: blur(6px); }
.offline-body img { max-width: 180px; width: 55%; height: auto; margin: 2px auto 14px; display: block; }
.offline-body h1 { font-size: 20px; margin: 0 0 10px; letter-spacing: 0.2px; }
.offline-body p { margin: 0 0 16px; line-height: 1.4; opacity: 0.95; }
.offline-body .meta { font-size: 13px; opacity: 0.8; margin-top: 10px; }
.offline-body .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.offline-body button, .offline-body a.btn { appearance: none; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.10); color: #fff; padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.offline-body button:hover, .offline-body a.btn:hover { background: rgba(255, 255, 255, 0.16); }
.offline-body button:active, .offline-body a.btn:active { transform: translateY(1px); }
.offline-body .status { display: inline-block; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.18); font-size: 12px; opacity: 0.95; }



/* CSS COUNTDOWN COMPATTO HOME (Sfondo Bianco) */
    .countdown-wrapper { margin: 15px 15px 25px 15px; }
    
    .countdown-card-compact {
        background: #ffffff;
        border-radius: 12px; 
        padding: 15px; 
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        text-align: center; 
        border: 1px solid #eee;
    }
    
    .next-cruise-label { 
        font-size: 12px; text-transform: uppercase; color: #222; 
        margin-bottom: 12px; display: block; 
    }
    .next-cruise-label strong {
        color: #17b7aa; font-size: 15px; 
    }
    
    .timer-grid-compact { display: flex; justify-content: center; gap: 10px; }
    
    .timer-box-compact { 
        background: #f8f9fa; border: 1px solid #e9ecef;
        border-radius: 8px; padding: 8px 10px; display: flex; 
        flex-direction: column; align-items: center; min-width: 55px; 
    }
    .timer-box-compact .timer-val { font-size: 20px; font-weight: 800; line-height: 1.1; color: #17b7aa; }
    .timer-box-compact .timer-label { font-size: 12px; text-transform: uppercase; color: #888; margin-top: 4px; font-weight: bold; }

    /* BOTTONE POSIZIONE ESTERNO */
    .btn-posizione-home {
        background: #17b7aa;
        border: 1.5px solid #17b7aa;
        color: #fff;
        padding: 10px 20px;
        border-radius: 50px;
        font-size: 13px;
        font-weight: bold;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        cursor: pointer;
        transition: all 0.2s;
        text-transform: uppercase;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        width: 100%;
    }
    .btn-posizione-home:active { background: #f0fcfb; transform: scale(0.98); }
    .btn-posizione-home svg { width: 18px; height: 18px; fill: #fff; }


    /* ==========================================================================
   LAYOUT & SIDEBAR ENHANCEMENTS
   ========================================================================== */
.sidebar-nav-flex {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.nav-btn-notifiche {
    background-color: #bde5e2;
}
.nav-icon {
    width: 20px;
    vertical-align: middle;
    margin-right: 8px;
    fill: currentColor;
}
.nav-item-bottom {
    margin-top: auto;
    border-top: 1px solid #eee;
    background-color: #fafafa;
}
.logout-link {
    color: #d9534f !important;
    font-weight: bold;
    display: flex;
    align-items: center;
}

/* ==========================================================================
   PWA INSTALLER (SPLASH SCREEN)
   ========================================================================== */
/* Regole base (precedentemente nel tag <style> della head) */
html.show-pwa-installer #pwa-fullscreen-installer {
    display: flex !important;
    opacity: 1 !important;
}
html.show-pwa-installer, 
html.show-pwa-installer body {
    overflow: hidden !important;
}

.pwa-installer-overlay {
    position: fixed;
    inset: 0;
    background-color: #18baad;
    z-index: 999999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: white;
}
.pwa-installer-logo {
    max-width: 220px;
    margin-bottom: 40px;
}
.pwa-installer-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
}
.pwa-installer-text {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 40px;
}

/* UI Installazione (Moduli) */
.install-ui-container {
    width: 100%;
}
.android-ui {
    max-width: 300px;
}
.ios-ui {
    max-width: 350px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
    border-radius: 16px;
}

.btn-install {
    width: 100%;
    background: #ff6600;
    color: white;
    padding: 18px;
    border-radius: 50px;
    font-weight: 800;
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}
.ios-steps {
    font-size: 15px;
    text-align: left;
    line-height: 1.5;
}
.fs-18 { font-size: 18px; }
.icon-inline { width: 20px; vertical-align: -5px; fill: #fff; }

/* ==========================================================================
   AUTH PAGES (Login, Registrazione, Password)
   ========================================================================== */
.pwa-auth-page {
    padding: 40px 20px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #18baad;
}

.pwa-auth-logo {
    max-width: 220px;
}

.pwa-auth-card {
    background: #ffffff;
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
}

.pwa-auth-title {
    color: #18baad;
    margin-bottom: 25px;
    font-weight: 800;
    font-size: 24px;
}

/* Messaggi di allerta (Successo ed Errore) */
.alert-auth {
    padding: 12px 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: left;
    font-weight: 500;
}
.alert-auth.danger {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #d9534f;
}
.alert-auth.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #155724;
}

/* Modificatori Form per l'Auth */
.form-label-auth {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

/* Aggiorna il colore "verde acqua" della casella di testo quando cliccata */
.pwa-auth-card .form-control:focus {
    border-color: #18baad !important;
    box-shadow: 0 0 0 4px rgba(24, 186, 173, 0.1) !important;
}

/* Sezione Footer Auth */
.auth-footer {
    margin-top: 25px;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.auth-link-muted {
    color: #888;
    text-decoration: underline;
    font-size: 13px;
    display: block;
    margin-bottom: 20px;
}

.auth-no-account {
    font-size: 14px;
    color: #555;
    font-weight: 500;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
}

.auth-link-brand {
    color: #18baad;
    font-weight: 800;
    text-decoration: none;
    display: inline-block;
    margin-top: 5px;
    font-size: 16px;
}

/* Utility Testo e Margini (aggiunte per layout rapidi) */
.text-left { text-align: left; }
.text-uppercase { text-transform: uppercase; }
.mb-25 { margin-bottom: 25px; }
.mt-5 { margin-top: 5px; }


/* ==========================================================================
   SEARCH RESULTS & TOOLBAR
   ========================================================================== */
.toolbar {
    display: flex;
    gap: 10px;
    background: white;
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
}
.btn-toolbar {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
}
.btn-toolbar:active { background: #e8e8e8; }
.btn-toolbar svg { width: 18px; height: 18px; fill: #17b7aa; }
.btn-toolbar.has-filters { background: #e8f7f6; color: #17b7aa; }
.filter-badge { background: #ff6600; color: white; font-size: 10px; padding: 2px 6px; border-radius: 10px; margin-left: 4px; }

/* Override specifici container */
.results-container {
    padding: 15px;
    padding-bottom: 80px;
    min-height: calc(100vh - 120px);
}

/* Tipografia Risultati */
.results-title-dynamic {
    font-weight: 800;
    font-size: 20px;
    color: #17b7aa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}
.text-nowrap { white-space: nowrap; }

/* Sold out, Richiesta e Timbri */
.stamp-disabled {
    position: absolute;
    top: 50%;
    left: 80%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: auto;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
.price-request { font-size: 14px; color: #666; }
.btn-view-info { background-color: #ff9800; }
.price-na-text { color: #999; font-size: 16px; font-weight: normal; }
.btn-view-na { background-color: #999; }
.no-results-box { text-align: center; padding: 40px 20px; }
.mt-20 { margin-top: 20px; }

/* ==========================================================================
   BOTTOM SHEET MODALS (Sort & Filter)
   ========================================================================== */
.bottom-modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 2000;
    display: none; align-items: flex-end; justify-content: center;
}
.bottom-modal-overlay.active { display: flex; }
.bottom-modal-content {
    background: white; width: 100%; max-width: 600px;
    border-radius: 20px 20px 0 0; animation: slideUp 0.3s ease; overflow: hidden;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.bottom-modal-handle { width: 40px; height: 5px; background: #ddd; border-radius: 3px; margin: 12px auto; }
.bottom-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 0 20px 15px; border-bottom: 1px solid #eee; }
.bottom-modal-header h3 { margin: 0; font-size: 18px; color: #333; }
.btn-close-bottom-modal { background: #f0f0f0; border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bottom-modal-body { padding: 20px; }
.bottom-modal-footer { padding: 15px 20px; padding-bottom: max(15px, env(safe-area-inset-bottom)); border-top: 1px solid #eee; display: flex; gap: 10px; }

/* Opzioni Ordinamento */
.sort-option { display: flex; align-items: center; padding: 15px; border: 1px solid #eee; border-radius: 10px; margin-bottom: 10px; cursor: pointer; transition: all 0.2s; }
.sort-option:active { background: #f5f5f5; }
.sort-option.selected { border-color: #17b7aa; background: #f0fcfb; }
.sort-option .radio-circle { width: 20px; height: 20px; border: 2px solid #ccc; border-radius: 50%; margin-right: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sort-option.selected .radio-circle { border-color: #17b7aa; }
.sort-option.selected .radio-circle::after { content: ''; width: 10px; height: 10px; background: #17b7aa; border-radius: 50%; }
.sort-option span { font-size: 15px; color: #333; }

/* Griglia Filtri */
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; transition: opacity 0.3s; }
.filter-grid.is-loading { opacity: 0.5; pointer-events: none; }
.filter-group { display: flex; flex-direction: column; }
.filter-group.full-width { grid-column: 1 / -1; }
.filter-group label { font-size: 11px; color: #888; text-transform: uppercase; margin-bottom: 6px; font-weight: 600; }
.filter-input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; background: #f8f8f8; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
.filter-input:focus { outline: none; border-color: #17b7aa; background: white; }
select.filter-input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.btn-modal-reset { flex: 1; padding: 14px; border: 1px solid #ddd; border-radius: 10px; background: white; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-modal-apply { flex: 2; padding: 14px; border: none; border-radius: 10px; background: #17b7aa; color: white; font-size: 15px; font-weight: 600; cursor: pointer; }


/* ==========================================================================
   DETTAGLIO CROCIERA & OVERRIDES
   ========================================================================== */

/* Utility di larghezza per lo slider date */
.w-100 { width: 100%; }
.w-220px { width: 220px; }

/* Flex Utility per le colonne dei form */
.flex-1 { flex: 1; }
.flex-35 { flex: 0 0 35%; }
.flex-40 { flex: 0 0 40%; }

/* Correzione larghezza select età (sovrascrive pwa.css originale) */
.ages-grid { grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); }
.ages-grid .form-control { padding: 12px 5px; text-align: center; }

/* Correzione Marker Mappa (Forma circolare e testo dritto) */
.marker-map { 
    background-color: #ff6600 !important;
    border-radius: 50% !important; 
    /* Rimosso il transform che rompeva MapLibre! */
    margin: 0 !important; /* Resetta i margini per centrare perfettamente il cerchio sulle coordinate */
}

.marker-map span { 
    transform: none !important; /* Annulla la rotazione a 45° solo del testo, così i numeri sono dritti */
    font-size: 14px; 
}

/* Messaggi ed informative nel modal preventivo */
.error-privacy-msg {
    color: #d9534f;
    font-size: 13px;
    margin-top: 10px;
    font-weight: bold;
    text-align: center;
}
.legal-notes {
    font-size: 12px;
    color: #666;
    margin-top: 20px;
    text-align: center;
    line-height: 1.5;
}
.legal-notes a {
    color: #18baad;
    text-decoration: underline;
    font-weight: bold;
}

/* Gestione Modal Attivo tramite classe (invece di inline style) */
.modal-preventivo-overlay.active {
    display: flex;
}

/* Stato Cuore Preferiti */
.heart-icon-svg { stroke-width: 2px; transition: all 0.2s; }
.heart-active { fill: #ff4444; stroke: #ff4444; }
.heart-inactive { fill: none; stroke: #ccc; }

/* Stato caricamento pulsanti (usato per il tasto cuore) */
.is-loading-btn { opacity: 0.5; pointer-events: none; }

/* ==========================================================================
   LISTE & PREFERITI (Elenchi dinamici)
   ========================================================================== */
.empty-state {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}
.bg-white { background-color: #ffffff; }
.bg-primary { background-color: #17b7aa !important; }

.list-item-row {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.list-item-row:last-child {
    border-bottom: none;
}
.list-item-content {
    flex: 1;
    padding-right: 15px;
}
.list-subtitle-sm {
    font-size: 14px;
    color: #888;
}

/* Tasto Elimina a forma di X */
.btn-delete-icon {
    display: inline-block;
    margin-left: 10px;
    color: #999;
    text-decoration: none;
    font-size: 24px;
    line-height: 1;
    transition: color 0.2s, transform 0.1s;
    vertical-align: middle;
}
.btn-delete-icon:active {
    color: #d9534f; /* Rosso pericolo al tocco */
    transform: scale(0.9);
}

/* Layout a colonna per gli elementi della lista (es. Preventivi, Pagamenti) */
.list-item-col {
    padding: 15px;
    border-bottom: 1px solid #eee;
}
.list-item-col:last-child {
    border-bottom: none;
}
.list-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}


/* ==========================================================================
   ACQUISTI (Prenotazioni & E-commerce)
   ========================================================================== */
.purchase-item {
    padding: 15px;
    border-bottom: 10px solid #f4f4f4;
}
.purchase-item:last-child {
    border-bottom: none;
}

.purchase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.purchase-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #17b7aa;
}

.purchase-subtitle {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

/* Box riepilogo prezzi */
.price-summary-box {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}
.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}
.price-row-total {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #ebebeb;
    padding-top: 5px;
    margin-top: 5px;
    font-weight: bold;
}
.deadline-text {
    font-size: 12px;
    color: #d9534f;
    text-align: right;
    margin-top: 2px;
}
.status-success-box {
    color: #155724;
    font-weight: bold;
    text-align: center;
    font-size: 13px;
    margin-top: 10px;
    border-top: 1px solid #ebebeb;
    padding-top: 10px;
}

/* Modificatori colori testo */
.text-white { color: #ffffff !important; }
.text-success { color: #155724 !important; }

/* Header specifico grigio chiaro */
.card-header-light {
    background: #f0f0f0;
    color: #333;
}

/* Nuovi Badge specifici */
.badge-pay-ok {
    background: #ffc107;
    color: #333;
}

/* Colori Bottoni Azione PWA */
.btn-action-primary { background-color: #ff6600; }
.btn-action-secondary { background-color: #ff6600; }

/* Messaggio di benvenuto a fine countdown */
.countdown-welcome-alt {
    font-size: 18px;
    font-weight: bold;
    padding: 20px;
    position: relative;
    z-index: 2;
    color: #fff;
}

/* ==========================================================================
   PAGAMENTI & TITOLI PAGINA
   ========================================================================== */
.page-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 22px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-amount {
    font-weight: bold;
    color: #333;
    font-size: 24px;
}

.payment-method {
    font-size: 14px;
    color: #17b7aa;
    margin-top: 4px;
    font-weight: 600;
}

.info-footer-text {
    margin-top: 20px;
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 0 20px;
}

/* ==========================================================================
   PAGINE TESTUALI / LEGALI (Privacy, Cookie, ecc.)
   ========================================================================== */
.legal-container {
    padding: 25px 20px;
    padding-bottom: 80px;
    background: #fff;
    min-height: 100vh;
    color: #444;
    line-height: 1.6;
    font-size: 15px;
}

.legal-title {
    font-size: 24px;
    font-weight: 800;
    color: #18baad;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
    margin-bottom: 20px;
    margin-top: 0;
}

/* Stili per formattare correttamente il testo HTML generato dal DB */
.legal-content h1, 
.legal-content h2, 
.legal-content h3 {
    color: #333;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
}
.legal-content p {
    margin-bottom: 15px;
}
.legal-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}
.legal-content li {
    margin-bottom: 8px;
}
.legal-content strong, 
.legal-content b {
    color: #222;
}

/* ==========================================================================
   PAGINA DI SUCCESSO (Riepilogo)
   ========================================================================== */
.success-page-wrapper {
    padding: 30px 15px;
    text-align: center;
    min-height: calc(100vh - 50px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-icon-wrap {
    background: #17b7aa;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(23, 183, 170, 0.3);
}
.success-icon-svg {
    width: 45px;
    height: 45px;
    fill: white;
}

.success-title {
    color: #17b7aa;
    margin-bottom: 10px;
    font-weight: 800;
    font-size: 24px;
}

.success-message {
    color: #555;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Lista per le righe di riepilogo (Nave, Partenza, ecc.) */
.summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}
.summary-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.summary-label {
    color: #888;
    font-size: 14px;
}
.summary-value {
    color: #333;
    font-size: 15px;
    text-align: right;
    font-weight: bold;
}

/* Link Testuale sottolineato */
.link-primary-underline {
    color: #17b7aa;
    font-weight: bold;
    text-decoration: underline;
    font-size: 15px;
}

/* ==========================================================================
   RAGGIUNGI PORTO (Stadia Maps & Routing)
   ========================================================================== */
.map-container-wrap {
    position: relative;
    width: 100%;
    height: 50vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}
#map {
    width: 100%;
    height: 100%;
}
#map-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.85);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #17b7aa;
    font-weight: bold;
    text-align: center;
    padding: 20px;
}

/* Marker e icone */
.pin-marker {
    width: 24px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-12px);
}
.pin-marker svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0px 2px 1px rgba(0,0,0,0.3));
}

/* Box ricerca manuale e Autocomplete */
.custom-start-box {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
}
.custom-start-msg {
    font-size: 13px;
    color: #d9534f;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.4;
}
.custom-start-label {
    font-size: 11px;
    color: #888;
    font-weight: bold;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}
.custom-start-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.autocomplete-container {
    position: relative;
    flex: 1;
}
.custom-start-input {
    width: 100%;
    padding: 12px 35px 12px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}
.custom-start-input:focus {
    border-color: #17b7aa;
}
.input-clear-btn {
    position: absolute;
    right: 10px;
    top: 12px;
    background: #ccc;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    margin-top: 4px;
    display: none;
}
.autocomplete-item {
    padding: 10px 12px;
    border-bottom: 1px dashed #eee;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-item:active {
    background: #f0fcfb;
}
.autocomplete-icon {
    width: 18px;
    height: 18px;
    fill: #111;
    margin-top: 2px;
    flex-shrink: 0;
}
.autocomplete-title {
    font-weight: 500;
    font-size: 15px;
    color: #333;
    margin-bottom: 2px;
}
.autocomplete-subtitle {
    font-size: 11px;
    color: #666;
    font-style: italic;
    text-transform: uppercase;
}

.custom-start-btn {
    background: #17b7aa;
    color: white;
    border: none;
    padding: 0 20px;
    height: 42px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}
.custom-start-btn:active {
    background: #0d8a7f;
}

/* ==========================================================================
   AREA RISERVATA & FORMS (Profilo, Anagrafica Edit)
   ========================================================================== */
.page-title-uppercase { color: #222; margin-bottom: 15px; font-weight: 800; text-transform: uppercase; font-size: 20px; }
.card-subtitle-pwa { font-size: 15px; color: #17b7aa; margin-top: 0; margin-bottom: 15px; }

/* Layout Utilità Aggiuntive */
.flex-100px { flex: 0 0 100px !important; min-width: 100px !important; }
.flex-2 { flex: 2 !important; }
.dashed-hr { border: 0; border-top: 1px dashed #eee; margin: 8px 0; }
.solid-hr { border: 0; border-top: 1px solid #eee; margin: 20px 0; }

/* Componenti Profilo */
.summary-row-col { flex-direction: column; align-items: flex-start; gap: 5px; }
.summary-value-left { text-align: left !important; line-height: 1.4; font-weight: normal !important; }
.profile-warning-box { color: #d9534f; font-size: 13px; font-weight: bold; margin-bottom: 15px; text-align: center; background: #ffe6e6; padding: 10px; border-radius: 8px; }
.btn-confirm-block { display: block; text-align: center; }

/* Form Anagrafica PWA */
.pwa-form-edit input[type='text'], 
.pwa-form-edit input[type='email'], 
.pwa-form-edit input[type='tel'], 
.pwa-form-edit input[type='date'], 
.pwa-form-edit select {
    width: 100%; padding: 14px 16px; border: 1.5px solid #e4e4e4; border-radius: 12px; 
    font-size: 15px; background-color: #f8f9fa; transition: all 0.2s ease; box-sizing: border-box; color: #333;
}
.pwa-form-edit input:focus, 
.pwa-form-edit select:focus { 
    outline: none; border-color: #17b7aa; background-color: #fff; box-shadow: 0 0 0 4px rgba(23, 183, 170, 0.1); 
}
.pwa-form-edit .form-group { margin-bottom: 15px; width: 100%; }
.pwa-form-edit .form-group label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 8px; text-transform: capitalize; }

.pwa-form-edit .form-row-custom { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 15px; }
.pwa-form-edit .form-row-custom > .form-group { flex: 1; min-width: calc(50% - 15px); margin-bottom: 0; }

.pwa-form-edit ul[id$='-fields-list'] { list-style: none; padding: 0; margin: 0; }
.pwa-form-edit .collection-item { background: #fff; border: 1.5px solid #e4e4e4; border-radius: 12px; padding: 15px; margin-bottom: 15px; position: relative; }

.pwa-form-edit .checkbox-group { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pwa-form-edit .checkbox-group input[type='checkbox'] { width: 20px; height: 20px; accent-color: #17b7aa; cursor: pointer; }
.pwa-form-edit .checkbox-group label { margin-bottom: 0; font-size: 14px; cursor: pointer; text-transform: none; }

.pwa-form-edit .btn-remove-item { background: #ffe6e6; color: #d9534f; border: none; border-radius: 8px; padding: 10px; font-weight: bold; cursor: pointer; width: 100%; margin-top: 10px; font-size: 13px; text-transform: uppercase; }
.pwa-form-edit .add-another-collection-widget { background: transparent; color: #17b7aa; border: 2px dashed #17b7aa; border-radius: 12px; padding: 12px; width: 100%; font-weight: bold; cursor: pointer; margin-bottom: 25px; text-transform: uppercase; font-size: 14px; transition: all 0.2s; }
.pwa-form-edit .add-another-collection-widget:active { background: #e8f7f6; }

.pwa-form-edit ul:has(> li.form-error), 
.pwa-form-edit .form-errors, 
.pwa-form-edit [class*="form-error"] { color: #d9534f !important; font-size: 12px; list-style: none; padding: 3px 0; margin: 0; font-weight: bold; }