/* ── CertifyPro Booking Plugin – Front-end Styles ─────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&display=swap');

:root {
  --cpb-green:       #4a8c2a;
  --cpb-green-light: #6ab04c;
  --cpb-green-dark:  #2d5a18;
  --cpb-green-pale:  #eaf3de;
  --cpb-border:      #d4e6c3;
  --cpb-text:        #1a2210;
  --cpb-muted:       #6b7c5e;
  --cpb-white:       #ffffff;
  --cpb-off:         #f8faf5;
  --cpb-radius:      10px;
  --cpb-shadow:      0 4px 20px rgba(74,140,42,0.10);
  --cpb-pink:        #E95694;
  --cpb-pink-light:  #fce8f2;
}

/* ── Wrapper ───────────────────────────────────────────────────────────── */
#cpb-wrapper {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 860px;
  margin: 0 auto;
  color: var(--cpb-text);
  line-height: 1.6;
}

/* ── Tabs ──────────────────────────────────────────────────────────────── */
.cpb-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.cpb-tab {
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  border: 1.5px solid var(--cpb-border);
  background: var(--cpb-white);
  color: var(--cpb-muted);
  font-family: 'Figtree', sans-serif;
}
.cpb-tab.active,
.cpb-tab:hover {
  background: var(--cpb-green);
  color: #fff;
  border-color: var(--cpb-green);
}

/* ── Panels ────────────────────────────────────────────────────────────── */
.cpb-panel { display: none; }
.cpb-panel.active { display: block; }
.cpb-panel-title { font-size: 1.3rem; margin: 0 0 8px; font-weight: 700; }
.cpb-panel-sub   { color: var(--cpb-muted); margin-bottom: 24px; font-size: 14px; }

/* ── Progress steps ────────────────────────────────────────────────────── */
.cpb-steps-bar {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
}
.cpb-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.cpb-step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--cpb-border);
  background: var(--cpb-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--cpb-muted);
  transition: all .3s;
}
.cpb-step-lbl { font-size: 11px; color: var(--cpb-muted); white-space: nowrap; font-weight: 500; }
.cpb-step-item.active .cpb-step-num  { background: var(--cpb-green); border-color: var(--cpb-green); color: #fff; }
.cpb-step-item.done   .cpb-step-num  { background: var(--cpb-green-pale); border-color: var(--cpb-green-light); color: var(--cpb-green-dark); }
.cpb-step-item.active .cpb-step-lbl,
.cpb-step-item.done   .cpb-step-lbl  { color: var(--cpb-green-dark); font-weight: 600; }
.cpb-step-connector {
  flex: 1;
  height: 2px;
  background: var(--cpb-border);
  margin: 0 4px;
  margin-bottom: 18px;
}

/* ── Booking steps ─────────────────────────────────────────────────────── */
.cpb-booking-step { display: none; }
.cpb-booking-step.active { display: block; }
.cpb-step-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 6px; }
.cpb-step-sub   { font-size: 13px; color: var(--cpb-muted); margin-bottom: 20px; }

/* ── Service grid ──────────────────────────────────────────────────────── */
.cpb-service-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cpb-muted);
  margin: 20px 0 10px;
}
.cpb-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.cpb-service-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1.5px solid var(--cpb-border);
  border-radius: var(--cpb-radius);
  cursor: pointer;
  transition: all .2s;
  background: var(--cpb-white);
}
.cpb-service-option:hover {
  border-color: var(--cpb-green-light);
  background: var(--cpb-green-pale);
}
.cpb-service-option.selected {
  border-color: var(--cpb-green);
  background: var(--cpb-green-pale);
  box-shadow: 0 0 0 3px rgba(74,140,42,0.12);
}

/* Consultation / Call For Price variant – NOT selectable */
.cpb-service-option.cpb-service-cfp {
  cursor: default;
  border-color: #f0c8df;
  background: var(--cpb-pink-light);
}
.cpb-service-option.cpb-service-cfp:hover {
  border-color: var(--cpb-pink);
  background: #fce8f2;
}

.cpb-svc-name  { font-size: 13px; font-weight: 600; }
.cpb-svc-price { font-size: 13px; font-weight: 700; color: var(--cpb-green); white-space: nowrap; margin-left: 10px; }

