/* ============================================================
   WORKSHOP ENQUIRY COMPONENT  -  CSS
   Reusable across all pages. Uses site design tokens.
   ============================================================ */

/* ---- Overlay / Modal ---- */
.wq-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wq-overlay.wq-open {
  display: flex;
}

.wq-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(6, 26, 54, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: wqFadeIn 0.3s ease;
}

@keyframes wqFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes wqSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes wqPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
}

@keyframes wqSidebarPulse {

  0%,
  100% {
    transform: translateY(-50%);
  }

  50% {
    transform: translateY(-50%) translateX(-3px);
  }
}

/* ---- Modal Dialog ---- */
.wq-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 520px);
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 32px 64px rgba(6, 26, 54, 0.28);
  animation: wqSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.wq-dialog::-webkit-scrollbar {
  width: 5px;
}

.wq-dialog::-webkit-scrollbar-thumb {
  background: rgba(15, 45, 92, 0.15);
  border-radius: 999px;
}

/* ---- Modal Header ---- */
.wq-modal-header {
  position: relative;
  background: #004e6f;
  padding: 1.4rem 1.5rem 1.2rem;
  border-radius: 20px 20px 0 0;
  text-align: center;
  color: #fff;
}

.wq-modal-header img {
  height: 15%;
  margin: 0 auto 0.6rem;
  display: block;
  background-color: #ffffff !important;
  padding: 10px;
  border-radius: 5%;

  /* filter: brightness(0) invert(1); */
}

.wq-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wq-modal-header p {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
}

.wq-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.wq-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ---- Form Body ---- */
.wq-form-body {
  padding: 1.3rem 1.5rem 1.5rem;
}

/* ---- Form Fields ---- */
.wq-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.wq-field {
  margin-bottom: 0.85rem;
}

.wq-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f2d5c;
  margin-bottom: 0.3rem;
}

.wq-field label .wq-req {
  color: #e74c3c;
  margin-left: 2px;
}

.wq-field input[type="text"],
.wq-field input[type="email"],
.wq-field input[type="tel"] {
  width: 100%;
  border: 1.5px solid rgba(15, 45, 92, 0.14);
  background: #f7faff;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
  color: #061a36;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.wq-field input:focus {
  border-color: #1d5bbf;
  box-shadow: 0 0 0 3px rgba(29, 91, 191, 0.1);
}

.wq-field input::placeholder {
  color: #a0b0c4;
}

/* ---- Segmented / Radio Groups ---- */
.wq-segment-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f2d5c;
  margin-bottom: 0.45rem;
}

.wq-segment-label .wq-req {
  color: #e74c3c;
  margin-left: 2px;
}

.wq-segments {
  display: flex;
  gap: 0;
  border: 1.5px solid rgba(15, 45, 92, 0.14);
  border-radius: 10px;
  overflow: hidden;
  background: #f7faff;
}

.wq-segments label {
  flex: 1;
  text-align: center;
  padding: 0.6rem 0.4rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #586981;
  cursor: pointer;
  border-right: 1px solid rgba(15, 45, 92, 0.1);
  transition: background 0.2s, color 0.2s;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wq-segments label:last-child {
  border-right: none;
}

.wq-segments input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wq-segments input:checked+span {
  /* nothing - parent label gets style */
}

.wq-segments label:has(input:checked) {
  background: #0f2d5c;
  color: #fff;
}

/* Fallback for browsers without :has() */
.wq-segments input:checked~span {
  /* handled via JS class fallback */
}

/* ---- Toggle (attended workshops) ---- */
.wq-toggle-group {
  margin-bottom: 0.85rem;
}

.wq-toggle-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wq-toggle-options label {
  flex: 1;
  min-width: 140px;
  text-align: center;
  padding: 0.6rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #586981;
  background: #f7faff;
  border: 1.5px solid rgba(15, 45, 92, 0.14);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.wq-toggle-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wq-toggle-options label:has(input:checked) {
  background: #0f2d5c;
  color: #fff;
  border-color: #0f2d5c;
}

/* ---- Consent Checkbox ---- */
.wq-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1rem;
  cursor: pointer;
}

.wq-consent input[type="checkbox"] {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: #0f2d5c;
  flex-shrink: 0;
  cursor: pointer;
}

.wq-consent span {
  font-size: 0.72rem;
  color: #586981;
  line-height: 1.45;
}

/* ---- Submit Button ---- */
.wq-submit {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #061a36;
  background: linear-gradient(135deg, #f6b41e, #f9c84d);
  box-shadow: 0 8px 24px rgba(246, 180, 30, 0.3);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.01em;
}

.wq-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(246, 180, 30, 0.4);
}

.wq-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ---- Success state ---- */
.wq-success-msg {
  text-align: center;
  padding: 2rem 1.5rem;
}

.wq-success-msg .wq-check-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: #fff;
}

