/* =========================================
   REDBAY SHIPPING PAGE
   ========================================= */

body{
font-family:"Poppins",sans-serif;
}


/* =========================================
   HERO
   ========================================= */

.hero{
border-top:5px solid #cc0000;
border-bottom:5px solid #cc0000;
min-height:90vh;
display:flex;
align-items:center;
}

.hero h1{
font-size:36px;
font-weight:600;
line-height:1.3;
}

.hero h1 span{
color:#cc0000;
font-weight:500;
}


/* =========================================
   FORM CARD
   ========================================= */

.card{
border-radius:16px;
}

.card-body{
padding:25px;
}

.form-control,
.form-select{
border-radius:10px;
padding:10px;
}


/* =========================================
   QUICK ROUTES
   ========================================= */

#quickRoutesList{
display:flex;
gap:10px;
flex-wrap:wrap;
justify-content:center;
}

.quick-route-btn{
background:#fff;
border:1px solid #ddd;
border-radius:30px;
padding:6px 14px;
font-size:.9rem;
cursor:pointer;
transition:.2s;
}

.quick-route-btn:hover{
background:#cc0000;
color:#fff;
border-color:#cc0000;
}


/* =========================================
   SWITCH PICKUP
   ========================================= */

.switch-small{
position:relative;
display:inline-block;
width:42px;
height:22px;
}

.switch-small input{
opacity:0;
width:0;
height:0;
}

.slider-small{
position:absolute;
cursor:pointer;
top:0;
left:0;
right:0;
bottom:0;
background:#ccc;
border-radius:22px;
transition:.3s;
}

.slider-small:before{
content:"";
position:absolute;
height:18px;
width:18px;
left:2px;
top:2px;
background:white;
border-radius:50%;
transition:.3s;
}

.switch-small input:checked + .slider-small{
background:#cc0000;
}

.switch-small input:checked + .slider-small:before{
transform:translateX(20px);
}


/* =========================================
   PREVENTIVO BOX
   ========================================= */

.preventivo-box{
display:flex;
align-items:stretch;
background:#fff;
border:1px solid #e4e4e4;
border-radius:12px;
overflow:hidden;
box-shadow:0 3px 6px rgba(0,0,0,0.08);
margin-bottom:20px;
}

.days-box{
position:relative;
flex:0 0 112px;
width:112px;
min-width:112px;
background:#cc0000;
color:#fff;
text-align:center;
padding:24px 8px;
}

.days-box:after{
content:"";
position:absolute;
right:-22px;
top:0;
width:22px;
height:100%;
background:#cc0000;
clip-path:polygon(0 0,100% 50%,0 100%);
}

.days-number{
font-size:2.1rem;
font-weight:700;
}

.days-text{
font-size:.68rem;
text-transform:uppercase;
}

.center-box{
flex:1;
min-width:0;
padding:18px 32px;
}

.right-box{
display:flex;
flex-direction:column;
align-items:stretch;
align-self:stretch;
justify-content:space-between;
width:180px;
min-width:180px;
border-left:1px solid #eee;
text-align:center;
padding:15px;
box-sizing:border-box;
}

.right-box-summary{
display:flex;
flex-direction:column;
align-items:center;
width:100%;
}

.service-header,
.service-title{
width:100%;
text-align:left;
}

.service-title-row{
display:flex;
align-items:flex-start;
justify-content:space-between;
gap:10px;
flex-wrap:wrap;
width:100%;
}

.service-title-left{
display:flex;
align-items:center;
justify-content:flex-start;
gap:7px;
flex:1 1 320px;
min-width:0;
text-align:left;
font-weight:600;
line-height:1.35;
}

.offer-service-name{
min-width:0;
overflow-wrap:anywhere;
}

.service-title-left .offer-carrier-badge{
flex:0 0 auto;
margin:0;
white-space:nowrap;
}

.service-title-left .service-info{
flex:0 0 auto;
margin:0;
}

.service-title-right{
display:flex;
align-items:center;
justify-content:flex-start;
flex:0 1 auto;
flex-wrap:wrap;
gap:4px;
min-width:0;
}

.price{
font-size:clamp(1.05rem,2vw,2rem);
font-weight:700;
color:#cc0000;
line-height:1.2;
white-space:nowrap;
font-variant-numeric:tabular-nums;
max-width:100%;
}

