/* Admission enquiry popup, side tab and Contacts page form (enquiry.js). Every rule is scoped
   under .jq-* and specific enough to win over the WordPress theme's global form styles. */
.jq-tab, .jq-overlay, .jq-form, .jq-thanks {
  --jq-purple: #41246d;
  --jq-purple-deep: #2e184f;
  --jq-gold: #f5b417;
  --jq-gold-deep: #dc9f08;
  --jq-ink: #1d1729;
  --jq-soft: #5d566a;
  --jq-line: #d9d3e2;
  --jq-error: #b3261e;
  font-family: "Mulish", "Muli", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}
.jq-tab *, .jq-overlay *, .jq-form *, .jq-thanks * { box-sizing: border-box; }
.jq-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.jq-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
html body [hidden].jq-tab.jq-tab, .jq-overlay[hidden], .jq-error[hidden], .jq-alert[hidden] { display: none !important; }

/* The theme's own "Enquire Now" button (header template, shown as a fixed tab on the right edge)
   now opens the same popup; the tab below takes its place, so only one shows. */
.elementor-widget-button:has([data-enquiry-open]) { display: none !important; }

/* ── The side tab: on the right edge, where a phone's power button is. Doubled class: the
   theme styles every <button>. ── */
html body button.jq-tab.jq-tab {
  position: fixed; top: 40%; right: 0; z-index: 9990; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 0; padding: 14px 8px 14px 10px; min-width: 0; width: auto; height: auto;
  border: 0; border-radius: 12px 0 0 12px; cursor: pointer;
  background: var(--jq-gold); color: var(--jq-purple);
  box-shadow: -4px 6px 18px rgba(29, 23, 41, 0.28);
  font: 800 13px/1 "Mulish", "Muli", sans-serif; letter-spacing: 0.08em; text-transform: uppercase;
  transition: padding-right 0.2s ease, background-color 0.2s ease;
}
html body button.jq-tab.jq-tab:hover, html body button.jq-tab.jq-tab:focus-visible { background: var(--jq-gold-deep); color: var(--jq-purple-deep); padding-right: 14px; }
html body button.jq-tab.jq-tab:focus-visible { outline: 3px solid var(--jq-purple); outline-offset: 2px; }
button.jq-tab svg { color: currentColor; flex-shrink: 0; }
/* Read bottom to top, as side tabs are: only the label turns, so the rounded corners stay on
   the side facing the page. */
.jq-tab-label { writing-mode: vertical-rl; transform: rotate(180deg); }

