/* CPNTR – fully scoped styles (won't touch theme or other plugins) */
.cpntr-wrap{
  --cpntr-bg:#ffffff;
  --cpntr-page:rgba(15,23,42,.02);
  --cpntr-border:rgba(15,23,42,.10);
  --cpntr-text:#0f172a;
  --cpntr-muted:rgba(15,23,42,.62);
  --cpntr-shadow:0 18px 45px rgba(2,6,23,.10);
  --cpntr-radius:20px;
  --cpntr-pad:20px;
  --cpntr-gap:12px;

  --cpntr-accent:rgba(59,130,246,1);
  --cpntr-accent-soft:rgba(59,130,246,.10);
  --cpntr-success-soft:rgba(16,185,129,.10);
  --cpntr-warn-soft:rgba(245,158,11,.16);
  --cpntr-info-soft:rgba(59,130,246,.14);

  font-family:inherit;
  color:var(--cpntr-text);

  /* Keep the outer container invisible so the card looks clean on any theme */
  display:flex;
  justify-content:center;
  padding:0;
  margin:16px auto;
  /* Give more breathing room on desktop while staying centered */
  max-width:1400px;
  background:transparent;
  border:0;
  border-radius:0;
}

.cpntr-card{
  /* Default a bit wider; admins can still control this in Settings */
  max-width:var(--cpntr-card-max, 1040px);
  /* In a flex parent we must explicitly stretch, otherwise the card can look too narrow */
  width:100%;
  flex:1 1 auto;
  background:var(--cpntr-bg);
  /* Cleaner look: no hard border, just soft shadow */
  border:0;
  border-radius:var(--cpntr-radius);
  box-shadow:var(--cpntr-shadow);
  padding:calc(var(--cpntr-pad) + 2px);
}

.cpntr-head{margin-bottom:14px;}
.cpntr-title{margin:0 0 6px 0;font-size:22px;line-height:1.15;letter-spacing:-0.02em;}
.cpntr-subtitle{margin:0;color:var(--cpntr-muted);font-size:14px;}

.cpntr-form{display:grid;gap:var(--cpntr-gap);}
.cpntr-field{display:grid;gap:6px;}
.cpntr-label{font-size:13px;color:var(--cpntr-muted);}

/* Progressive enhancement
   - Without JS: show simple <select> fields for route/time (always works)
   - With JS: hide selects and show premium tabs/time cards UI
*/
.cpntr-ui-enhanced{display:none;}
.cpntr-wrap.cpntr-enhanced .cpntr-ui-basic{display:none;}
.cpntr-wrap.cpntr-enhanced .cpntr-ui-enhanced{display:block;}

.cpntr-input{
  width:100%;
  padding:12px 12px;
  border:1px solid var(--cpntr-border);
  /* Force premium rounded corners even if the theme overrides input radius */
  border-radius:18px !important;
  font-size:15px;
  outline:none;
  background:var(--cpntr-page);
  color:var(--cpntr-text);
  transition:box-shadow .15s ease,border-color .15s ease,background .15s ease, transform .08s ease;
}

/* Make date inputs match text inputs across iOS/Safari/Chromium */
.cpntr-input[type="date"]{
  -webkit-appearance:none;
  appearance:none;
  padding-right:44px;
}

/* Ensure all native controls inside the widget share the same look */
.cpntr-wrap input.cpntr-input,
.cpntr-wrap select.cpntr-input,
.cpntr-wrap textarea.cpntr-input{
  border-width:1px !important;
  border-style:solid !important;
  border-color:var(--cpntr-border) !important;
  border-radius:18px !important;
}

.cpntr-input:focus{
  border-color:rgba(59,130,246,.45);
  box-shadow:0 0 0 4px rgba(59,130,246,.14);
  background:#fff;
}

.cpntr-textarea{resize:vertical;min-height:88px;}

.cpntr-phone{
  width: 100%;position:relative;}
