/* Quick Enquiry widget — a left-edge tab that slides open a lead-capture
 * panel. Public marketing pages only (index.php, guidelines.php,
 * circulars.php); posts through the same send-enquiry.php pipeline as the
 * hero/program-modal forms (see includes/EnquiryValidator.php).
 *
 * Depends on the color variables from assets/css/style.v2.css (--navy,
 * --gold, --blue-accent, etc.), which every page loading this already
 * includes.
 */

.qe-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 58, .38);
  z-index: 1039;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.qe-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.qe-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1040;
  writing-mode: vertical-rl;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy-deep);
  border: none;
  padding: 16px 10px;
  border-radius: 12px 0 0 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .84rem;
  letter-spacing: .3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: -5px 0 22px rgba(30, 26, 77, .22);
  transition: padding-right .25s ease, box-shadow .25s ease;
}

.qe-tab:hover {
  padding-right: 15px;
  box-shadow: -7px 0 28px rgba(30, 26, 77, .3);
}

.qe-tab i {
  text-orientation: upright;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.qe-panel {
  position: fixed;
  right: 0;
  top: 0;
  height: 100%;
  width: 390px;
  max-width: calc(100vw - 18px);
  background: #fff;
  box-shadow: -14px 0 60px rgba(20, 16, 58, .28);
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  z-index: 1041;
}

.qe-panel.is-open {
  transform: translateX(0);
}

.qe-panel-header {
  position: relative;
  flex-shrink: 0;
  padding: 30px 26px 26px;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 60%, var(--blue-accent) 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  overflow: hidden;
}

.qe-panel-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% -20%, rgba(244, 123, 32, .35) 0%, transparent 55%);
  pointer-events: none;
}

.qe-eyebrow {
  position: relative;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--gold-light);
}

.qe-panel-header h3 {
  position: relative;
  margin: 6px 0 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
}

.qe-panel-header p {
  position: relative;
  margin: 6px 0 0;
  font-size: .8rem;
  color: rgba(255, 255, 255, .68);
  max-width: 260px;
}

.qe-close {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}

.qe-close:hover {
  background: rgba(255, 255, 255, .22);
}

.qe-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 26px 28px;
}

.qe-alert {
  border-radius: 12px;
  padding: 11px 15px;
  font-size: .82rem;
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.4;
}

.qe-alert.is-success {
  background: #e3f7ea;
  color: #1f8a45;
}

.qe-alert.is-error {
  background: #ffe9e9;
  color: #c0392b;
}

.qe-field {
  margin-bottom: 16px;
}

.qe-field label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.qe-field input,
.qe-field select,
.qe-field textarea {
  width: 100%;
  border: 1px solid #e1def0;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: .88rem;
  font-family: inherit;
  color: #2c2a45;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.qe-field input:focus,
.qe-field select:focus,
.qe-field textarea:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(46, 49, 146, .12);
}

.qe-field textarea {
  resize: vertical;
  min-height: 60px;
}

.qe-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.qe-captcha-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f7f6fb;
  border: 1px dashed #d9d5ec;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.qe-captcha-question {
  font-weight: 700;
  color: var(--navy);
  font-size: .9rem;
  letter-spacing: .2px;
}

.qe-captcha-refresh {
  border: none;
  background: none;
  color: var(--blue-accent);
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform .35s ease;
}

.qe-captcha-refresh:hover {
  transform: rotate(180deg);
}

.qe-captcha-refresh:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.qe-submit {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 9px 0;
  margin-top: 4px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  font-weight: 700;
  font-size: .84rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.qe-submit i {
  font-size: .82rem;
}

.qe-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(30, 26, 77, .3);
}

.qe-submit:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.qe-privacy {
  text-align: center;
  font-size: .74rem;
  color: #9b96b8;
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Hides the chatbot launcher (assets/css/chatbot-widget.css) while this
   panel is open — both float in the bottom-right corner, and the chatbot's
   higher z-index otherwise lets it render on top of this panel's content. */
.ss-chatbot.qe-panel-open {
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

@media (max-width: 480px) {
  .qe-tab span {
    font-size: .76rem;
  }

  .qe-panel-header {
    padding: 24px 20px 20px;
  }

  .qe-panel-body {
    padding: 20px 20px 24px;
  }
}
