/* ============================================================
   Enquiry Now — Frontend CSS (Responsive)
   ============================================================ */
:root {
  --enq-primary:       #f28f16;
  --enq-primary-dark:  #d4780e;
  --enq-secondary:     #333333;
  --enq-title-color:   #1a1a1a;
  --enq-body-color:    #515151;
  --enq-title-size:    28px;
  --enq-body-size:     15px;
  --enq-title-weight:  700;
  --enq-btn-radius:    4px;
  --enq-success:       #057a55;
  --enq-success-bg:    #f3faf7;
  --enq-danger:        #c81e1e;
  --enq-danger-bg:     #fdf2f2;
  --enq-border:        #d1d5db;
  --enq-shadow:        0 25px 60px rgba(0,0,0,.2), 0 6px 20px rgba(0,0,0,.1);
  --enq-font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Button ─────────────────────────────────────────────── */
.enq-button-wrap { margin: 1rem 0; }

button.enq-open-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: var(--enq-btn-padding, .85rem 2rem);
  background: var(--enq-primary);
  color: #fff;
  border: 2px solid var(--enq-primary);
  border-radius: var(--enq-btn-radius);
  font-family: var(--enq-font);
  font-size: var(--enq-btn-font-size, 1rem);
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  width: 100%;
  max-width: var(--enq-btn-max-width, 320px);
}

button.enq-open-modal:hover {
  background: var(--enq-primary-dark);
  border-color: var(--enq-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

/* ── Hidden utility — class-based (avoids theme [hidden] overrides) ── */
.enq-hidden { display: none !important; }

/* ── Overlay ─────────────────────────────────────────────── */
.enq-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.enq-overlay.enq-hidden { display: none !important; }
.enq-overlay.enq-visible {
  animation: enqFadeIn .2s ease;
}
.enq-overlay.enq-visible .enq-modal {
  animation: enqSlideUp .25s cubic-bezier(.34,1.56,.64,1);
}

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

/* ── Modal ───────────────────────────────────────────────── */
.enq-modal {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--enq-shadow);
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 2rem 1.75rem 1.75rem;
  font-family: var(--enq-font);
  scrollbar-width: thin;
}
.enq-modal::-webkit-scrollbar { width: 6px; }
.enq-modal::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 3px; }

@keyframes enqSlideUp {
  from { transform: translateY(28px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Close btn ───────────────────────────────────────────── */
.enq-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  transition: background .15s, color .15s;
}
.enq-modal-close:hover { background: #e5e7eb; color: #111; }
.enq-modal-close svg { width: 16px; height: 16px; }

/* ── Header ──────────────────────────────────────────────── */
.enq-modal-header { margin-bottom: 1.25rem; }
.enq-modal-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 .5rem;
  padding-right: 2rem;
}
.enq-product-pill {
  display: inline-block;
  background: #fff7e6;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: .25rem .75rem;
  font-size: .8rem;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Notices ─────────────────────────────────────────────── */
.enq-notice {
  border-radius: 8px;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  font-size: .875rem;
  font-weight: 500;
}
.enq-notice[hidden],
.enq-notice.enq-hidden { display: none !important; }
.enq-notice--success { background: var(--enq-success-bg); color: var(--enq-success); border: 1px solid #bcf0da; }
.enq-notice--error   { background: var(--enq-danger-bg);  color: var(--enq-danger);  border: 1px solid #fbd5d5; }

/* ── Fields ──────────────────────────────────────────────── */
#enq-form { display: flex; flex-direction: column; gap: .9rem; }

.enq-field { display: flex; flex-direction: column; gap: .35rem; }

.enq-field label {
  font-size: .85rem;
  font-weight: 600;
  color: #374151;
}
.enq-req { color: var(--enq-danger); }

.enq-field input,
.enq-field textarea {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid var(--enq-border);
  border-radius: 8px;
  font-family: var(--enq-font);
  font-size: .9375rem;
  color: #111;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.enq-field input:focus,
.enq-field textarea:focus {
  outline: none;
  border-color: var(--enq-primary);
  box-shadow: 0 0 0 3px rgba(242,143,22,.2);
}
.enq-field input.enq-invalid,
.enq-field textarea.enq-invalid {
  border-color: var(--enq-danger);
  box-shadow: 0 0 0 3px rgba(200,30,30,.12);
}
.enq-field textarea { resize: vertical; min-height: 100px; }

/* ── Submit ──────────────────────────────────────────────── */
.enq-submit-btn {
  padding: .9rem;
  background: var(--enq-primary);
  color: #fff;
  border: none;
  border-radius: var(--enq-btn-radius);
  font-family: var(--enq-font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  transition: background .2s;
  margin-top: .25rem;
}
.enq-submit-btn:hover:not(:disabled) { background: var(--enq-primary-dark); }
.enq-submit-btn:disabled { opacity: .65; cursor: not-allowed; }

.enq-spin {
  width: 18px; height: 18px;
  animation: enqSpin 1s linear infinite;
}
@keyframes enqSpin { to { transform: rotate(360deg); } }
.enq-btn-spinner[hidden],
.enq-btn-spinner.enq-hidden { display: none !important; }

/* ── Body lock ───────────────────────────────────────────── */
body.enq-modal-open { overflow: hidden; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .enq-modal {
    padding: 1.5rem 1.1rem 1.1rem;
    border-radius: 12px;
    max-height: 95vh;
  }
  /* Button sizing handled by dynamic CSS vars from admin settings */
}

/* ── Hide WooCommerce Add to Cart button (kept in DOM for script deps) ── */
.single-product .woocommerce-variation-add-to-cart,
.single-product form.cart,
.single-product .single_add_to_cart_button,
.single-product .wc-bookings-booking-form,
.single-product .button.alt:not(.enq-open-modal),
.single-product .quantity {
  display: none !important;
}