.btn-seleziona{
width:100%;
border-radius:30px;
font-weight:600;
padding:10px 15px;
margin-top:auto;
}


/* =========================================
   BADGES
   ========================================= */

.badge-extra{
display:inline-block;
margin-right:4px;
padding:3px 8px;
font-size:.75rem;
border-radius:8px;
font-weight:600;
color:#fff;
}

.badge-scs{
background:#0051a8;
}

.badge-disagiato{
background:#cc0000;
}

.badge-periferico{
background:#d98c00;
}

/* Etichette delle due modalità nella card offerta */
.offer-mode-label{
margin-top:6px;
color:#cc0000;
font-size:.72rem;
font-weight:600;
line-height:1.2;
text-transform:uppercase;
letter-spacing:.04em;
}

.offer-mode-value{
margin-top:4px;
color:#26364a;
font-size:.92rem;
font-weight:600;
line-height:1.35;
overflow-wrap:anywhere;
}

.offer-point-badge{
display:inline-block;
max-width:100%;
margin-top:5px;
padding:3px 8px;
border:1px solid #d8dee7;
border-radius:999px;
background:#f5f7fa;
color:#35465c;
font-size:.72rem;
font-weight:600;
line-height:1.3;
overflow-wrap:anywhere;
}

.offer-estimate{
display:flex;
flex-direction:column;
gap:2px;
margin-top:7px;
color:#596779;
font-size:.76rem;
line-height:1.3;
}

.offer-estimate strong{
color:#26364a;
font-size:.86rem;
font-weight:600;
}

.offer-previous-summary{
display:flex;
align-items:center;
justify-content:center;
gap:10px;
flex-wrap:wrap;
width:100%;
box-sizing:border-box;
margin-top:14px;
padding:11px 14px;
border:1px solid #b8ccef;
border-radius:10px;
background:#f0f5ff;
color:#35465c;
font-size:.9rem;
line-height:1.4;
text-align:center;
}

.offer-previous-summary .badge{
display:inline-flex;
align-items:center;
justify-content:center;
gap:7px;
padding:6px 11px;
border-radius:999px;
font-size:.86rem;
font-weight:700;
white-space:normal;
}

.offer-previous-badge{
border:1px solid #cbd9f5;
background:#edf3ff;
color:#294a82;
}

.offer-previous-badge.is-price-changed{
border-color:#e8c86a;
background:#fff5d6;
color:#654f0a;
}

.offer-previous-summary.is-price-changed{
border-color:#e8c86a;
background:#fff9e8;
}

.quote-offer-count{
display:inline-block;
vertical-align:middle;
padding:3px 8px;
border-radius:999px;
background:#f3f4f6;
color:#596779;
font-size:.72rem;
font-weight:600;
}

.service-title-left{
font-size:1.05rem;
}


/* =========================================
   LOADING OVERLAY
   ========================================= */

.loading-overlay{
position:fixed;
inset:0;
background:rgba(0,0,0,.60);
backdrop-filter:blur(6px);
display:none;
align-items:center;
justify-content:center;
z-index:99999;
}

.loader-card{
background:#fff;
padding:35px 40px;
border-radius:18px;
box-shadow:0 10px 40px rgba(0,0,0,0.25);
text-align:center;
width:330px;
}

.loader-icon{
width:260px;
margin-bottom:15px;
}

.loader-title{
font-size:1.4rem;
color:#cc0000;
font-weight:700;
}

.loader-subtitle{
color:#666;
font-size:.9rem;
margin-bottom:20px;
}

.loading-bar{
width:100%;
height:8px;
background:#eee;
border-radius:10px;
overflow:hidden;
}