/* ── Call For Price button ─────────────────────────────────────────────── */
.cpb-btn-cfp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: var(--cpb-pink);
  color: #fff !important;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background .2s, transform .15s;
  font-family: 'Figtree', sans-serif;
  flex-shrink: 0;
  margin-left: 10px;
  border: none;
}
.cpb-btn-cfp:hover {
  background: #c93d7a;
  transform: translateY(-1px);
  color: #fff !important;
}

/* ── Forms ─────────────────────────────────────────────────────────────── */
.cpb-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cpb-field { display: flex; flex-direction: column; gap: 6px; }
.cpb-field-full { grid-column: 1 / -1; }
.cpb-field label { font-size: 13px; font-weight: 600; color: var(--cpb-text); }
.cpb-req { color: var(--cpb-green); }
.cpb-field input,
.cpb-field select,
.cpb-field textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--cpb-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Figtree', sans-serif;
  color: var(--cpb-text);
  background: var(--cpb-white);
  outline: none;
  transition: border .2s;
  width: 100%;
  box-sizing: border-box;
}
.cpb-field input:focus,
.cpb-field select:focus,
.cpb-field textarea:focus { border-color: var(--cpb-green); }
.cpb-field textarea { resize: vertical; }

.cpb-radio-group { display: flex; gap: 20px; flex-wrap: wrap; }
.cpb-radio-label  { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.cpb-radio-label small { color: var(--cpb-muted); font-size: 12px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.cpb-step-actions,
.cpb-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  align-items: center;
}
.cpb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .22s;
  font-family: 'Figtree', sans-serif;
  text-decoration: none;
}
.cpb-btn-primary { background: var(--cpb-green); color: #fff; }
.cpb-btn-primary:hover:not(:disabled) { background: var(--cpb-green-dark); transform: translateY(-1px); }
.cpb-btn-primary:disabled { background: #aaa; cursor: not-allowed; }
.cpb-btn-outline  { background: transparent; color: var(--cpb-green); border: 1.5px solid var(--cpb-green); }
.cpb-btn-outline:hover { background: var(--cpb-green-pale); }

/* ── Order summary ─────────────────────────────────────────────────────── */
.cpb-order-summary {
  background: var(--cpb-off);
  border: 1px solid var(--cpb-border);
  border-radius: var(--cpb-radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.cpb-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--cpb-border);
}
.cpb-summary-row:last-child { border-bottom: none; }
.cpb-summary-label { color: var(--cpb-muted); }
.cpb-summary-total { font-weight: 700; font-size: 16px; margin-top: 4px; }
.cpb-summary-total .cpb-summary-val { color: var(--cpb-green); }

/* ── Square card container ─────────────────────────────────────────────── */
.cpb-card-form  { margin-bottom: 16px; }
.cpb-card-label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 8px; }
#cpb-card-container {
  border: 1.5px solid var(--cpb-border);
  border-radius: 8px;
  padding: 14px;
  background: var(--cpb-white);
  min-height: 52px;
}
#cpb-card-container.sq-focus { border-color: var(--cpb-green); }
.cpb-card-errors {
  color: #c00;
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
}
.cpb-payment-notice {
  background: var(--cpb-green-pale);
  border: 1px solid var(--cpb-border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 16px;
}
.cpb-secure-note { font-size: 12px; color: var(--cpb-muted); margin-top: 12px; }

/* ── Spinner ───────────────────────────────────────────────────────────── */
.cpb-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cpb-spin .7s linear infinite;
  display: inline-block;
}
@keyframes cpb-spin { to { transform: rotate(360deg); } }

/* ── Success screen ────────────────────────────────────────────────────── */
.cpb-success-wrap {
  text-align: center;
  padding: 40px 20px;
}
.cpb-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--cpb-green-pale);
  border: 3px solid var(--cpb-green);
  color: var(--cpb-green);
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.cpb-success-wrap h3 { font-size: 1.6rem; margin-bottom: 12px; font-weight: 700; }
.cpb-success-wrap p  { color: var(--cpb-muted); margin-bottom: 16px; }
.cpb-success-ref {
  background: var(--cpb-green-pale);
  border-radius: 8px;
  padding: 12px 20px;
  margin-bottom: 16px;
  font-size: 15px;
  display: inline-block;
}
.cpb-success-sub { font-size: 13px; color: var(--cpb-muted); max-width: 480px; margin: 0 auto 20px; }

