/* probe-booking plugin frontend styles */

#pb-wrap [hidden] { display: none !important; }

#pb-wrap {
  --pb-green:   #124029;
  --pb-green2:  #1a5c3a;
  --pb-red:     #e53935;
  --pb-gray50:  #f9fafb;
  --pb-gray100: #f3f4f6;
  --pb-gray200: #e5e7eb;
  --pb-gray400: #9ca3af;
  --pb-gray600: #4b5563;
  --pb-gray800: #1f2937;
  --pb-radius:  10px;
  --pb-shadow:  0 2px 12px rgba(0,0,0,.08);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--pb-gray800);
}

.pb-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 48px;
  position: relative;
}

/* ── Header ── */
.pb-header {
  text-align: center;
  padding: 36px 0 24px;
}
.pb-logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--pb-green);
}
.pb-logo-img {
  max-height: 70px;
  width: auto;
  display: block;
  margin: 0 auto 8px;
}
.pb-tagline {
  color: var(--pb-gray600);
  font-size: .95rem;
  margin-top: 4px;
}

/* ── Steps ── */
.pb-step { display: none; }
.pb-step.active { display: block; }

.pb-step h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--pb-green);
}

/* ── Week navigation ── */
#pb-week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
#pb-week-label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--pb-gray600);
}
.pb-nav-btn {
  background: none;
  border: 1.5px solid var(--pb-gray200);
  border-radius: 8px;
  width: 36px; height: 36px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--pb-gray600);
  transition: border-color .15s, color .15s;
  line-height: 1;
}
.pb-nav-btn:hover { border-color: var(--pb-green); color: var(--pb-green); }
.pb-nav-btn:disabled { opacity: .35; cursor: default; }

/* ── Day strip ── */
#pb-day-strip {
  display: flex;

  gap: 6px;
  margin-bottom: 24px;
}
.pb-day-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
  padding: 10px 4px;
  border: 1.5px solid var(--pb-gray200);
  border-radius: var(--pb-radius);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-family: inherit;
}
.pb-day-btn .pb-day-name {
  font-size: .65rem;
  font-weight: 600;
  color: var(--pb-gray400);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.pb-day-btn .pb-day-num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pb-gray800);
}
.pb-day-btn.has-slots { border-color: var(--pb-green); }
.pb-day-btn.has-slots .pb-day-num { color: var(--pb-green); }
.pb-day-btn.selected {
  background: var(--pb-green);
  border-color: var(--pb-green);
}
.pb-day-btn.selected .pb-day-name,
.pb-day-btn.selected .pb-day-num { color: #fff; }
.pb-day-btn.empty { opacity: .4; cursor: default; }
.pb-day-btn.today .pb-day-num {
  background: var(--pb-red);
  color: #fff;
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}
.pb-day-btn.selected.today .pb-day-num { background: rgba(255,255,255,.3); }

/* ── Slot list ── */
#pb-slot-list { display: flex; flex-direction: column; gap: 10px; }
.pb-slot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1.5px solid var(--pb-gray200);
  border-radius: var(--pb-radius);
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: var(--pb-shadow);
}
.pb-slot-card:hover {
  border-color: var(--pb-green);
  box-shadow: 0 4px 16px rgba(18,64,41,.12);
}
.pb-slot-time {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pb-green);
}
.pb-slot-duration {
  font-size: .8rem;
  color: var(--pb-gray400);
  margin-top: 2px;
}
.pb-slot-arrow {
  font-size: 1.1rem;
  color: var(--pb-gray400);
}
.pb-no-slots {
  text-align: center;
  color: var(--pb-gray400);
  padding: 24px;
  font-size: .9rem;
}

/* ── Booking form ── */
.pb-back-btn {
  background: none;
  border: none;
  color: var(--pb-gray600);
  font-size: .9rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pb-back-btn:hover { color: var(--pb-green); }

.pb-slot-summary {
  background: var(--pb-green);
  color: #fff;
  border-radius: var(--pb-radius);
  padding: 12px 16px;
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pb-sum-date {
  font-size: .95rem;
  font-weight: 700;
}
.pb-sum-time {
  font-size: .875rem;
  opacity: .9;
}

.pb-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pb-field { margin-bottom: 16px; }
.pb-field label, #pb-wrap label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--pb-gray600);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
#pb-wrap input[type=text],
#pb-wrap input[type=tel],
#pb-wrap input[type=email],
#pb-wrap textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--pb-gray200);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  background: #fff;
  box-shadow: none;
}
#pb-wrap input:focus, #pb-wrap textarea:focus { border-color: var(--pb-green); }
#pb-wrap input.pb-invalid { border-color: #ef4444; }
#pb-wrap textarea { resize: vertical; }

.pb-radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.pb-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .95rem;
  cursor: pointer;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
#pb-wrap .pb-radio-label input { width: auto; accent-color: var(--pb-green); }

.pb-error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .875rem;
  margin-bottom: 16px;
}

/* ── Buttons ── */
.pb-btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--pb-green);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
  margin-top: 4px;
}
.pb-btn-primary:hover { background: var(--pb-green2); }
.pb-btn-primary:disabled { opacity: .6; cursor: default; }

.pb-btn-secondary {
  padding: 11px 24px;
  background: var(--pb-gray100);
  color: var(--pb-gray800);
  border: 1.5px solid var(--pb-gray200);
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 20px;
  transition: border-color .15s;
}
.pb-btn-secondary:hover { border-color: var(--pb-green); color: var(--pb-green); }

