/* ATLAS MAP Checkout 1.2.1 — Design System v2 */

body{
  --atlas-navy:#223A5E;
  --atlas-navy-dark:#1A2F4D;
  --atlas-cyan:#0891B2;
  --atlas-green:#47C27A;
  --atlas-orange:#F59E0B;
  --atlas-text:#1F2A37;
  --atlas-muted:#64748B;
  --atlas-border:#E2E8F0;
  --atlas-bg:#F8FAFC;
}

body.page,
body.pmpro-checkout,
body[class*="pmpro"]{
  background:var(--atlas-bg);
}

body .site-main,
body main,
body .entry-content{
  font-family:'Montserrat',system-ui,sans-serif;
  color:var(--atlas-text);
}

body h1.entry-title,
body .entry-title{
  color:var(--atlas-navy)!important;
  font-family:'Montserrat',system-ui,sans-serif!important;
  font-weight:700!important;
  font-size:clamp(30px,4vw,48px)!important;
  line-height:1.15!important;
  margin-bottom:28px!important;
}

#pmpro_form,
.pmpro_form,
.pmpro{
  font-family:'Montserrat',system-ui,sans-serif!important;
  color:var(--atlas-text)!important;
}

#pmpro_form .pmpro_card,
#pmpro_form .pmpro_checkout,
.pmpro .pmpro_card,
.pmpro .pmpro_checkout,
.pmpro_form .pmpro_card,
.pmpro_form fieldset,
#pmpro_form fieldset{
  background:#fff!important;
  border:1px solid var(--atlas-border)!important;
  border-radius:18px!important;
  box-shadow:0 10px 30px rgba(34,58,94,.06)!important;
  padding:28px!important;
  margin-bottom:20px!important;
}

#pmpro_form h2,
#pmpro_form h3,
#pmpro_form legend,
.pmpro h2,
.pmpro h3,
.pmpro legend{
  color:var(--atlas-navy)!important;
  font-family:'Montserrat',system-ui,sans-serif!important;
  font-weight:700!important;
}

#pmpro_form p,
.pmpro p{
  color:var(--atlas-text);
  line-height:1.7;
}

#pmpro_form label,
.pmpro label{
  color:var(--atlas-text)!important;
  font-family:'Montserrat',system-ui,sans-serif!important;
  font-weight:600!important;
}

#pmpro_form input[type="text"],
#pmpro_form input[type="email"],
#pmpro_form input[type="password"],
#pmpro_form input[type="tel"],
#pmpro_form select,
.pmpro input[type="text"],
.pmpro input[type="email"],
.pmpro input[type="password"],
.pmpro input[type="tel"],
.pmpro select{
  width:100%;
  min-height:48px;
  background:#fff!important;
  border:1px solid var(--atlas-border)!important;
  border-radius:10px!important;
  padding:11px 14px!important;
  color:var(--atlas-text)!important;
  font-family:'Montserrat',system-ui,sans-serif!important;
  font-size:14px!important;
  box-shadow:none!important;
  outline:none!important;
}

#pmpro_form input:focus,
#pmpro_form select:focus,
.pmpro input:focus,
.pmpro select:focus{
  border-color:var(--atlas-cyan)!important;
  box-shadow:0 0 0 3px rgba(8,145,178,.10)!important;
}

#pmpro_form a,
.pmpro a{
  color:var(--atlas-cyan)!important;
  text-decoration:none!important;
  font-weight:600;
}

#pmpro_form a:hover,
.pmpro a:hover{
  color:var(--atlas-navy)!important;
}

#pmpro_form input[type="submit"],
#pmpro_form button[type="submit"],
.pmpro input[type="submit"],
.pmpro button[type="submit"],
.atlasmap-checkout-cta{
  width:100%!important;
  min-height:52px!important;
  border:0!important;
  border-radius:10px!important;
  background:var(--atlas-navy)!important;
  color:#fff!important;
  font-family:'Montserrat',system-ui,sans-serif!important;
  font-size:14px!important;
  font-weight:700!important;
  box-shadow:none!important;
  transition:.2s ease!important;
  cursor:pointer!important;
}

#pmpro_form input[type="submit"]:hover,
#pmpro_form button[type="submit"]:hover,
.pmpro input[type="submit"]:hover,
.pmpro button[type="submit"]:hover,
.atlasmap-checkout-cta:hover{
  background:var(--atlas-navy-dark)!important;
  color:#fff!important;
  transform:translateY(-1px)!important;
}