.wq-success-msg h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  color: #0f2d5c;
}

.wq-success-msg p {
  margin: 0;
  color: #586981;
  font-size: 0.88rem;
}

/* ---- Error styling ---- */
.wq-field input.wq-error,
.wq-segments.wq-error,
.wq-toggle-options.wq-error label {
  border-color: #e74c3c !important;
}

.wq-error-text {
  color: #e74c3c;
  font-size: 0.7rem;
  margin-top: 0.2rem;
  display: none;
}

.wq-error-text.wq-show {
  display: block;
}

.wq-form-error {
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.2);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  color: #c0392b;
  margin-bottom: 0.85rem;
  display: none;
}

.wq-form-error.wq-show {
  display: block;
}


/* ============================================================
   SIDEBAR STICKY BUTTON
   ============================================================ */
.wq-sidebar-btn {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 8000;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  /* background: linear-gradient(180deg, #0f2d5c, #1d5bbf); */
  background: #0f2d5c;
  color: #fff;
  border: none;
  border-radius: 12px 0 0 12px;
  padding: 1rem 0.65rem;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: -4px 4px 18px rgba(15, 45, 92, 0.25);
  transition: background 0.25s, box-shadow 0.25s, padding 0.25s;
  animation: wqSidebarPulse 3s ease-in-out infinite;
  animation-delay: 5s;
}

.wq-sidebar-btn:hover {
  background: linear-gradient(180deg, #1d5bbf, #2a6fd8);
  box-shadow: -6px 6px 24px rgba(15, 45, 92, 0.35);
  padding: 1.1rem 0.75rem;
  animation: none;
}

.wq-sidebar-btn span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wq-sidebar-icon {
  font-size: 1.1rem;
  display: inline-block;
  transform: rotate(-90deg);
}


/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */
.wq-whatsapp {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 8000;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  border: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.25s, box-shadow 0.25s;
  animation: wqPulse 2.5s infinite;
}

.wq-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5);
  animation: none;
}

.wq-whatsapp svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}


/* ============================================================
   INLINE FORM SECTION (on-page)
   ============================================================ */
.wq-inline-section {
  background: linear-gradient(135deg, rgba(15, 45, 92, 0.03), rgba(29, 91, 191, 0.06));
  border: 1.5px solid rgba(15, 45, 92, 0.1);
  border-radius: 22px;
  padding: 1.8rem 1.5rem;
  max-width: 560px;
  margin: 0 auto;
}

.wq-inline-section .wq-inline-header {
  text-align: center;
  margin-bottom: 1.2rem;
}

.wq-inline-section .wq-inline-header img {
  height: 44px;
  margin: 0 auto 0.6rem;
  display: block;
}

.wq-inline-section .wq-inline-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f2d5c;
}

.wq-inline-section .wq-inline-header p {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: #586981;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 560px) {
  .wq-dialog {
    width: 100%;
    border-radius: 16px;
    max-height: 88vh;
  }

  .wq-modal-header {
    border-radius: 16px 16px 0 0;
    padding: 1.2rem 1rem 1rem;
  }

  .wq-form-body {
    padding: 1rem;
  }

  .wq-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .wq-segments {
    flex-direction: column;
  }

  .wq-segments label {
    border-right: none;
    border-bottom: 1px solid rgba(15, 45, 92, 0.1);
  }

  .wq-segments label:last-child {
    border-bottom: none;
  }

  .wq-toggle-options {
    flex-direction: column;
  }

  .wq-toggle-options label {
    min-width: auto;
  }

  .wq-sidebar-btn {
    font-size: 0.68rem;
    padding: 0.8rem 0.5rem;
  }

  .wq-whatsapp {
    width: 50px;
    height: 50px;
    bottom: 1rem;
    right: 1rem;
  }

  .wq-whatsapp svg {
    width: 26px;
    height: 26px;
  }

  .wq-inline-section {
    padding: 1.3rem 1rem;
  }
}