/* ── Confirmation ── */
#pb-step-confirm { text-align: center; padding-top: 24px; }
.pb-confirm-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--pb-green);
  color: #fff;
  font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.pb-confirm-details {
  background: var(--pb-gray100);
  border-radius: var(--pb-radius);
  padding: 16px 20px;
  font-size: .95rem;
  line-height: 1.7;
  margin: 16px 0;
  text-align: left;
}
.pb-confirm-details strong { color: var(--pb-green); }
.pb-confirm-message {
  font-size: .95rem;
  color: var(--pb-gray600);
  margin: 12px 0;
}
.pb-confirm-note {
  color: var(--pb-gray600);
  font-size: .875rem;
  margin-top: 12px;
}

/* ── Loading overlay ── */
.pb-loading {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: var(--pb-radius);
}
.pb-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--pb-gray200);
  border-top-color: var(--pb-green);
  border-radius: 50%;
  animation: pb-spin .7s linear infinite;
}
@keyframes pb-spin { to { transform: rotate(360deg); } }

/* ── Mobile ── */
@media (max-width: 400px) {
  .pb-field-row { grid-template-columns: 1fr; }
  #pb-day-strip { gap: 4px; }
  .pb-day-btn { padding: 8px 2px; }
  .pb-day-btn .pb-day-num { font-size: .9rem; }
}

/* ── Duplicate booking warning ───────────────────────────────────────── */
.pb-duplicate-box {
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  border-radius: var(--pb-radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.pb-dup-icon {
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.pb-dup-text {
  font-size: .9rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 12px;
}
.pb-dup-hint {
  font-size: .85rem;
  color: #4b5563;
  margin-bottom: 10px;
}
.pb-dup-blocked {
  font-size: .875rem;
  color: #b91c1c;
  font-weight: 600;
}
.pb-dup-confirm-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .875rem;
  color: #4b5563;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
#pb-wrap .pb-dup-confirm-label input[type=checkbox] {
  width: auto;
  margin-top: 2px;
  accent-color: var(--pb-green);
  flex-shrink: 0;
}
/* Google button container */
#pb-google-btn {
  margin-top: 4px;
}

/* ── Summary / Pricing step ──────────────────────────────────────────── */
.pb-summary-desc {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--pb-gray600);
  margin-bottom: 20px;
}
.pb-summary-desc p { margin: 0 0 12px; }
.pb-summary-desc p:last-child { margin-bottom: 0; }

.pb-price-box {
  background: #fff;
  border: 1.5px solid var(--pb-gray200);
  border-radius: var(--pb-radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--pb-shadow);
}

.pb-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .95rem;
  padding: 6px 0;
}
.pb-price-base {
  border-bottom: 1px solid var(--pb-gray200);
  padding-bottom: 12px;
  margin-bottom: 8px;
  font-weight: 600;
}
.pb-price-base span:last-child {
  color: var(--pb-green);
  font-weight: 700;
}

#pb-coupon-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--pb-gray200);
  margin-bottom: 8px;
}
.pb-coupon-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--pb-gray600);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.pb-coupon-row {
  display: flex;
  gap: 8px;
}
.pb-coupon-input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid var(--pb-gray200);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: .05em;
  outline: none;
  transition: border-color .15s;
}
.pb-coupon-input:focus { border-color: var(--pb-green); }

.pb-btn-coupon {
  padding: 9px 16px;
  background: var(--pb-gray100);
  border: 1.5px solid var(--pb-gray200);
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.pb-btn-coupon:hover { border-color: var(--pb-green); background: #e8f5ee; }
.pb-btn-coupon:disabled { opacity: .5; cursor: default; }

.pb-coupon-feedback {
  font-size: .85rem;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
}
.pb-coupon-ok  { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.pb-coupon-err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.pb-discount-row { color: #166534; font-size: .9rem; }
.pb-discount-row span:last-child { font-weight: 600; }

.pb-total-row {
  padding-top: 10px;
  margin-top: 4px;
  border-top: 2px solid var(--pb-gray800);
  font-weight: 700;
  font-size: 1.05rem;
}
.pb-total-value { color: var(--pb-green); font-size: 1.1rem; }
.pb-total-free  { color: #166534; }

.pb-payment-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .875rem;
  color: #92400e;
  margin-bottom: 8px;
}

/* ── Skeleton loading ── */
@keyframes pb-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.pb-skeleton {
  background: linear-gradient(
    90deg,
    var(--pb-gray200, #e5e7eb) 25%,
    #f9fafb                    50%,
    var(--pb-gray200, #e5e7eb) 75%
  );
  background-size: 1200px 100%;
  animation: pb-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--pb-radius, 10px);
}

/* Ghost day-button – same size as real .pb-day-btn */
.pb-skel-day {
  height: 60px;
  min-width: 0;
}

/* Ghost slot card – same height as real .pb-slot-card */
.pb-skel-slot {
  height: 68px;
  margin-bottom: 10px;
}

/* Label above ghost slots */
.pb-skel-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--pb-gray400, #9ca3af);
  font-size: .875rem;
  margin-bottom: 16px;
  text-align: center;
}

/* Small spinner inside the label */
.pb-skel-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--pb-gray200, #e5e7eb);
  border-top-color: var(--pb-green, #124029);
  border-radius: 50%;
  animation: pb-spin .8s linear infinite;
  flex-shrink: 0;
}

/* ── Auto-referrer coupon badge ── */
.pb-autocoupon-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1.5px solid var(--pb-green, #124029);
  color: var(--pb-green, #124029);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: .875rem;
  font-weight: 500;
}

/* Pending day (availability not yet loaded) */
.pb-day-btn.pending { opacity: .65; }
.pb-day-btn.pending .pb-day-num { color: var(--pb-gray400, #9ca3af); }