.atlasmap-checkout-trust{
  margin:24px 0 18px;
  padding:18px 20px;
  background:#EDF5F0;
  border:1px solid #B8D8C2;
  border-radius:16px;
  color:#1F2A24;
}

.atlasmap-checkout-trust__title{
  margin-bottom:10px;
  font-size:14px;
  font-weight:700;
  color:#102018;
}

.atlasmap-checkout-trust__items{
  display:flex;
  gap:8px 18px;
  flex-wrap:wrap;
  font-size:12px;
  line-height:1.5;
  color:#356247;
}

.atlasmap-checkout-trust__items span{
  position:relative;
  padding-left:18px;
}

.atlasmap-checkout-trust__items span:before{
  content:'✓';
  position:absolute;
  left:0;
  top:0;
  color:var(--atlas-green);
  font-weight:800;
}

.pmpro_message,
.pmpro_alert{
  border-radius:16px!important;
  padding:16px 18px!important;
  border:1px solid var(--atlas-border)!important;
}

.pmpro_message.pmpro_success,
.pmpro_alert.pmpro_success{
  background:#EDF5F0!important;
  border-color:#B8D8C2!important;
  color:#287A49!important;
}

.pmpro_message.pmpro_error,
.pmpro_alert.pmpro_error{
  background:#FFF7ED!important;
  border-color:#F5D0A6!important;
  color:#7A4B1D!important;
}

#pmpro_form input[type="checkbox"],
#pmpro_form input[type="radio"],
.pmpro input[type="checkbox"],
.pmpro input[type="radio"]{
  accent-color:var(--atlas-navy);
}

body #pmpro_form button:hover,
body #pmpro_form input[type="submit"]:hover,
body .pmpro button:hover,
body .pmpro input[type="submit"]:hover{
  background-color:var(--atlas-navy-dark)!important;
  color:#fff!important;
  border-color:var(--atlas-navy-dark)!important;
}

@media(max-width:768px){
  #pmpro_form .pmpro_card,
  #pmpro_form .pmpro_checkout,
  .pmpro .pmpro_card,
  .pmpro .pmpro_checkout,
  .pmpro_form fieldset,
  #pmpro_form fieldset{
    padding:20px!important;
    border-radius:14px!important;
  }

  .atlasmap-checkout-trust__items{
    flex-direction:column;
    gap:7px;
  }
}


/* ══ V1.1 — Più identità ATLAS MAP, senza sovraccaricare ══ */

.atlasmap-checkout-plan-card{
  position:relative!important;
  overflow:hidden!important;
  border-top:4px solid var(--atlas-navy)!important;
  background:
    linear-gradient(180deg, rgba(8,145,178,.035), rgba(255,255,255,0) 44%)!important;
}
.atlasmap-checkout-plan-card:after{
  content:'';
  position:absolute;
  top:0;right:0;
  width:96px;height:4px;
  background:var(--atlas-orange);
}

.atlasmap-plan-line{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin:10px 0 8px;
}
.atlasmap-plan-kicker{
  display:inline-block;
  width:max-content;
  padding:5px 8px;
  border-radius:6px;
  background:#E8F7FB;
  color:var(--atlas-cyan);
  font-size:10px;
  line-height:1;
  font-weight:800;
  letter-spacing:.08em;
}
.atlasmap-plan-line strong{
  color:var(--atlas-navy)!important;
  font-size:18px;
  font-weight:700;
}

.atlasmap-price-line{
  display:flex;
  flex-direction:column;
  gap:7px;
  margin-top:10px;
  padding:14px 16px;
  border-left:4px solid var(--atlas-orange);
  background:#FFF7ED;
  border-radius:10px;
}
.atlasmap-price-main{
  color:var(--atlas-navy);
  font-size:20px;
  font-weight:800;
}
.atlasmap-price-note{
  color:#7A4B1D;
  font-size:12px;
  line-height:1.5;
}

/* Account card con leggero accento cyan */
#pmpro_form .pmpro_card:has(h2),
.pmpro .pmpro_card:has(h2){
  transition:border-color .2s ease, box-shadow .2s ease;
}
#pmpro_form .pmpro_card:focus-within,
.pmpro .pmpro_card:focus-within{
  border-color:#B7DCE5!important;
  box-shadow:0 12px 32px rgba(8,145,178,.08)!important;
}

/* Appiattisce le card annidate */
.atlasmap-checkout-inner-flat{
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  margin:0!important;
  background:transparent!important;
  border-radius:0!important;
}

