/* Interaction geometry is shared by both themes. */
.nav-services.is-menu-enhanced > .nav-dropdown {
  transform: translate(-50%, 0);
  transition: none;
}

.nav-services.is-menu-enhanced[open] > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-services.is-menu-enhanced:not([open]) > .nav-dropdown {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nav-services.is-menu-enhanced :is(.services-mega-panel, .services-mega-item) {
  animation: none !important;
}

.nav-services.is-menu-enhanced .services-mega-panel[hidden] {
  display: none;
}

.nav-services.is-menu-enhanced .services-mega-tabs button {
  transform: none;
}

html[data-theme="light"] .services-mega-tabs button.active span {
  color: var(--text);
}

html[data-theme="light"] #menuToggle[aria-expanded="true"] {
  color: var(--text) !important;
}

html[data-theme="light"] #menuToggle .menu-toggle-icon i {
  background: var(--text) !important;
}

html[data-theme] :is(.nav-services > summary, .services-mega-tabs button, .services-mega-item,
  .button, .theme-toggle, .menu-toggle, .plan-advisor-close, [data-plan-advisor-open],
  [data-config-card] button, [data-duration], .addon-action button):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

html[data-theme] :is(.services-mega-item, .services-mega-tabs button):focus-visible {
  outline-offset: -3px;
}

html[data-theme][data-theme] .configurator-section.configurator-section .duration-row.plan-periods button:focus-visible {
  outline: 2px solid var(--cyan) !important;
  outline-offset: 2px !important;
}

html[data-theme][data-theme] :is(.menu-toggle, .theme-toggle, .plan-advisor-close,
  [data-config-card] button, [data-duration], .addon-action button, .vps-addon-action button):not(:disabled):active {
  transform: none !important;
}

:is(.button, [data-config-card] button, [data-duration], .addon-action button,
  .vps-addon-action button, [data-plan-advisor-open], .plan-advisor-close):enabled:active {
  filter: brightness(.94);
}

:is(button, input, select, textarea):disabled {
  cursor: not-allowed;
}

.plan-advisor-dialog {
  overscroll-behavior: contain;
  overflow-x: hidden;
  overflow-y: auto;
}

.is-minecraft-calculator :is(.mc-advisor-types, .mc-advisor-loads) label {
  position: relative;
}

html[data-theme] .is-minecraft-calculator :is(.mc-advisor-types, .mc-advisor-loads) input[type="radio"] {
  display: block !important;
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

html[data-theme] .is-minecraft-calculator :is(.mc-advisor-types, .mc-advisor-loads) input:focus-visible + span {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

html {
  scrollbar-gutter: stable;
}

/* Keep both desktop dropdowns out of the navigation flow until the mobile breakpoint. */
@media (min-width: 761px) {
  .nav-services.is-menu-enhanced > .services-mega {
    max-height: calc(100dvh - 94px);
  }

  .nav-services.is-menu-enhanced > .nav-more-dropdown {
    position: fixed;
    top: 74px;
    width: min(760px, calc(100vw - 40px));
    margin-top: 0;
    max-height: calc(100dvh - 94px);
    overflow-y: auto;
  }
}

@media (min-width: 761px) and (max-width: 1080px) {
  .nav-services.is-menu-enhanced > .nav-dropdown {
    top: 126px;
    max-height: calc(100dvh - 146px);
  }
}

@media (max-width: 760px) {
  .nav-links {
    width: min(380px, calc(100vw - 16px));
    padding: 60px 12px max(20px, env(safe-area-inset-bottom));
    flex-wrap: nowrap;
    overscroll-behavior: contain;
    transition: transform .2s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .2s;
  }

  .nav-links.open {
    transition-delay: 0s;
  }

  .nav-services.is-menu-enhanced > .nav-dropdown {
    position: static;
    width: 100%;
    max-height: none;
    transform: none;
  }

  .nav-services.is-menu-enhanced .services-mega-tabs button {
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
    padding: 8px 6px;
    gap: 8px;
    min-height: 44px;
  }

  .nav-services.is-menu-enhanced .services-mega-tabs button .ui-icon {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
  }

  .nav-links > a,
  .nav-services > summary { min-height: 44px; }

  .nav-services.is-menu-enhanced .services-mega-tabs { position: static; }
  .nav-services.is-menu-enhanced .services-mega-panels { min-height: 0; }
  .nav-services.is-menu-enhanced .services-mega-panel { padding: 0 12px; }
  .nav-services.is-menu-enhanced .services-mega-panel > header,
  .nav-services.is-menu-enhanced .nav-more-head { display: none; }
  .nav-links .nav-more-grid { padding-inline: 12px; }
  .nav-links .nav-more-grid .services-mega-item {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 13px 3px;
  }
  .nav-links .services-mega-item { align-items: center; }
  .nav-links .services-mega-item strong { font-size: 13px; }
  .nav-links .services-mega-item small { font-size: 11px; line-height: 1.5; }

  .nav-services.is-menu-enhanced .services-mega-tabs button > span {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: normal;
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
  }

  .nav-backdrop {
    transform: none !important;
  }
}

@media (max-width: 700px) {
  .plan-advisor-modal .mc-advisor-player-input label {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
  }

  .plan-advisor-modal .mc-advisor-player-input label input {
    width: 100%;
    min-width: 0;
  }

  .plan-advisor-modal .mc-advisor-player-input label > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

.ddos-value-content { min-width: 0; }
.webfarm-ddos-mobile { display: none; }

@media (max-width: 760px) {
  .webfarm-ddos-scroll { overflow-x: visible; margin-top: 28px; }
  .webfarm-ddos-table { display: none; }
  .webfarm-ddos-mobile { display: block; }
  .webfarm-ddos-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-bottom: 20px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; }
  .webfarm-ddos-tabs button { min-width: 0; min-height: 44px; padding: 10px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
  .webfarm-ddos-tabs button[aria-selected="true"] { background: #087c90; color: #fff; }
  .webfarm-ddos-tabs button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
  .webfarm-ddos-mobile [hidden] { display: none !important; }
  .webfarm-ddos-mobile dl { margin: 0; }
  .webfarm-ddos-mobile dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .webfarm-ddos-mobile dt { color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.6; }
  .webfarm-ddos-mobile dd { min-width: 0; margin: 0; color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; }
  .webfarm-ddos-mobile dl > .is-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .webfarm-ddos-mobile ul { display: grid; gap: 8px; margin: 0; padding-left: 18px; }
}

@media (max-width: 620px) {
  .footer .footer-col-legal { display: none; }
  .footer .footer-columns { gap: 16px; }
  .footer .footer-col h4 { font-size: 11px; }
  .footer .footer-col a { width: 100%; font-weight: 500; }
  .footer .footer-bottom { margin-top: 16px; padding-top: 12px; }
  html[data-theme] .footer .footer-socials a {
    min-height: 44px;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none;
  }
  .footer .footer-legal {
    gap: 4px;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.6;
  }
  .footer .footer-legal > div { gap: 24px; text-transform: none; }
  .footer .footer-legal a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within, html, body, .config-card-grid {
    scroll-behavior: auto !important;
  }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}
