/* public/css/public-shipping-calculator.css */

/* HERO */
.psc-hero{
  background: linear-gradient(180deg, rgba(31,120,200,.10), rgba(255,255,255,1));
  padding: 44px 0 26px;
}

.psc-hero-inner{ display:flex; flex-direction:column; gap: 14px; }

.psc-title{
  margin: 0;
  font-size: 56px;
  line-height: 1.03;
  letter-spacing: -0.02em;
  color:#1e2a33;
}

.psc-lead{
  margin: 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.psc-hero-actions{ display:flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

.psc-hero-btn{
  padding: 16px 22px;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(45,179,106,.18);
}

/* CALCULATOR SECTION */
.psc-wrap{ padding: 28px 0 48px; background:#fff; }

.psc-card{
  border:1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(0,0,0,.06);
  background:#fff;
  padding: 20px;
}

.psc-head{ display:flex; gap: 12px; align-items:flex-start; margin-bottom: 16px; }

.psc-icon{
  width: 46px; height: 46px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  background: rgba(31,120,200,.10);
  border: 1px solid rgba(31,120,200,.18);
  flex: 0 0 auto;
}

.psc-h1{ font-weight: 900; color:#0b3550; font-size: 20px; }

.psc-sub{
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.45;
}

.psc-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 12px;
}

.psc-field{ display:flex; flex-direction:column; gap: 8px; min-width: 0; }

.psc-label{ font-weight: 900; color:#0b3550; font-size: 13px; }

.psc-input{
  width:100%;
  border: 1px solid rgba(20,40,60,.14);
  border-radius: 16px;
  padding: 14px 14px;
  font-weight: 800;
  outline: none;
  background:#fff;
}

.psc-input:focus{
  box-shadow: 0 0 0 3px rgba(31,120,200,.14);
  border-color: rgba(31,120,200,.35);
}

.psc-actions{
  grid-column: 1 / -1;
  display:flex;
  align-items:center;
  gap: 12px;
  margin-top: 6px;
}

.psc-btn{ padding: 14px 18px; border-radius: 18px; }

.psc-msg{
  font-weight: 800;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.psc-msg.is-error{ color: #b42318; }
.psc-msg.is-ok{ color: #067647; }

/* RESULTS */
.psc-results{
  margin-top: 18px;
  border:1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  padding: 16px;
}

.psc-results-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.psc-results-title{ font-weight: 900; color:#0b3550; }

.psc-results-meta{
  color: var(--muted);
  font-weight: 800;
  font-size: 12.5px;
}

.psc-rate-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px;
}

/* ✅ Logged-in style-ish cards */
.psc-rate-card{
  border:1px solid rgba(20,40,60,.10);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}

.psc-rate-card.is-best{
  border-color: rgba(45,179,106,.45);
  box-shadow: 0 14px 30px rgba(45,179,106,.14);
}

.psc-card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}

.psc-carrier-left{
  display:flex;
  gap: 12px;
  align-items:center;
}

.psc-badge{
  width: 44px; height: 44px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  font-weight: 900;
  color:#0b3550;
  background: rgba(31,120,200,.10);
  border: 1px solid rgba(31,120,200,.18);
}

.psc-carrier-name{
  font-weight: 900;
  color:#0b3550;
  font-size: 16px;
}

.psc-carrier-sub{
  margin-top: 2px;
  color: rgba(30,42,51,.65);
  font-weight: 800;
  font-size: 13px;
}

.psc-price{
  font-weight: 900;
  font-size: 22px;
  color:#0b3550;
  white-space: nowrap;
}

.psc-divider{
  height:1px;
  background: rgba(20,40,60,.08);
  margin: 12px 0;
}

.psc-notes-title{
  font-weight: 900;
  color:#0b3550;
  font-size: 16px;
  margin-bottom: 8px;
}

.psc-notes-list{
  margin:0;
  padding-left: 18px;
  color: rgba(30,42,51,.78);
  font-weight: 700;
  line-height: 1.55;
  font-size: 14px;
}

.psc-footnote{
  margin-top: 12px;
  color: rgba(30,42,51,.78);
  font-weight: 600;
  line-height: 1.55;
}

.psc-chips{
  display:flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.psc-chip{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20,40,60,.04);
  border: 1px solid rgba(20,40,60,.10);
  color: rgba(30,42,51,.85);
  font-weight: 900;
  font-size: 12px;
}

.psc-note{
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
}

/* RESPONSIVE */
@media (max-width: 1024px){
  .psc-title{ font-size: 46px; }
  .psc-lead{ font-size: 18px; }
  .psc-grid{ grid-template-columns: 1fr 1fr; }
  .psc-rate-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 760px){
  .psc-hero{ padding: 26px 0 18px; }
  .psc-title{ font-size: 44px; }
  .psc-lead{ font-size: 17px; }
  .psc-hero-btn{ width:100%; justify-content:center; }

  .psc-grid{ grid-template-columns: 1fr; gap: 14px; }
  .psc-card{ padding: 16px; border-radius: 20px; }

  .psc-actions{ flex-direction: column; align-items: stretch; gap: 10px; }
  .psc-btn{ width:100%; justify-content:center; }
  .psc-msg{ min-height: 18px; }
  .psc-results{ border-radius: 20px; }
}

/* =========================================================
   iOS sticky/backdrop compositing fix (keeps old issue away)
   ========================================================= */
@supports (-webkit-touch-callout: none) {
  .header{
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    position: relative !important;
  }
}

/* =========================================================
   Custom Select (seamless + same width)
   ========================================================= */

/* Hide native selects but keep in DOM */
select[data-custom-select]{
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.cs-wrap{ position: relative; }

.cs-btn{
  width:100%;
  border: 1px solid rgba(20,40,60,.14);
  border-radius: 16px;
  padding: 14px 14px;
  font-weight: 800;
  outline: none;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
}

.cs-wrap.is-open .cs-btn{
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.cs-btn:focus{
  box-shadow: 0 0 0 3px rgba(31,120,200,.14);
  border-color: rgba(31,120,200,.35);
}

.cs-caret{
  flex:0 0 auto;
  width: 10px;
  height: 10px;
  border-right:2px solid rgba(11,53,80,.65);
  border-bottom:2px solid rgba(11,53,80,.65);
  transform: rotate(45deg);
  margin-left: 8px;
}

/* Dropdown menu (body portal) */
.cs-menu{
  position: fixed;
  z-index: 9999;
  background:#fff;
  border:1px solid rgba(20,40,60,.12);
  border-top: 0;                 /* ✅ seamless attach */
  border-radius: 0 0 16px 16px;  /* ✅ connected corners */
  box-shadow: 0 18px 50px rgba(0,0,0,.12);
  overflow:hidden;
}

.cs-search{
  padding: 10px;
  border-bottom: 1px solid rgba(20,40,60,.08);
  background: rgba(20,40,60,.02);
}

.cs-search-input{
  width:100%;
  box-sizing:border-box;
  border: 1px solid rgba(20,40,60,.14);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  outline:none;
  background:#fff;
}

.cs-search-input:focus{
  box-shadow: 0 0 0 3px rgba(31,120,200,.12);
  border-color: rgba(31,120,200,.35);
}

.cs-list{
  padding: 6px;
  max-height: 280px;
  overflow:auto;
}

.cs-opt{
  width:100%;
  text-align:left;
  border:0;
  background:transparent;
  padding: 12px 12px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 800;
  color:#0b3550;
}

.cs-opt:hover{ background: rgba(20,40,60,.06); }

.cs-opt[aria-selected="true"]{
  background: rgba(31,120,200,.10);
  border: 1px solid rgba(31,120,200,.18);
}

.cs-empty{
  padding: 12px;
  font-weight: 800;
  color: rgba(30,42,51,.65);
}

/* =========================================================
   Extra sections (Steps / FAQ / Footer)
   ========================================================= */

.psc-section{
  padding: 54px 0;
  background:#fff;
}

.psc-section--alt{
  background: linear-gradient(180deg, rgba(31,120,200,.06), rgba(255,255,255,1));
}

.psc-section-head{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-bottom: 18px;
}

.psc-section-title{
  margin:0;
  font-size: 34px;
  letter-spacing: -0.02em;
  color:#0b3550;
  font-weight: 900;
}

.psc-section-lead{
  margin:0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
  max-width: 760px;
}

/* Steps */
.psc-steps-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.psc-step{
  border:1px solid rgba(20,40,60,.10);
  border-radius: 20px;
  background:#fff;
  padding: 16px;
  box-shadow: 0 14px 34px rgba(0,0,0,.06);
}

.psc-step-badge{
  display:inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(31,120,200,.10);
  border: 1px solid rgba(31,120,200,.18);
  color:#0b3550;
  font-weight: 900;
  font-size: 12px;
  margin-bottom: 10px;
}

.psc-step-title{
  margin: 0 0 6px;
  font-weight: 900;
  color:#0b3550;
  font-size: 18px;
}

.psc-step-text{
  margin:0 0 12px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
}

.psc-step-link{
  font-weight: 900;
  color: var(--blue, #1f78c8);
  text-decoration: none;
}
.psc-step-link:hover{ text-decoration: underline; }

/* FAQ */
.psc-faq{
  margin-top: 18px;
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.psc-faq-item{
  border:1px solid rgba(20,40,60,.10);
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 28px rgba(0,0,0,.05);
  overflow:hidden;
}

.psc-faq-q{
  cursor:pointer;
  padding: 14px 14px;
  font-weight: 900;
  color:#0b3550;
  list-style:none;
}
.psc-faq-q::-webkit-details-marker{ display:none; }

.psc-faq-a{
  padding: 0 14px 14px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
}

.psc-section-cta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Footer */
.psc-footer{
  background: #0b3550;
  color: rgba(255,255,255,.92);
  padding: 46px 0 20px;
}

.psc-footer-grid{
  display:grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 18px;
  align-items:start;
}

.psc-footer-brand{
  display:flex;
  gap: 12px;
  align-items:flex-start;
}

.psc-footer-logo{
  width:44px;
  height:44px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  font-weight: 900;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
}

.psc-footer-name{
  font-weight: 900;
  font-size: 16px;
  margin-bottom: 4px;
}

.psc-footer-tagline{
  color: rgba(255,255,255,.75);
  font-weight: 700;
  line-height: 1.5;
  max-width: 360px;
}

.psc-footer-title{
  font-weight: 900;
  margin-bottom: 10px;
}

.psc-footer-link{
  display:block;
  color: rgba(255,255,255,.82);
  text-decoration:none;
  font-weight: 700;
  margin: 8px 0;
}
.psc-footer-link:hover{ text-decoration: underline; }

.psc-footer-bottom{
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.14);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  color: rgba(255,255,255,.75);
  font-weight: 700;
}

.psc-footer-bottom-links{
  display:flex;
  align-items:center;
  gap: 10px;
}

.psc-footer-mini{
  color: rgba(255,255,255,.78);
  text-decoration:none;
  font-weight: 800;
}
.psc-footer-mini:hover{ text-decoration: underline; }

.psc-footer-dot{
  opacity:.65;
}

/* Responsive */
@media (max-width: 1024px){
  .psc-steps-grid{ grid-template-columns: 1fr; }
  .psc-footer-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px){
  .psc-footer-grid{ grid-template-columns: 1fr; }
  .psc-footer-bottom{ flex-direction: column; align-items:flex-start; }
}

.psc-dim-tools{
  grid-column: 1 / -1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.psc-dim-toggle{
  border:0;
  background:transparent;
  padding:0;
  color:#1f78c8;
  font-weight:900;
  cursor:pointer;
  text-decoration: underline;
}

.psc-dim-help{
  color: var(--muted);
  font-weight:700;
  font-size:13px;
}

.psc-dim-panel{
  grid-column: 1 / -1;
  border:1px solid rgba(20,40,60,.10);
  border-radius:16px;
  background:rgba(20,40,60,.03);
  padding:14px;
}

.psc-dim-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
}

.psc-dim-note{
  margin-top:10px;
  color: var(--muted);
  font-size:13px;
  font-weight:700;
  line-height:1.5;
}

@media (max-width: 1024px){
  .psc-dim-grid{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px){
  .psc-dim-grid{
    grid-template-columns: 1fr;
  }

  .psc-dim-tools{
    flex-direction: column;
    align-items:flex-start;
  }
}