.loading-bar-progress{
height:100%;
background:linear-gradient(90deg,#ff0000,#cc0000);
animation:loadProgress 3.2s infinite;
}

@keyframes loadProgress{
0%{width:0}
50%{width:50%}
75%{width:75%}
100%{width:100%}
}


/* =========================================
   MOBILE
   ========================================= */

@media(max-width:992px){

.hero h1{
font-size:26px;
}

.center-box{
padding:15px;
}

.right-box{
width:140px;
min-width:140px;
}

.price{
font-size:1.5rem;
}

}


/* =========================================
   MOBILE SMALL
   ========================================= */

@media(max-width:768px){

.hero{
padding:40px 10px;
min-height:auto;
}

.hero h1{
font-size:22px;
}

.card-body{
padding:18px;
}

.preventivo-box{
flex-direction:column;
}

.days-box{
width:100%;
min-width:0;
flex:0 0 auto;
border-radius:12px 12px 0 0;
}

.days-box:after{
display:none;
}

.center-box{
padding:15px;
}

.right-box{
width:100%;
border-left:none;
border-top:1px solid #eee;
padding:15px;
}

.service-title-row{
gap:6px;
}

.service-title-left{
flex-basis:100%;
font-size:.98rem;
}

.service-title-right{
width:100%;
}

.btn-seleziona{
margin-top:15px;
}

.price{
font-size:1.6rem;
}

}

/* ================================
   HEADER LOGO
================================ */

/* HERO BACKGROUND */

.hero-main{
background-image:url('/spedizioni/assets/img/hero-rb-1980.jpg');
background-repeat:no-repeat;
background-position:center;
background-size:1920px auto;
min-height:100vh;
}

@media (min-width:1024px){

.hero-main{
background-size:1920px auto;
background-position:center top;
}

}

@media (max-width:1024px){

.hero-main{
background-size:1600px auto;
background-position:center top;
}

}

@media (max-width:768px){

.hero-main{ 
background-size:cover;
background-position:center;
}

}

/* DESKTOP */
.logo-redbay{
height:42px;
margin-left:40px;
}

/* MOBILE */
@media (max-width:768px){

#header{
padding-top:12px;
padding-bottom:12px;
}

.logo-redbay{
margin-left:10px;
margin-top:6px;
height:38px;
}

}

@media (max-width:768px){

#header .container-fluid{
padding-left:8px;
padding-right:8px;
}

}
/* =========================================
   EXTRA SMALL
   ========================================= */

@media(max-width:480px){

.hero h1{
font-size:20px;
}

.price{
font-size:1.4rem;
}

.btn-seleziona{
font-size:.9rem;
padding:10px;
}

}

/* Allineamento offerte: titolo a sinistra, riepilogo destro in tre livelli. */
body.quote-results .center-box .service-header,
body.quote-results .center-box .service-title,
body.quote-results .center-box .service-title-row,
body.quote-results .center-box .service-title-left{
text-align:left !important;
}

body.quote-results .center-box .service-title-row{
justify-content:flex-start;
}

body.quote-results .center-box .service-title-left{
justify-content:flex-start !important;
}

body.quote-results .preventivo-box{
align-items:stretch;
}

body.quote-results .right-box{
display:grid;
grid-template-rows:minmax(0,1fr) auto;
align-self:stretch;
align-items:center;
justify-content:initial;
justify-items:stretch;
}

body.quote-results .right-box-summary{
grid-row:1;
align-self:center;
justify-self:stretch;
text-align:center;
}

body.quote-results .right-box .btn-seleziona{
grid-row:2;
align-self:end;
justify-self:stretch;
margin:0;
}

@media(max-width:768px){
body.quote-results .right-box{
grid-template-rows:auto auto;
row-gap:15px;
}

body.quote-results .right-box-summary{
align-self:initial;
}

body.quote-results .right-box .btn-seleziona{
margin-top:0;
}
}

/* In modalità offerte il menu resta completo: le sezioni ancorate restano nella pagina, sotto le offerte. */

body.quote-results #quoteResultsTitle{
font-size:1.45rem;
font-weight:600;
line-height:1.25;
}

body.quote-results #quoteResultsTitle.quote-results-heading{
display:flex;
align-items:center;
justify-content:space-between;
gap:16px;
width:100%;
}

body.quote-results .quote-results-heading-label{
flex:1 1 auto;
min-width:0;
}

body.quote-results .quote-offer-count{
flex:0 0 auto;
margin-left:auto;
text-align:right;
white-space:nowrap;
}

@media(max-width:575.98px){
body.quote-results #quoteResultsTitle{
font-size:1.25rem;
}

body.quote-results #quoteResultsTitle.quote-results-heading{
gap:10px;
}

.offer-previous-summary{
align-items:center;
padding:10px 11px;
font-size:.84rem;
}
}
