/* ==========================================================================
   SOMA SHC — Native UI styles (replaces Elementor JS runtime styles)
   ========================================================================== */

/* Prevent any Elementor entrance-animation elements from remaining hidden */
.elementor-invisible {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Native accessible modal / popup overlay (matches #elementor-popup-modal-{ID} rules 100%) */
.soma-popup-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.soma-popup-modal.is-open {
  display: flex !important;
  animation: somaFadeIn 0.2s ease-out;
}

/* CRITICAL: override pro-css-conditionals-popup.css hiding [data-elementor-type="popup"] */
.soma-popup-modal.is-open [data-elementor-type="popup"] {
  display: block !important;
  width: 100% !important;
}

.soma-popup-modal .dialog-widget-content {
  position: relative;
  max-width: min(96vw, 100%);
  max-height: 92vh;
  margin: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.soma-popup-modal .dialog-message {
  display: block !important;
  max-height: 92vh;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.soma-popup-modal .dialog-close-button {
  position: absolute !important;
  z-index: 9999 !important;
  cursor: pointer;
  text-decoration: none;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  line-height: 1;
}

.soma-popup-modal[data-popup-id="2667"] {
  align-items: stretch !important;
  justify-content: flex-end !important;
  padding: 0 !important;
}

.soma-popup-modal[data-popup-id="2667"] .dialog-widget-content {
  max-height: 100vh;
  height: 100vh;
  margin: 0;
  border-radius: 0;
  max-width: min(420px, 90vw);
  width: 100%;
}

.soma-popup-modal[data-popup-id="2667"] .dialog-message {
  width: 100% !important;
  max-height: 100vh;
  height: 100%;
}

body.soma-modal-open {
  overflow: hidden;
}

/* Desktop nav menu dropdowns */
.elementor-nav-menu--main .menu-item-has-children {
  position: relative;
}

.elementor-nav-menu--main .menu-item-has-children > .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  z-index: 999;
  padding: 6px 0;
  list-style: none;
  margin: 0;
}

.elementor-nav-menu--main .menu-item-has-children:hover > .sub-menu,
.elementor-nav-menu--main .menu-item-has-children:focus-within > .sub-menu,
.elementor-nav-menu--main .menu-item-has-children.is-open > .sub-menu {
  display: block;
}

.elementor-nav-menu--main .sub-menu a {
  display: block;
  padding: 10px 18px;
  white-space: nowrap;
}

/* Mobile menu sub-menus inside popup 2667 */
.soma-popup-modal[data-popup-id="2667"] .elementor-nav-menu--dropdown {
  display: block !important;
  max-height: none !important;
  transform: none !important;
}

.soma-popup-modal[data-popup-id="2667"] .elementor-menu-toggle {
  display: none !important;
}

.soma-popup-modal[data-popup-id="2667"] .sub-menu {
  display: block;
  padding-left: 16px;
}

/* Tabs */
.elementor-tabs .elementor-tab-content {
  display: none;
}

.elementor-tabs .elementor-tab-content.elementor-active {
  display: block;
}

.elementor-tabs .elementor-tab-title {
  cursor: pointer;
}

/* Accordions & Toggles */
.elementor-accordion .elementor-tab-title,
.elementor-toggle .elementor-tab-title {
  cursor: pointer;
}

.elementor-accordion .elementor-tab-content,
.elementor-toggle .elementor-tab-content {
  display: none;
}

.elementor-accordion .elementor-tab-content.elementor-active,
.elementor-toggle .elementor-tab-content.elementor-active {
  display: block;
}

.elementor-accordion .elementor-tab-title .elementor-accordion-icon-opened,
.elementor-toggle .elementor-tab-title .elementor-toggle-icon-opened {
  display: none;
}

.elementor-accordion .elementor-tab-title.elementor-active .elementor-accordion-icon-opened,
.elementor-toggle .elementor-tab-title.elementor-active .elementor-toggle-icon-opened {
  display: inline-block;
}

.elementor-accordion .elementor-tab-title.elementor-active .elementor-accordion-icon-closed,
.elementor-toggle .elementor-tab-title.elementor-active .elementor-toggle-icon-closed {
  display: none;
}

/* Standardized form feedback */
.soma-hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.soma-form-status {
  width: 100%;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
}

.soma-form-status[hidden] {
  display: none;
}

.soma-form-status.is-success {
  background: #ecf7df;
  border: 1px solid #79872b;
  color: #213008;
}

.soma-form-status.is-error {
  background: #fdecec;
  border: 1px solid #c62828;
  color: #7f1d1d;
}

/* Sticky header polish */
header[data-elementor-type="header"] {
  position: relative;
  z-index: 1000;
}

header[data-elementor-type="header"] .elementor-section[data-settings*="sticky"] {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Schedule tables responsive horizontal scroll on small viewports */
.elementor-widget-html table {
  max-width: 100%;
}

@media (max-width: 767px) {
  .elementor-widget-html {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .soma-popup-dialog {
    max-height: 94vh;
    border-radius: 6px;
  }
}

/* Fix typo from legacy snippet 3201 */
.activity:hover {
  background-color: #ecfbb5;
  color: #002410;
  font-weight: 500;
}

/* Slides fallback (if any swiper/slides widget is present) */
.elementor-slides .swiper-slide {
  display: none;
}
.elementor-slides .swiper-slide.soma-slide-active {
  display: block;
}

@keyframes somaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
