.egb-wrap,
.egb-wrap *,
.egb-popup-shortcode,
.egb-popup-shortcode *,
.egb-modal,
.egb-modal *,
.egb-success-modal,
.egb-success-modal * {
  box-sizing: border-box;
}

.egb-wrap,
.egb-popup-shortcode,
.egb-modal,
.egb-success-modal {
  --egb-primary: #1B215E;
  --egb-secondary: #3B72E4;
  --egb-soft: #BFDBFE;
  --egb-text: #172033;
  --egb-muted: #667085;
  --egb-line: rgba(27, 33, 94, .10);
  --egb-card: rgba(255, 255, 255, .88);
  --egb-shadow: 0 24px 70px rgba(27, 33, 94, .12);
  font-family: Inter, "Tajawal", "Cairo", Arial, sans-serif;
}

.egb-wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 30px;
  color: var(--egb-text);
  direction: rtl;
  background:
    radial-gradient(circle at 12% 0%, rgba(191, 219, 254, .50), transparent 32%),
    radial-gradient(circle at 92% 12%, rgba(59, 114, 228, .10), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 68%, rgba(191, 219, 254, .40) 150%);
  border: 1px solid rgba(59, 114, 228, .12);
  border-radius: 30px;
  box-shadow: var(--egb-shadow);
  overflow: hidden;
}

.egb-wrap[dir="ltr"] {
  direction: ltr;
}

.egb-head {
  text-align: center;
  margin-bottom: 22px;
}

.egb-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(191, 219, 254, .48);
  color: var(--egb-primary);
  border: 1px solid rgba(59, 114, 228, .12);
  font-weight: 900;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 10px 24px rgba(27, 33, 94, .05);
}

.egb-head span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--egb-secondary);
  box-shadow: 0 0 0 5px rgba(59, 114, 228, .12);
}

.egb-head h2 {
  margin: 14px 0 8px;
  color: var(--egb-primary);
  font-size: clamp(25px, 4vw, 40px);
  line-height: 1.22;
  font-weight: 950;
  letter-spacing: -.5px;
}

.egb-head p {
  margin: 0 auto;
  max-width: 680px;
  color: var(--egb-muted);
  font-size: 16px;
  line-height: 1.85;
  font-weight: 500;
}

.egb-source-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 16px;
  padding: 11px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(59, 114, 228, .14);
  color: var(--egb-primary);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
  box-shadow: 0 12px 30px rgba(27, 33, 94, .06);
}

.egb-source-pill strong {
  font-weight: 950;
}

.egb-form {
  position: relative;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(27, 33, 94, .08);
  border-radius: 26px;
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 42px rgba(27, 33, 94, .07);
}

.egb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.egb-field {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.egb-full {
  grid-column: 1 / -1;
}

.egb-field label {
  color: var(--egb-primary);
  font-weight: 900;
  font-size: 14px;
  line-height: 1.5;
}

.egb-field label b {
  color: #d92d20;
  font-weight: 950;
}

.egb-field input,
.egb-field select,
.egb-field textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(27, 33, 94, .14);
  background: rgba(255, 255, 255, .94);
  border-radius: 18px;
  padding: 13px 15px;
  color: var(--egb-text);
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .80);
}

.egb-field textarea {
  resize: vertical;
  min-height: 118px;
  line-height: 1.8;
}

.egb-field input::placeholder,
.egb-field textarea::placeholder {
  color: #98a2b3;
}

.egb-field input:focus,
.egb-field select:focus,
.egb-field textarea:focus {
  border-color: rgba(59, 114, 228, .72);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 114, 228, .12), 0 12px 24px rgba(27, 33, 94, .05);
}

.egb-field select:disabled,
.egb-field input:disabled,
.egb-field textarea:disabled {
  background: #f4f7fb;
  color: #8a94a6;
  cursor: not-allowed;
}

.egb-help {
  min-height: 18px;
  color: #7a8597;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 600;
}

.egb-locked-field span {
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1px solid rgba(59, 114, 228, .18);
  background: linear-gradient(135deg, rgba(191, 219, 254, .46), rgba(255, 255, 255, .88));
  border-radius: 18px;
  padding: 13px 15px;
  color: var(--egb-primary);
  font-weight: 950;
  line-height: 1.55;
}

