/* ==========================================================================
   Elderly Wellness - Professional Booking Modal Styles
   ========================================================================== */

/* Modal Backdrop Overlay */
.ew-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
  box-sizing: border-box;
}

.ew-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Window Container */
.ew-modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  position: relative;
  font-family: inherit;
}

.ew-modal-overlay.active .ew-modal-container {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.ew-modal-header {
  padding: 24px 32px 18px 32px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.ew-modal-title-group {
  padding-right: 32px;
}

.ew-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: rgba(39, 134, 165, 0.1);
  color: #2786a5;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.ew-modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.ew-modal-subtitle {
  margin: 6px 0 0 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.4;
}

/* Close Button */
.ew-modal-close-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #64748b;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  outline: none;
  line-height: 1;
}

.ew-modal-close-btn:hover {
  background-color: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
  transform: rotate(90deg);
}

/* Modal Body */
.ew-modal-body {
  padding: 24px 32px 32px 32px;
  overflow-y: auto;
  flex: 1;
}

/* Form Styles */
.ew-booking-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ew-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
}

.ew-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ew-form-group.full-width {
  grid-column: span 2;
}

.ew-form-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ew-required {
  color: #e11d48;
  font-weight: 700;
  font-size: 14px;
}

.ew-form-control {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: #0f172a;
  background-color: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
}

.ew-form-control:focus {
  background-color: #ffffff;
  border-color: #2786a5;
  box-shadow: 0 0 0 4px rgba(39, 134, 165, 0.15);
}

.ew-form-control::placeholder {
  color: #94a3b8;
}

select.ew-form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2064748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 38px;
  cursor: pointer;
}

textarea.ew-form-control {
  resize: vertical;
  min-height: 80px;
}

/* Checkbox Style */
.ew-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  cursor: pointer;
}

.ew-checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2786a5;
  margin-top: 2px;
  cursor: pointer;
}

.ew-checkbox-label {
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
  cursor: pointer;
}

/* Error validation styling */
.ew-form-control.invalid {
  border-color: #e11d48;
  background-color: #fff1f2;
}

.ew-field-error {
  color: #e11d48;
  font-size: 12px;
  margin-top: 2px;
}

