/* =============================================================
   BOOK A FREE CONSULTATION — POPUP MODAL STYLES
   All selectors prefixed with .bfc- to avoid WP theme conflicts
   ============================================================= */

/* ── Reset scoped to modal ── */
.bfc-overlay *, .bfc-trigger-btn, .bfc-geo-loading *, .bfc-geo-blocked * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Geo Loading State ── */
.bfc-geo-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 40px 20px;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
}
.bfc-geo-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e5ea;
  border-top-color: #00A9B0;
  border-radius: 50%;
  animation: bfcSpin 0.8s linear infinite;
  margin-bottom: 16px;
}
.bfc-geo-loading p {
  color: #666;
  font-size: 15px;
}

/* ── Geo Blocked State ── */
.bfc-geo-blocked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 40px 20px;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  border-radius: 18px;
  max-width: 400px;
  margin: 40px auto;
}
.bfc-geo-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.bfc-geo-blocked h3 {
  color: #111;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.bfc-geo-blocked p {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* ── Google Font ── */

/* ── Trigger button ── */
.bfc-trigger-btn {
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  color: #00A9B0!important;
  border: 2px solid #00A9B0;
  border-radius: 10px;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.15s;
}

.bfc-trigger-btn:hover {
  background: #00A9B0;
  color: #fff!important;
  transform: translateY(-2px);
}


/* ── Overlay ── */
.bfc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.bfc-overlay.bfc-open {
  display: flex;
  animation: bfcFadeIn 0.2s ease;
}

@keyframes bfcFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.bfc-modal {
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  scroll-behavior: smooth;
  animation: bfcSlideUp 0.28s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes bfcSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .bfc-overlay.bfc-open { animation: none; }
  .bfc-modal            { animation: none; }
}

/* Scrollbar styling */
.bfc-modal::-webkit-scrollbar { width: 6px; }
.bfc-modal::-webkit-scrollbar-track { background: transparent; }
.bfc-modal::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* ── Modal header ── */
.bfc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 6px 24px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  border-radius: 18px 18px 0 0;
}
.bfc-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bfc-modal-title {
  font-size: 24px!important;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
}
.bfc-close-btn {
  background: #c7c5c5!important;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000!important;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.bfc-close-btn:hover { background: #e5e5e5; color: #111; }

/* ── Modal body ── */
.bfc-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Field group ── */
.bfc-field-group {
  display: flex;
  flex-direction: column;
  gap: 0px;
}
.bfc-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #222;
  letter-spacing: 0.005em;
}
.bfc-req  { color: #e53e3e; margin-left: 2px; }
.bfc-optional { font-weight: 400; color: #888; font-size: 12.5px; }

/* ── Input / Textarea ── */
.bfc-input {
  width: 100%;
  height: 36px;
  border: 1.5px solid #e2e5ea;
  border-radius: 10px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14.5px;
  color: #111;
  background: #fff;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

#bfc-date{
    font-size: 13px;
}

#bfc-display-time{
    font-size: 13px;
}

input[type="text"]{
    height: 36px;
}

input[type="date"]{
    height: 36px;
}

input[type="tel"]{
    height: 36px;
}

.bfc-input::placeholder { color: #adb5bd; font-size: 13px;}
.bfc-input:focus {
  border-color: #00A9B0;
  box-shadow: 0 0 0 3px rgba(0,169,176,0.12);
}
.bfc-input--readonly {
  background: #f7f8fa;
  color: #555;
  cursor: default;
}
.bfc-input.bfc-input--error { border-color: #e53e3e; }

/* ── Select ── */
.bfc-select-wrap {
  position: relative;
}
.bfc-select {
  cursor: pointer;
  box-sizing: border-box; /* Ensures padding doesn't break the layout */
  
  /* 1. Fix the clipping by adding top/bottom padding and resetting line-height */
  padding: 10px 36px 10px 12px; /* Top, Right, Bottom, Left */
  line-height: normal;
  
  border-radius: 4px!important;
}

/* 2. Target the actual default/disabled option instead of using ::placeholder */
.bfc-select option:first-child,
.bfc-select:invalid {
  font-size: 13px;
}

.bfc-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #888;
  pointer-events: none;
}

/* ── Row layout ── */
.bfc-row { display: flex; gap: 15px!important; }
.bfc-row-2 > .bfc-field-group { flex: 1; min-width: 0; }

/* ── Time cards ── */
.bfc-time-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.bfc-time-card {
  border: 1.5px solid #e2e5ea;
  border-radius: 5px;
  padding: 14px 10px 12px 10px;
  display: flex;
  flex-direction: row;
  justify-content: space-between!important;
  align-items: center;
  gap: 2px!important;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  user-select: none;
  background: #fff;
}
.bfc-time-card:hover {
  border-color: #00A9B0;
  color: #00A9B0!important;
  background: #e6f7f8;
}
.bfc-time-card:focus-visible {
  outline: 2px solid #00A9B0;
  outline-offset: 2px;
}
.bfc-time-card--active {
  border-color: #A7F3D0 !important;
  color: #00A9B0!important;
  background: #A7F3D0 !important;
  box-shadow: 0 0 0 3px rgba(0,169,176,0.10);
}

.bfc-tc-name  { font-size: 14px; font-weight: 700; color: #111; line-height:1.2;}
.bfc-tc-sub   { font-size: 11.5px; color: #777; line-height: 1.2; }

/* ── Error text ── */
.bfc-error {
  font-size: 12px;
  color: #e53e3e;
  font-weight: 500;
  min-height: 18px;
  display: block;
}
.bfc-global-error {
  background: #fff5f5;
  border: 1.5px solid #fed7d7;
  border-radius: 10px;
  padding: 12px 14px;
  color: #c53030;
  font-size: 13.5px;
  font-weight: 500;
}

/* ── Buttons ── */
.bfc-btn-primary {
  background: #00A9B0;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px 24px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0,169,176,0.35);
}
.bfc-btn-primary:hover:not(:disabled) {
  background: #00A9B0;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,169,176,0.4);
}
.bfc-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.bfc-btn-full { width: 100%; }

.bfc-secondary-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px!important;
}
.bfc-btn-secondary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 12px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s, transform 0.15s;
  cursor: pointer;
  text-align: center;
}
.bfc-btn-call {
  background: #ab66045c!important;
  color: #ca8702!important;
  border: 1.5px solid #ca8702!important;
}
.bfc-btn-call:hover { background: #008990; transform: translateY(-1px); }

.bfc-btn-whatsapp {
  background: #228b4966!important;
  color: #228b49!important;
  border: 1.5px solid #228b49!important;
}
.bfc-btn-whatsapp:hover { background: #008990; transform: translateY(-1px); }

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

/* ── Success state ── */
.bfc-success {
  text-align: center;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.bfc-success-icon { font-size: 52px; }
.bfc-success h3   { font-size: 22px; font-weight: 700; color: #111; }
.bfc-success p    { color: #555; font-size: 15px; max-width: 340px; line-height: 1.6; }

/* ── Responsive ── */
@media (max-width: 520px) {
  .bfc-modal-body   { padding: 18px 16px; gap: 16px; }
  .bfc-modal-header { padding: 10px 15px 5px 12px; }
  .bfc-modal-title  { font-size: 20px!important; }
  .bfc-row-2        { flex-direction: column; gap: 3px!important}
  .bfc-time-card {padding: 5px!important; gap: 2px!important; display: flex; flex-direction: column!important;}
  .bfc-time-cards   { grid-template-columns: repeat(3, 1fr); gap: 10px;}
  .bfc-tc-name      { font-size: 12px; }
  .bfc-tc-sub       { font-size: 10px; line-height: 1.2; }
  .bfc-secondary-actions { flex-direction: column; }
}

@media (max-width: 360px) {
  .bfc-time-cards { grid-template-columns: 1fr; }
}