.egb-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 20px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--egb-primary), var(--egb-secondary));
  color: #fff;
  padding: 15px 24px;
  font-size: 16px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(59, 114, 228, .26);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.egb-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(59, 114, 228, .32);
}

.egb-submit:disabled {
  opacity: .72;
  cursor: wait;
  transform: none;
}

.egb-result {
  display: none;
  margin-top: 14px;
  border-radius: 18px;
  padding: 13px 15px;
  line-height: 1.75;
  font-weight: 800;
}

.egb-result.is-loading,
.egb-result.is-error,
.egb-result.is-success {
  display: block;
}

.egb-result.is-loading {
  background: #f4f7fb;
  color: #536071;
  border: 1px solid #e6edf7;
}

.egb-result.is-error {
  background: #fff5f5;
  color: #a42318;
  border: 1px solid #ffd6d6;
}

.egb-result.is-success {
  background: #effdf5;
  color: #126b3a;
  border: 1px solid #c7f3d9;
}

.egb-wa-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #18a558;
  color: #fff !important;
  text-decoration: none;
  font-weight: 900;
}

.egb-alert {
  border-radius: 20px;
  padding: 16px;
  line-height: 1.8;
  font-weight: 850;
}

.egb-alert-error {
  background: #fff5f5;
  color: #a42318;
  border: 1px solid #ffd6d6;
}

.egb-hidden-by-empty {
  display: none !important;
}

.egb-popup-shortcode {
  display: inline-flex;
  max-width: 100%;
  direction: rtl;
}

.egb-popup-shortcode[dir="ltr"] {
  direction: ltr;
}

.egb-popup-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-direction: column;
  max-width: 100%;
  border: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, .22), transparent 32%),
    linear-gradient(135deg, var(--egb-primary), var(--egb-secondary));
  color: #fff;
  padding: 13px 25px;
  font: inherit;
  font-weight: 950;
  line-height: 1.35;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(59, 114, 228, .27);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  text-align: center;
}

.egb-popup-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(59, 114, 228, .33);
  filter: saturate(1.04);
}

.egb-popup-open small {
  display: block;
  font-size: 12px;
  font-weight: 750;
  opacity: .90;
}

body.egb-modal-lock {
  overflow: hidden !important;
}

.egb-modal,
.egb-success-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  direction: rtl;
}

.egb-modal[dir="ltr"],
.egb-success-modal[dir="ltr"] {
  direction: ltr;
}

.egb-modal.is-open,
.egb-success-modal.is-open {
  display: flex;
}

.egb-modal-backdrop,
.egb-success-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 12%, rgba(59, 114, 228, .28), transparent 30%),
    rgba(8, 12, 33, .58);
  backdrop-filter: blur(10px);
}

.egb-modal-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100dvh - 44px);
  overflow: auto;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .28);
  animation: egbPop .20s ease-out;
}

.egb-modal-body {
  padding: 0;
}

.egb-modal .egb-wrap {
  max-width: 100%;
  border: 0;
  border-radius: 32px;
  box-shadow: none;
}

.egb-modal-close,
.egb-success-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(27, 33, 94, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--egb-primary);
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(27, 33, 94, .14);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.egb-modal-close:hover,
.egb-success-close:hover {
  background: #f6f9ff;
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(27, 33, 94, .18);
}

.egb-success-panel {
  position: relative;
  width: min(520px, 100%);
  padding: 38px 28px 28px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 16% 0%, rgba(191, 219, 254, .56), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(59, 114, 228, .14);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .28);
  text-align: center;
  color: var(--egb-text);
  animation: egbSuccess .22s ease-out;
}

.egb-success-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--egb-primary), var(--egb-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 38px rgba(59, 114, 228, .28);
}

.egb-success-icon span {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  font-weight: 950;
}

.egb-success-title {
  margin: 0 0 10px;
  color: var(--egb-primary);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.28;
  font-weight: 950;
  letter-spacing: -.35px;
}

.egb-success-message {
  margin: 0 auto;
  max-width: 420px;
  color: var(--egb-muted);
  font-size: 15px;
  line-height: 1.85;
  font-weight: 600;
}

.egb-success-booking {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 16px auto 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(191, 219, 254, .42);
  color: var(--egb-primary);
  border: 1px solid rgba(59, 114, 228, .14);
  font-size: 13px;
  font-weight: 950;
}