/* Keep the flag inside the same input (no separate “cell”) */
.cpntr-phone__flag{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  font-size:18px;
  line-height:1;
  pointer-events:none;
  opacity:.95;
  z-index:2;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(15,23,42,.10);
  border-radius:999px;
}


.cpntr-phone__input{width:100%;}
.cpntr-phone__input{padding-left:72px !important; padding-inline-start:72px !important; box-sizing:border-box;}
.cpntr-help{margin-top:6px;color:var(--cpntr-muted);font-size:12px;}

.cpntr-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  padding:13px 14px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.10);
  cursor:pointer;
  font-size:15px;
  font-weight:800;
  background:linear-gradient(180deg,rgba(59,130,246,1),rgba(37,99,235,1));
  color:#fff;
  box-shadow:0 14px 35px rgba(37,99,235,.24);
}

.cpntr-btn:hover{filter:brightness(1.02);}
.cpntr-btn:active{transform:translateY(1px);}

.cpntr-alert{
  padding:12px 12px;
  border-radius:16px;
  margin-bottom:12px;
  border:1px solid var(--cpntr-border);
  color:var(--cpntr-text);
  font-size:14px;
}
.cpntr-alert--warn{background:var(--cpntr-warn-soft);}
.cpntr-alert--info{background:var(--cpntr-info-soft);}
.cpntr-link{font-weight:800;text-decoration:underline;}

.cpntr-resno{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background:rgba(255,255,255,.7);
  font-weight:900;
  font-size:12px;
  margin-left:8px;
}

.cpntr-resno{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-weight:900;
  border:1px solid rgba(15,23,42,.12);
  background:rgba(15,23,42,.03);
  margin-left:8px;
}

.cpntr-total{
  display:grid;
  gap:4px;
  padding:14px 14px;
  border-radius:18px;
  border:1px solid var(--cpntr-border);
  background:var(--cpntr-success-soft);
}
.cpntr-total__label{font-size:13px;color:var(--cpntr-muted);}
.cpntr-total__value{font-size:20px;font-weight:900;letter-spacing:-0.02em;}
.cpntr-total__meta{font-size:13px;color:var(--cpntr-muted);}

.cpntr-note-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:var(--cpntr-muted);
  font-size:12px;
}
.cpntr-counter{
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--cpntr-border);
  background:rgba(15,23,42,.03);
  font-weight:800;
}

.cpntr-section{display:grid;gap:8px;}
.cpntr-section__label{font-size:13px;color:var(--cpntr-muted);font-weight:700;}