/* Form Actions / Submit Button */
.ew-form-footer {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ew-submit-btn {
  background: linear-gradient(135deg, #2786a5 0%, #1e6b85 100%);
  color: #ffffff;
  border: none;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(39, 134, 165, 0.35);
  width: 100%;
}

.ew-submit-btn:hover {
  background: linear-gradient(135deg, #1e6b85 0%, #175368 100%);
  box-shadow: 0 6px 20px rgba(39, 134, 165, 0.45);
  transform: translateY(-1px);
}

.ew-submit-btn:active {
  transform: translateY(0);
}

.ew-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Spinner Icon */
.ew-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: ew-spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes ew-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success View State */
.ew-success-state {
  text-align: center;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ew-success-icon-wrap {
  width: 72px;
  height: 72px;
  background-color: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px -5px rgba(22, 163, 74, 0.3);
  animation: ew-bounce-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes ew-bounce-in {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.ew-success-title {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 10px 0;
}

.ew-success-desc {
  font-size: 15px;
  color: #475569;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 0 24px 0;
}

.ew-success-details-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  width: 100%;
  max-width: 480px;
  text-align: left;
  margin-bottom: 24px;
}

.ew-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 14px;
}

.ew-detail-row:last-child {
  border-bottom: none;
}

.ew-detail-label {
  color: #64748b;
  font-weight: 500;
}

.ew-detail-value {
  color: #0f172a;
  font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .ew-modal-header {
    padding: 20px 20px 14px 20px;
  }

  .ew-modal-body {
    padding: 20px;
  }

  .ew-form-grid {
    grid-template-columns: 1fr;
  }

  .ew-form-group.full-width {
    grid-column: span 1;
  }

  .ew-modal-title {
    font-size: 20px;
  }
}


/* Floating WhatsApp Button & Clean Bottom Body (Universal) */
body {
  padding-bottom: 0 !important;
}

.ew-mobile-sticky-bottom-bar {
  display: none !important;
}

a.ew-whatsapp-floating-btn,
.ew-whatsapp-floating-btn {
  position: fixed !important;
  bottom: 25px !important;
  left: 25px !important;
  right: auto !important;
  top: auto !important;
  width: auto !important;
  height: 54px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  z-index: 2147483647 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: translate3d(0, 0, 0) !important;
  pointer-events: auto !important;
}

.ew-whatsapp-floating-btn .ew-wa-circle {
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
  min-height: 54px !important;
  border-radius: 50% !important;
  background-color: #49E670 !important;
  box-shadow: 0 4px 16px rgba(73, 230, 112, 0.45) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ew-whatsapp-floating-btn:hover .ew-wa-circle {
  transform: scale(1.08) !important;
  box-shadow: 0 6px 22px rgba(73, 230, 112, 0.65) !important;
}


/* Pricing Teaser Chip Zoom Effect (Light Soft Chip - No Color Shift) */
.pricing-teaser-link {
  color: #2786a5 !important;
  background: #e6f4f8 !important;
  border: 1.5px solid #bce2ed !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  padding: 6px 18px !important;
  border-radius: 20px !important;
  text-decoration: none !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.pricing-teaser-link:hover {
  color: #2786a5 !important;
  background: #e6f4f8 !important;
  border-color: #bce2ed !important;
  transform: scale(1.06) !important;
  box-shadow: 0 4px 14px rgba(39, 134, 165, 0.25) !important;
}


/* ==========================================================================
   TIGHTEN BOTTOM EMPTY SPACES BEFORE FOOTER
   ========================================================================== */
.post-views,
.post-views.content-post {
  margin-top: 12px !important;
  margin-bottom: 14px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.ew-medical-disclaimer {
  margin-top: 16px !important;
  margin-bottom: 20px !important;
}

.single-post #page,
.single-post .site-content,
.single-post #primary,
.single-post .site-main,
.single-post article,
.single-post .inside-article,
.single-post #right-sidebar,
.single-post .inside-right-sidebar {
  padding-bottom: 12px !important;
  margin-bottom: 0 !important;
}

body.single-post footer,
body.single footer,
footer,
footer.site-footer,
footer.row_am {
  margin-top: 24px !important;
}


/* ==========================================================================
   INCREASE POST VIEWS SIZE & ELIMINATE SPACE BELOW DISCLAIMER
   ========================================================================== */
.post-views,
.post-views.content-post {
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  color: #334155 !important;
  background-color: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 20px !important;
  padding: 8px 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 16px !important;
  margin-bottom: 12px !important;
}

.post-views-icon,
.post-views .dashicons {
  font-size: 1.2rem !important;
  color: #2786a5 !important;
  vertical-align: middle !important;
}

.ew-medical-disclaimer {
  margin-top: 16px !important;
  margin-bottom: 8px !important;
}

.single-post #page,
.single-post .site-content,
.single-post #primary,
.single-post .site-main,
.single-post article,
.single-post .inside-article,
.single-post #right-sidebar,
.single-post .inside-right-sidebar,
.single-post .widget-area {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

body.single-post footer,
body.single footer,
footer,
footer.site-footer,
footer.row_am {
  margin-top: 12px !important;
}


/* ==========================================================================
   HIGH CONTRAST TEXT VISIBILITY FIX FOR DARK CTA CARDS & BANNER BOXES
   ========================================================================== */
.ew-blog-cta--app,
.ew-blog-service-card,
.ew-blog-cta {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  border-radius: 16px !important;
  padding: 28px 32px !important;
  color: #ffffff !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25) !important;
  margin: 32px 0 !important;
  box-sizing: border-box !important;
}

.ew-blog-cta--app .ew-blog-cta__eyebrow,
.ew-blog-service-card .ew-blog-cta__eyebrow,
.ew-blog-cta .ew-blog-cta__eyebrow {
  color: #38bdf8 !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  margin-bottom: 8px !important;
  display: block !important;
}

.ew-blog-cta--app .ew-blog-cta__heading,
.ew-blog-cta--app h3,
.ew-blog-cta--app h4,
.ew-blog-service-card .ew-blog-cta__heading,
.ew-blog-service-card h3,
.ew-blog-service-card h4,
.ew-blog-cta h3,
.ew-blog-cta h4 {
  color: #ffffff !important;
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  margin-top: 4px !important;
  margin-bottom: 10px !important;
}

.ew-blog-cta--app .ew-blog-cta__text,
.ew-blog-cta--app p,
.ew-blog-service-card .ew-blog-cta__text,
.ew-blog-service-card p,
.ew-blog-cta p {
  color: #f1f5f9 !important;
  font-size: 1.05rem !important;
  line-height: 1.6 !important;
  margin-bottom: 18px !important;
}

.ew-blog-cta--app .ew-blog-cta__btn,
.ew-blog-service-card .ew-blog-cta__btn,
.ew-blog-cta--app a.btn,
.ew-blog-service-card a.btn,
.ew-blog-cta a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  padding: 12px 24px !important;
  border-radius: 30px !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.ew-blog-cta--app .ew-blog-cta__btn:hover,
.ew-blog-service-card .ew-blog-cta__btn:hover,
.ew-blog-cta a:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.5) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}