/* ── The popup ── */
.jq-overlay {
  position: fixed; inset: 0; z-index: 2000000000;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 12px; background: rgba(23, 16, 35, 0.6); backdrop-filter: blur(2px);
}
.jq-dialog {
  position: relative; width: 100%; max-width: 440px; max-height: min(92dvh, 46rem); overflow-y: auto;
  background: #fff; border-radius: 22px; border-top: 5px solid var(--jq-gold);
  box-shadow: 0 24px 60px rgba(23, 16, 35, 0.35); outline: none; color: var(--jq-ink);
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  animation: jq-rise 0.22s ease-out;
}
@keyframes jq-rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) { .jq-overlay { align-items: center; padding: 24px; } }
@media (prefers-reduced-motion: reduce) { .jq-dialog { animation: none; } button.jq-tab { transition: none; } }
.jq-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 0; }
.jq-overlay .jq-kicker { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--jq-purple); }
.jq-overlay .jq-title { margin: 6px 0 0; padding: 0; font-family: inherit; font-size: 24px; line-height: 1.2; font-weight: 800; color: var(--jq-ink); text-transform: none; letter-spacing: 0; }
.jq-overlay button.jq-close {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; margin: -6px -10px 0 0; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--jq-soft); cursor: pointer; box-shadow: none;
}
.jq-overlay button.jq-close:hover { background: #f1eef5; color: var(--jq-ink); }
.jq-overlay button.jq-close:focus-visible { outline: 3px solid var(--jq-gold); outline-offset: 1px; }
.jq-body { padding: 10px 22px 20px; }
.jq-overlay .jq-lede { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: var(--jq-soft); }

/* ── The form (popup and Contacts page) ── */
.jq-form { margin: 0; text-align: left; }
.jq-form .jq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.jq-form .jq-field { grid-column: span 2; min-width: 0; margin: 0; }
@media (min-width: 480px) { .jq-form .jq-field:not(.jq-wide) { grid-column: span 1; } }
.jq-form .jq-label { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--jq-soft); line-height: 1.3; }
.jq-form .jq-optional { font-weight: 600; letter-spacing: 0; text-transform: none; }
.jq-form .jq-input.jq-input {
  display: block; width: 100%; max-width: none; height: auto; min-height: 48px; margin: 0;
  padding: 12px 14px; border: 1px solid var(--jq-line); border-radius: 12px;
  background: #faf9fc; color: var(--jq-ink); box-shadow: none;
  font: 500 16px/1.4 "Mulish", "Muli", sans-serif; letter-spacing: 0; text-transform: none;
  -webkit-appearance: none; appearance: none;
}
.jq-form textarea.jq-input.jq-input { min-height: 96px; resize: vertical; }
.jq-form select.jq-input.jq-input {
  /* the theme hides every <select> until its script wraps it; these are not wrapped */
  visibility: visible !important; opacity: 1 !important;
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d566a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.jq-form select.jq-input.jq-placeholder, .jq-form .jq-input::placeholder { color: #8a8396; opacity: 1; }
.jq-form select.jq-input option { color: var(--jq-ink); }
.jq-form .jq-input.jq-input:focus { border-color: var(--jq-purple); outline: none; box-shadow: 0 0 0 3px rgba(65, 36, 109, 0.18); background-color: #fff; }
.jq-form .jq-input.jq-input[aria-invalid="true"] { border-color: var(--jq-error); }
.jq-form .jq-error { margin: 5px 0 0; font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--jq-error); }
.jq-form .jq-turnstile:not(:empty) { margin-top: 14px; }
.jq-form .jq-alert { margin: 14px 0 0; padding: 12px 14px; border: 1px solid #f0c27b; border-radius: 12px; background: #fff7e8; font-size: 14px; line-height: 1.5; color: #5c3b00; }
.jq-form .jq-alert strong { display: block; color: #3d2700; }
.jq-form .jq-alert a, .jq-form .jq-note a { color: var(--jq-purple); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.jq-form button.jq-submit, .jq-overlay button.jq-submit {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px;
  margin: 16px 0 0; padding: 0 24px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--jq-gold); color: var(--jq-ink); box-shadow: 0 6px 16px rgba(220, 159, 8, 0.28);
  font: 800 16px/1 "Mulish", "Muli", sans-serif; letter-spacing: 0.02em; text-transform: none;
  transition: background-color 0.15s ease;
}
.jq-form button.jq-submit:hover, .jq-overlay button.jq-submit:hover { background: var(--jq-gold-deep); color: var(--jq-ink); }
.jq-form button.jq-submit:focus-visible, .jq-overlay button.jq-submit:focus-visible { outline: 3px solid var(--jq-purple); outline-offset: 2px; }
.jq-form button.jq-submit:disabled { cursor: wait; opacity: 0.65; }
.jq-form .jq-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--jq-soft); }

/* ── After sending ── */
.jq-thanks { outline: none; }
.jq-thanks p { margin: 0 0 8px; font-size: 15px; line-height: 1.55; color: var(--jq-soft); }
.jq-thanks .jq-thanks-title { font-size: 19px; font-weight: 800; color: var(--jq-ink); }

/* The Contacts page form: a white card on the theme's dark purple section. */
[data-enquiry-inline] {
  max-width: 640px; margin: 0 auto; padding: 24px 22px;
  background: #fff; border-radius: 22px; border-top: 5px solid #f5b417;
  box-shadow: 0 18px 44px rgba(10, 4, 24, 0.35); text-align: left;
}
@media (min-width: 640px) { [data-enquiry-inline] { padding: 32px 36px; } }

@media print { html body button.jq-tab.jq-tab, .jq-overlay { display: none !important; } }