.egb-success-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.egb-success-whatsapp,
.egb-success-done {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 950;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.egb-success-whatsapp {
  border: 0;
  background: linear-gradient(135deg, #18a558, #128c4b);
  color: #fff !important;
  box-shadow: 0 14px 28px rgba(24, 165, 88, .22);
}

.egb-success-done {
  border: 1px solid rgba(27, 33, 94, .12);
  background: #fff;
  color: var(--egb-primary);
  box-shadow: 0 10px 24px rgba(27, 33, 94, .08);
}

.egb-success-whatsapp:hover,
.egb-success-done:hover {
  transform: translateY(-2px);
}

@keyframes egbPop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes egbSuccess {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 700px) {
  .egb-wrap {
    padding: 18px;
    border-radius: 24px;
  }

  .egb-form {
    padding: 16px;
    border-radius: 22px;
  }

  .egb-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .egb-full {
    grid-column: auto;
  }

  .egb-popup-shortcode {
    width: 100%;
  }

  .egb-popup-open {
    width: 100%;
    border-radius: 18px;
    padding: 14px 18px;
  }

  .egb-modal,
  .egb-success-modal {
    padding: 8px;
  }

  .egb-modal {
    align-items: flex-end;
  }

  .egb-modal-panel {
    width: 100%;
    max-height: 94dvh;
    border-radius: 26px 26px 0 0;
  }

  .egb-modal .egb-wrap {
    border-radius: 26px 26px 0 0;
    padding: 20px 14px 14px;
  }

  .egb-modal-close,
  .egb-success-close {
    top: 10px;
    inset-inline-end: 10px;
    width: 40px;
    height: 40px;
    font-size: 26px;
  }

  .egb-head {
    padding-top: 16px;
  }

  .egb-head h2 {
    font-size: 24px;
  }

  .egb-head p {
    font-size: 14px;
  }

  .egb-success-panel {
    border-radius: 28px;
    padding: 34px 18px 20px;
  }

  .egb-success-actions {
    flex-direction: column;
  }

  .egb-success-whatsapp,
  .egb-success-done {
    width: 100%;
  }
}

/* Egessia Smart Booking v1.2.1 - hosting/theme hardening layer */
html.egb-modal-lock,
body.egb-modal-lock {
  overflow: hidden !important;
}

.egb-modal,
.egb-success-modal {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  z-index: 2147483647 !important;
  isolation: isolate !important;
  transform: none !important;
  filter: none !important;
  clip: auto !important;
  clip-path: none !important;
  overflow: hidden !important;
  pointer-events: none !important;
  background: transparent !important;
}

.egb-modal.is-open,
.egb-success-modal.is-open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.egb-modal:not(.is-open),
.egb-success-modal:not(.is-open) {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.egb-modal-backdrop,
.egb-success-backdrop {
  z-index: 0 !important;
  pointer-events: auto !important;
}

.egb-modal-panel,
.egb-success-panel {
  z-index: 1 !important;
  pointer-events: auto !important;
  transform-origin: center center !important;
}

.egb-modal-panel {
  display: block !important;
  max-height: calc(100vh - 44px) !important;
  max-height: calc(100dvh - 44px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
}

.egb-modal-body,
.egb-modal .egb-wrap,
.egb-modal .egb-form {
  width: 100% !important;
  max-width: 100% !important;
}

.egb-modal-close,
.egb-success-close {
  z-index: 3 !important;
  pointer-events: auto !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.egb-popup-shortcode,
.egb-popup-shortcode * {
  max-width: 100%;
}

.egb-wrap {
  overflow: visible;
}

.egb-modal .egb-wrap {
  overflow: visible !important;
}

.egb-form input,
.egb-form select,
.egb-form textarea,
.egb-submit,
.egb-popup-open,
.egb-success-whatsapp,
.egb-success-done {
  appearance: none;
  -webkit-appearance: none;
}

@media (max-width: 700px) {
  .egb-modal,
  .egb-success-modal {
    padding: 8px !important;
  }

  .egb-modal-panel {
    max-height: 96vh !important;
    max-height: 96dvh !important;
  }

  .egb-modal-close {
    position: sticky !important;
    top: 8px !important;
    margin-inline-start: auto !important;
    margin-bottom: -40px !important;
  }
}