.cpntr-tabs{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

@media (min-width: 520px){
  .cpntr-tabs{grid-template-columns:repeat(2, minmax(0, 1fr));}
}

.cpntr-tab{
  border:1px solid rgba(37,99,235,.55);
  background:linear-gradient(180deg, rgba(59,130,246,1), rgba(37,99,235,1));
  color:#fff;
  padding:14px 14px;
  border-radius:16px;
  cursor:pointer;
  font-size:14px;
  font-weight:900;
  transition:box-shadow .15s ease, border-color .15s ease, transform .08s ease, filter .15s ease, background .15s ease;
  box-shadow:0 10px 24px rgba(37,99,235,.20);
}

.cpntr-tab:hover{transform:translateY(-1px);filter:brightness(1.03);}
.cpntr-tab:active{background:linear-gradient(180deg, rgba(17,24,39,1), rgba(0,0,0,1));color:#fff;}
.cpntr-tab.is-active{
  border-color:rgba(0,0,0,.55);
  background:linear-gradient(180deg, rgba(17,24,39,1), rgba(0,0,0,1));
  color:#fff;
  box-shadow:0 0 0 4px rgba(0,0,0,.12), 0 14px 30px rgba(0,0,0,.18);
}

.cpntr-times{
  display:grid;
  gap:10px;
  padding:12px;
  border:1px solid var(--cpntr-border);
  border-radius:16px;
  background:rgba(15,23,42,.02);
}

.cpntr-times__hint{
  color:var(--cpntr-muted);
  font-size:13px;
}

.cpntr-timegrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
}

@media (min-width: 640px){
  .cpntr-timegrid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.cpntr-timecard{
  position:relative;
  border:1px solid rgba(37,99,235,.55);
  background:linear-gradient(180deg, rgba(59,130,246,1), rgba(29,78,216,1));
  color:#fff;
  padding:12px 12px;
  border-radius:16px;
  cursor:pointer;
  font-size:14px;
  font-weight:900;
  text-align:center;
  transition:transform .10s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease, background .18s ease;
  box-shadow: 0 10px 24px rgba(37,99,235,.20);
}

/* Soft pastel variety for time cards (professional, but not boring) */

.cpntr-timecard:hover{transform:translateY(-2px);filter:brightness(1.03);box-shadow:0 14px 30px rgba(37,99,235,.26);}
.cpntr-timecard:active{transform:translateY(-1px);background:linear-gradient(180deg, rgba(17,24,39,1), rgba(0,0,0,1));color:#fff;border-color:rgba(0,0,0,.55);box-shadow:0 16px 34px rgba(0,0,0,.18);}

.cpntr-timecard .cpntr-badge{
  display:none;
  position:absolute;
  top:10px;
  right:10px;
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.16);
  color:#fff;
  opacity:0;
  transform:translateY(-3px);
  transition:opacity .15s ease, transform .15s ease, background .15s ease, border-color .15s ease;
}


.cpntr-timecard.is-active{
  border-color:rgba(0,0,0,.55);
  background:linear-gradient(180deg, rgba(17,24,39,1), rgba(0,0,0,1));
  color:#fff;
  box-shadow:0 16px 34px rgba(0,0,0,.18);
}

.cpntr-timecard.is-active .cpntr-badge{
  opacity:1;
  transform:translateY(0);
  background:rgba(255,255,255,.18);
  border-color:rgba(255,255,255,.24);
  color:#fff;
}

.cpntr-selection{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  padding:10px 10px;
  border-radius:14px;
  border:1px dashed rgba(15,23,42,.18);
  background:rgba(15,23,42,.02);
  font-size:13px;
  color:rgba(15,23,42,.70);
}
.cpntr-selection__label{font-weight:900;color:rgba(15,23,42,.70);}
.cpntr-selection__value{font-weight:900;color:rgba(15,23,42,.90);}

.cpntr-hp{position:absolute!important;left:-9999px!important;top:-9999px!important;}


/* WhatsApp confirmation actions */
.cpntr-wa-note{
  margin-top:8px;
  font-size:13px;
  opacity:.9;
}
.cpntr-wa-actions{
  margin-top:10px;
  display:grid;
  gap:10px;
}
.cpntr-btn--ghost{
  background:#fff;
  color:var(--cpntr-text);
  border:1px solid rgba(15,23,42,.14);
  box-shadow:none;
}
.cpntr-btn--ghost:hover{filter:brightness(0.99);}

/* --- Name + Phone on one row (desktop), stacked on mobile --- */
.cpntr-row.cpntr-row--name-phone{
  display:flex;
  gap:14px;
  align-items:flex-start;
}
.cpntr-row--name-phone .cpntr-field--name{flex:0 0 70%;}
.cpntr-row--name-phone .cpntr-field--phone{flex:0 0 30%;}
@media (max-width: 640px){
  .cpntr-row.cpntr-row--name-phone{flex-direction:column;}
  .cpntr-row--name-phone .cpntr-field--name,
  .cpntr-row--name-phone .cpntr-field--phone{flex:1 1 auto;}
}



/* Address fields: keep them compact (2 lines) */
.cpntr-wrap #cpntr_pickup.cpntr-textarea,
.cpntr-wrap #cpntr_dropoff.cpntr-textarea{
  min-height:56px;
}

/* Mobile: ensure Full Name + Phone inputs are truly full width */
.cpntr-row--name-phone .cpntr-field{width:100%;}