/* Trust box più visivo */
.atlasmap-checkout-trust{
  display:flex;
  align-items:flex-start;
  gap:14px;
  border-left:4px solid var(--atlas-green)!important;
}
.atlasmap-checkout-trust__icon{
  width:24px;
  height:24px;
  min-width:24px;
  border-radius:6px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--atlas-green);
  color:#fff;
  font-weight:800;
  font-size:13px;
}

/* Piccoli accenti sui titoli dei blocchi */
#pmpro_form h2,
#pmpro_form h3,
.pmpro h2,
.pmpro h3{
  position:relative;
}
#pmpro_form h2:after,
#pmpro_form h3:after,
.pmpro h2:after,
.pmpro h3:after{
  content:'';
  display:block;
  width:38px;
  height:3px;
  margin-top:10px;
  border-radius:999px;
  background:var(--atlas-cyan);
}

/* CTA più riconoscibile */
.atlasmap-checkout-cta,
#pmpro_form input[type="submit"],
#pmpro_form button[type="submit"]{
  box-shadow:0 8px 18px rgba(34,58,94,.14)!important;
}

/* Etichette obbligatorie arancio invece del rosa del tema */
#pmpro_form abbr.required,
#pmpro_form .pmpro_asterisk,
.pmpro .pmpro_asterisk{
  color:var(--atlas-orange)!important;
}

/* Responsive */
@media(max-width:768px){
  .atlasmap-price-main{font-size:18px;}
  .atlasmap-checkout-trust{align-items:flex-start;}
}


/* ══ V1.2 — Membership Confirmation / Receipt ══ */

.atlasmap-confirmation-success{
  display:flex;
  align-items:center;
  gap:14px;
  max-width:100%;
  margin:0 0 24px;
  padding:18px 20px;
  background:#EDF5F0;
  border:1px solid #B8D8C2;
  border-left:4px solid var(--atlas-green);
  border-radius:16px;
}
.atlasmap-confirmation-success__icon{
  width:30px;
  height:30px;
  min-width:30px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--atlas-green);
  color:#fff;
  font-weight:800;
}
.atlasmap-confirmation-success strong{
  display:block;
  color:#102018;
  font-size:15px;
}
.atlasmap-confirmation-success span{
  display:block;
  margin-top:2px;
  color:#356247;
  font-size:12px;
}

body .pmpro_confirmation_wrap,
body .pmpro_confirmation,
body .pmpro_invoice_wrap,
body .pmpro_invoice{
  font-family:'Montserrat',system-ui,sans-serif!important;
  color:var(--atlas-text)!important;
}

body .pmpro_confirmation_wrap > .pmpro_card,
body .pmpro_confirmation .pmpro_card,
body .pmpro_invoice_wrap > .pmpro_card,
body .pmpro_invoice .pmpro_card{
  border:1px solid var(--atlas-border)!important;
  border-radius:18px!important;
  overflow:hidden!important;
  box-shadow:0 10px 30px rgba(34,58,94,.06)!important;
  background:#fff!important;
}

body .pmpro_confirmation_wrap h2,
body .pmpro_confirmation_wrap h3,
body .pmpro_confirmation h2,
body .pmpro_confirmation h3,
body .pmpro_invoice_wrap h2,
body .pmpro_invoice_wrap h3{
  color:var(--atlas-navy)!important;
  font-family:'Montserrat',system-ui,sans-serif!important;
  font-weight:700!important;
}

body .pmpro_confirmation_wrap table,
body .pmpro_confirmation table,
body .pmpro_invoice_wrap table,
body .pmpro_invoice table{
  width:100%!important;
  border-collapse:collapse!important;
}

body .pmpro_confirmation_wrap th,
body .pmpro_confirmation_wrap td,
body .pmpro_confirmation th,
body .pmpro_confirmation td,
body .pmpro_invoice_wrap th,
body .pmpro_invoice_wrap td{
  border-color:var(--atlas-border)!important;
  color:var(--atlas-text)!important;
}

body .pmpro_confirmation_wrap th,
body .pmpro_confirmation th,
body .pmpro_invoice_wrap th{
  color:var(--atlas-navy)!important;
  font-weight:700!important;
}

body .pmpro_confirmation_wrap .pmpro_tag-success,
body .pmpro_confirmation .pmpro_tag-success,
body .pmpro_invoice_wrap .pmpro_tag-success{
  background:#DFF4E7!important;
  color:#287A49!important;
  border:1px solid #B8D8C2!important;
  border-radius:8px!important;
}