/* ── Form messages ─────────────────────────────────────────────────────── */
.cpb-form-msg {
  margin-top: 14px;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 8px;
  display: none;
}
.cpb-form-msg.success { background: var(--cpb-green-pale); color: var(--cpb-green-dark); display: block; }
.cpb-form-msg.error   { background: #fde8e8; color: #c00; display: block; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .cpb-form-grid { grid-template-columns: 1fr; }
  .cpb-step-lbl  { display: none; }
  .cpb-service-grid { grid-template-columns: 1fr; }
  .cpb-steps-bar { gap: 2px; }
  .cpb-tabs { flex-direction: column; }
  .cpb-tab { text-align: center; border-radius: 8px; }
  .cpb-btn-cfp { font-size: 11px; padding: 6px 11px; }
}

/* ══════════════════════════════════════════════════════════════════
   STANDALONE THANK YOU & FAILURE PAGES
   ══════════════════════════════════════════════════════════════════ */

.cpb-standalone-page {
  font-family: 'Figtree', sans-serif;
  max-width: 640px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: center;
}

/* ── Thank You ────────────────────────────────────────────────── */
.cpb-thankyou-wrap {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: 0 4px 24px rgba(45,106,20,.10);
  border-top: 6px solid #2d6a14;
}

.cpb-icon-lg {
  width: 80px;
  height: 80px;
  font-size: 36px;
  line-height: 80px;
  margin: 0 auto 24px;
}

.cpb-ty-heading {
  font-size: 32px;
  font-weight: 700;
  color: #2d6a14;
  margin-bottom: 10px;
}

.cpb-ty-sub {
  font-size: 16px;
  color: #4a5e40;
  margin-bottom: 28px;
}

.cpb-ty-card {
  background: #f6faf3;
  border: 1px solid #d4e6c3;
  border-radius: 10px;
  padding: 20px 24px;
  text-align: left;
  margin-bottom: 24px;
}

.cpb-ty-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e0eeda;
  font-size: 14px;
}

.cpb-ty-row:last-child {
  border-bottom: none;
}

.cpb-ty-lbl { color: #6b7c5e; }
.cpb-ty-val { font-weight: 600; color: #1a2616; }

.cpb-ty-notice {
  background: #fff8e1;
  border-left: 4px solid #f5a623;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  text-align: left;
  font-size: 14px;
  color: #7a5f00;
  margin-bottom: 20px;
}

.cpb-ty-contact {
  background: #f6faf3;
  border: 1px solid #d4e6c3;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 14px;
  color: #4a5e40;
  margin-top: 20px;
}

.cpb-ty-contact a { color: #2d6a14; font-weight: 600; text-decoration: none; }
.cpb-ty-contact a:hover { text-decoration: underline; }

/* ── Payment Failed ───────────────────────────────────────────── */
.cpb-failed-wrap {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: 0 4px 24px rgba(192,57,43,.10);
  border-top: 6px solid #c0392b;
}

.cpb-failed-icon {
  width: 80px;
  height: 80px;
  background: #fdf2f1;
  border: 3px solid #c0392b;
  border-radius: 50%;
  font-size: 32px;
  font-weight: 700;
  color: #c0392b;
  line-height: 74px;
  margin: 0 auto 24px;
}

.cpb-failed-heading {
  font-size: 30px;
  font-weight: 700;
  color: #c0392b;
  margin-bottom: 10px;
}

.cpb-failed-sub {
  font-size: 16px;
  color: #7b5050;
  margin-bottom: 28px;
}

.cpb-failed-card {
  background: #fdf2f1;
  border: 1px solid #e8b4b0;
  border-radius: 10px;
  padding: 20px 24px;
  text-align: left;
  font-size: 14px;
  color: #7b1e1e;
  margin-bottom: 24px;
}

.cpb-failed-card p { margin-bottom: 8px; }
.cpb-failed-card ul { margin-left: 20px; line-height: 2; }

.cpb-failed-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0;
}
