/* ========== Custom Buy Now for Vehica – CSS ========== */
/* Poți ajusta ușor culorile de aici */
:root{
  --cbn-accent: #1f64ff;
  --cbn-accent-hover: #1557e6;
  --cbn-text: #0f172a;
  --cbn-muted: #6b7280;
  --cbn-border: #e5e7eb;
  --cbn-bg: #ffffff;
  --cbn-input-bg: #f7f8fa;
  --cbn-overlay: rgba(0,0,0,.6);
  --cbn-shadow: 0 20px 50px rgba(0,0,0,.25);
}

/* Overlay */
.cbn-v-modal{
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--cbn-overlay);
  display: none;
}
.cbn-v-modal.is-open{ display:block; }

/* Dialog */
.cbn-v-dialog{
  position: relative;
  width: min(920px, 96vw);
  margin: 40px auto;
  background: var(--cbn-bg);
  border-radius: 10px;
  box-shadow: var(--cbn-shadow);
  padding: 35px;
}

/* Close button */
.cbn-v-close{
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: #f1f2f4;
  color: #333;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.cbn-v-close:hover{ background:#e7e8eb; }

/* Header + Title + Price */
.cbn-v-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.cbn-v-title{
  font-size: 32px;
  line-height: 1.25;
  font-weight: 800;
  margin: 4px 52px 12px 0;
  color: var(--cbn-text);
}
.cbn-v-price{
  font-weight: 700;
  color: #111;
  margin-top: 8px;
  white-space: nowrap;
}
.cbn-v-price span{
  color: var(--cbn-muted);
  font-weight: 600;
  margin-right: 6px;
}

/* Top: thumb + info */
.cbn-v-top{
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0 16px;
}
.cbn-v-thumb{
  width: 150px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  background: #f3f4f6;
}

/* Form */
.cbn-v-label{
  display: block;
  font-weight: 600;
  color: #4b5563;
  margin: 10px 0 6px;
}
.cbn-v-input{
  width: 100%;
  height: 48px;
  border-radius: 6px;
  border: 1px solid var(--cbn-border);
  background: var(--cbn-input-bg);
  padding: 10px 12px;
  font-size: 15px;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.cbn-v-input:focus{
  outline: none;
  border-color: #c7cbd2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(31,100,255,.12);
}

/* Grid */
.cbn-v-row{ display:flex; gap:14px; }
.cbn-v-col{ flex:1 1 0; }

/* Actions */
.cbn-v-actions{
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}
.cbn-v-pay{
  background: var(--cbn-accent);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  border: 0;
  border-radius: 8px;
  padding: 12px 30px;
  letter-spacing: .5px;
  cursor: pointer;
  transition: background .15s, transform .02s;
}
.cbn-v-pay:hover{ background: var(--cbn-accent-hover); }
.cbn-v-pay:active{ transform: translateY(1px); }
.cbn-v-pay:disabled{
  opacity: .6;
  cursor: not-allowed;
}

/* Trigger button (pe pagină) */
.cbn-v-btn-trigger{
  display: inline-block;
  background: var(--cbn-accent);
  color: #fff;
  border: 0;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, transform .02s;
}
.cbn-v-btn-trigger:hover{ background: var(--cbn-accent-hover); }
.cbn-v-btn-trigger:active{ transform: translateY(1px); }

/* Responsive */
@media (max-width: 640px){
  .cbn-v-top{ flex-wrap: wrap; }
  .cbn-v-title{ font-size: 26px; margin-right: 40px; }
  .cbn-v-dialog{ padding: 22px; }
  .cbn-v-row{ flex-direction: column; gap: 0; }
}

/* Confirmation block (on /buy-now-confirmation/ with [cbn_confirmation]) */
.cbn-confirmation-container{
  padding: 20px;
  border: 1px solid var(--cbn-border);
  border-radius: 8px;
  background: #fff;
}
.cbn-confirmation-container h2{
  margin-top: 0;
  font-size: 26px;
  line-height: 1.25;
}
.cbn-confirmation-container h3{
  margin-bottom: 8px;
  margin-top: 18px;
  font-size: 18px;
  color: var(--cbn-text);
}
.cbn-confirmation-container p{ margin: 4px 0; }
/* Buy Now – stil ca „Send message” */
.cbn-v-btn-trigger{
  display:block !important;
  width:100% !important;
  text-align:center !important;

  background:#1E7DDF !important;  /* portocaliu */
  color:#fff !important;
  border:0 !important;

  padding:18px 24px !important;
  font-size:20px !important;
  font-weight:700 !important;
  line-height:1.2 !important;

  border-radius:12px !important;
  box-shadow:none !important;
  cursor:pointer !important;

  transition:background .2s ease, transform .05s ease !important;
  text-decoration:none !important;
}
.cbn-v-btn-trigger:hover{ background:#ea6c05 !important; }
.cbn-v-btn-trigger:active{ transform:translateY(1px) !important; }
.cbn-v-btn-trigger:focus{
  outline:none !important;
  box-shadow:0 0 0 3px rgba(249,122,18,.35) !important;
}
/* === Fix 1: peste TOT și centrat perfect === */
.cbn-v-modal{
  position: fixed;
  inset: 0;
  /* z-index mare ca să bată orice header/sticky/elementor */
  z-index: 2147483647 !important;
  background: var(--cbn-overlay);
  /* facem centrare pe ambele axe */
  display: none;                /* implicit ascuns */
  align-items: center;          /* centru vertical */
  justify-content: center;      /* centru orizontal */
  /* pentru ecrane mici, permitem scroll în overlay */
  overflow: auto;
  padding: 24px;                /* spațiu față de margini pe mobil */
}
.cbn-v-modal.is-open{
  display: flex !important;     /* înlocuiește display:block; */
}

/* === Fix 2: dialog fără margin-top, cu înălțime maximă și scroll intern === */
.cbn-v-dialog{
  margin: 0 !important;         /* anulăm cei 40px top */
  width: min(920px, 96vw);
  max-height: calc(100dvh - 48px);  /* nu depășește viewportul */
  overflow: auto;               /* scroll în interior dacă e mult conținut */
  border-radius: 12px;
  box-shadow: var(--cbn-shadow);
  background: var(--cbn-bg);
  padding: 35px;
}

/* (opțional) Blochează scroll-ul paginii când e deschis modalul */
body.cbn-lock { overflow: hidden; }

/* (opțional) asigură că butonul close rămâne deasupra în dialog */
.cbn-v-close { z-index: 1; }
/* Overlay centrat + peste tot */
.cbn-v-modal{
  position: fixed;
  inset: 0;
  z-index: 2147483647 !important;
  background: var(--cbn-overlay);
  display: none;                /* implicit */
  align-items: center;          /* centru vertical */
  justify-content: center;      /* centru orizontal */
  overflow: auto;               /* scroll pe mobil */
  padding: 24px;                /* respiră pe margini */
}
.cbn-v-modal.is-open{ display: flex !important; } /* <— FLEX, nu block */

/* Dialog fără margin-top, cu max-height și scroll intern */
.cbn-v-dialog{
  margin: 0 !important;
  width: min(920px, 96vw);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border-radius: 12px;
  box-shadow: var(--cbn-shadow);
  background: var(--cbn-bg);
  padding: 35px;
}

/* Oprește scroll-ul paginii când modalul e deschis (vezi JS) */
body.cbn-lock { overflow: hidden; }