.atlasmap-confirmation-account-btn,
.atlasmap-confirmation-account-btn:visited{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  padding:12px 18px!important;
  border-radius:10px!important;
  background:var(--atlas-navy)!important;
  color:#fff!important;
  text-decoration:none!important;
  font-weight:700!important;
}
.atlasmap-confirmation-account-btn:hover{
  background:var(--atlas-navy-dark)!important;
  color:#fff!important;
}

/* Links receipt */
body .pmpro_confirmation_wrap a,
body .pmpro_confirmation a,
body .pmpro_invoice_wrap a{
  color:var(--atlas-cyan)!important;
  text-decoration:none!important;
  font-weight:600!important;
}
body .pmpro_confirmation_wrap a:hover,
body .pmpro_confirmation a:hover,
body .pmpro_invoice_wrap a:hover{
  color:var(--atlas-navy)!important;
}

/* Error string in checkout */
.pmpro_error,
.pmpro_message.pmpro_error,
.pmpro_alert.pmpro_error{
  font-family:'Montserrat',system-ui,sans-serif!important;
}

/* Prevent old theme pink on confirmation */
body .pmpro_confirmation_wrap a:hover,
body .pmpro_confirmation a:hover,
body .pmpro_invoice_wrap a:hover{
  color:var(--atlas-navy)!important;
}

@media(max-width:768px){
  .atlasmap-confirmation-success{
    align-items:flex-start;
  }
}


/* ══ V1.2.1 — CTA full width + validation polish ══ */

/* Allinea trust box e CTA alla larghezza utile del checkout */
#pmpro_form .atlasmap-checkout-trust,
.pmpro_form .atlasmap-checkout-trust,
.pmpro .atlasmap-checkout-trust{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}

#pmpro_form .atlasmap-checkout-cta,
#pmpro_form input[type="submit"].atlasmap-checkout-cta,
#pmpro_form button[type="submit"].atlasmap-checkout-cta,
.pmpro_form .atlasmap-checkout-cta,
.pmpro .atlasmap-checkout-cta{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}

/* Se PMPro racchiude il fondo del form in un contenitore stretto,
   il contenitore stesso prende tutta la larghezza disponibile */
#pmpro_form .pmpro_form_submit,
#pmpro_form .pmpro_submit,
.pmpro_form .pmpro_form_submit,
.pmpro_form .pmpro_submit{
  width:100%!important;
  max-width:none!important;
}

/* Errori: leggibili, eleganti e coerenti con ATLAS MAP */
#pmpro_form .pmpro_error,
#pmpro_form .pmpro_message.pmpro_error,
#pmpro_form .pmpro_alert.pmpro_error,
.pmpro .pmpro_error,
.pmpro .pmpro_message.pmpro_error,
.pmpro .pmpro_alert.pmpro_error{
  position:relative;
  width:100%!important;
  max-width:none!important;
  margin:0 0 22px!important;
  padding:17px 20px 17px 52px!important;
  border:1px solid #F5C98E!important;
  border-left:4px solid var(--atlas-orange)!important;
  border-radius:14px!important;
  background:#FFF8EF!important;
  color:#7A4B1D!important;
  box-shadow:0 6px 18px rgba(245,158,11,.06)!important;
  font-size:14px!important;
  line-height:1.55!important;
}

#pmpro_form .pmpro_error:before,
#pmpro_form .pmpro_message.pmpro_error:before,
#pmpro_form .pmpro_alert.pmpro_error:before,
.pmpro .pmpro_error:before,
.pmpro .pmpro_message.pmpro_error:before,
.pmpro .pmpro_alert.pmpro_error:before{
  content:'!';
  position:absolute;
  left:18px;
  top:50%;
  transform:translateY(-50%);
  width:22px;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:6px;
  background:var(--atlas-orange);
  color:#fff;
  font-weight:800;
  font-size:13px;
}

/* Il blocco Stripe resta arioso anche a piena larghezza */
.atlasmap-checkout-trust{
  min-height:82px;
  padding:18px 22px!important;
}

@media(max-width:768px){
  #pmpro_form .pmpro_error,
  #pmpro_form .pmpro_message.pmpro_error,
  #pmpro_form .pmpro_alert.pmpro_error,
  .pmpro .pmpro_error,
  .pmpro .pmpro_message.pmpro_error,
  .pmpro .pmpro_alert.pmpro_error{
    padding:15px 16px 15px 46px!important;
    border-radius:12px!important;
  }

  .atlasmap-checkout-trust{
    padding:16px 18px!important;
  }
}
