/*
  Prototype only: normal horizontal site menu + lateral region selector.
  This file is intentionally scoped by the body class added from
  regional-horizontal-prototype.js.
*/

body.regional-horizontal-prototype .site-header .nav-wrap {
  display: flex !important;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 1.4rem !important;
}

body.regional-horizontal-prototype .site-header .brand {
  order: 1 !important;
  grid-area: auto !important;
  justify-self: auto !important;
}

body.regional-horizontal-prototype .site-header .menu-toggle {
  display: none !important;
}

body.regional-horizontal-prototype .site-header .top-nav {
  display: flex !important;
  visibility: visible !important;
  order: 2 !important;
  margin-left: auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
}

body.regional-horizontal-prototype .site-header .top-nav-links {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: clamp(0.35rem, 1.2vw, 1rem) !important;
}

body.regional-horizontal-prototype .site-header .top-nav-link {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 2.5rem;
  padding: 0.45rem 0.55rem;
  color: #1a1a1a;
  font-size: clamp(0.86rem, 0.72vw, 0.98rem);
  font-weight: 500;
}

body.regional-horizontal-prototype .regional-top-menu-toggle {
  display: none;
}

body.regional-horizontal-prototype .site-header .cta-nav {
  display: none !important;
}

body.regional-horizontal-prototype .region-switcher {
  display: none !important;
}

body.regional-horizontal-prototype {
  padding-left: clamp(66px, 6.5vw, 82px);
}

.regional-context-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 96;
  width: clamp(66px, 6.5vw, 82px);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.15rem 0.38rem;
  pointer-events: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.regional-context-drawer__rail-list {
  display: flex;
  flex-direction: column;
  gap: clamp(0.8rem, 1.7vh, 1.05rem);
  width: 100%;
  align-items: center;
  justify-content: center;
}

.regional-context-drawer__rail-item {
  display: grid;
  place-items: center;
  position: relative;
  width: calc(100% - 10px);
  min-height: 6.25rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: transparent;
  font-size: 0;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
}

.regional-context-drawer__rail-item {
  writing-mode: horizontal-tb;
}

.regional-context-drawer__rail-item::before {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
  white-space: nowrap;
  color: #1a1a1a;
  font-size: clamp(0.76rem, 1.26vw, 0.86rem);
  line-height: 1;
}

.regional-context-drawer__rail-item:hover {
  border-color: rgba(226, 0, 0, 0.32);
  background: #ffffff;
}

.regional-context-drawer__rail-item.is-current {
  border-color: rgba(226, 0, 0, 0.34);
  background: rgba(226, 0, 0, 0.06);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.regional-context-drawer__rail-item.is-current::before {
  color: #1a1a1a;
  font-weight: 800;
}

.regional-context-drawer__rail-item.is-renewable {
  border-color: rgba(34, 139, 80, 0.52);
  background: linear-gradient(135deg, #2f8f55 0%, #216a3f 100%);
  box-shadow: 0 10px 24px rgba(33, 106, 63, 0.18);
}

.regional-context-drawer__rail-item.is-renewable::before {
  color: #ffffff;
  font-weight: 800;
}

.regional-context-drawer__rail-item.is-renewable:hover {
  border-color: rgba(29, 112, 67, 0.72);
  background: linear-gradient(135deg, #267a48 0%, #1b5735 100%);
}

@media (max-width: 980px) {
  body.regional-horizontal-prototype .site-header .nav-wrap {
    gap: 0.7rem !important;
  }

  body.regional-horizontal-prototype .site-header .brand img {
    width: min(190px, 38vw);
  }

  body.regional-horizontal-prototype .site-header .top-nav {
    overflow-x: auto;
    justify-content: flex-start !important;
  }

  body.regional-horizontal-prototype .site-header .top-nav-links {
    min-width: max-content;
  }
}

@media (max-width: 640px) {
  body.regional-horizontal-prototype {
    padding-left: 42px;
  }

  body.regional-horizontal-prototype .site-header .nav-wrap {
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.45rem !important;
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
  }

  body.regional-horizontal-prototype .site-header .brand {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  body.regional-horizontal-prototype .site-header .brand img {
    width: min(156px, 45vw);
  }

  body.regional-horizontal-prototype .regional-top-menu-toggle {
    order: 2 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    padding: 0.4rem 0.72rem;
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 999px;
    background: #ffffff;
    color: #1a1a1a;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
  }

  body.regional-horizontal-prototype .site-header .top-nav {
    order: 3 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    display: none !important;
    min-height: 0 !important;
    margin-left: 0 !important;
    padding-bottom: 0;
    overflow: visible;
  }

  body.regional-horizontal-prototype .site-header .top-nav.is-expanded {
    display: block !important;
    visibility: visible !important;
  }

  body.regional-horizontal-prototype .site-header .top-nav-links {
    position: static !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 0.2rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  }

  body.regional-horizontal-prototype .site-header .top-nav-link {
    width: 100%;
    min-height: 2.1rem;
    padding: 0.42rem 0.55rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
  }

  body.regional-horizontal-prototype .site-header .top-nav-link:hover {
    background: rgba(15, 23, 42, 0.05);
  }

  .regional-context-drawer {
    top: 4.75rem;
    width: 42px;
    min-height: 0;
    padding: 0.45rem 0.12rem;
  }

  .regional-context-drawer__rail-list {
    gap: 0.54rem;
  }

  .regional-context-drawer__rail-item {
    width: calc(100% - 6px);
    min-height: 4.45rem;
  }

  .regional-context-drawer__rail-item::before {
    font-size: 0.58rem;
    letter-spacing: 0.01em;
  }
}

.site-floating-whatsapp {
  position: fixed;
  right: clamp(1rem, 2.2vw, 2rem);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 5.75rem);
  z-index: 110;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: #ffffff url("https://hub.steammasterglobal.com/images/whatsapp-logo.png") center / 88% no-repeat;
  box-shadow: 0 10px 28px rgba(18, 140, 74, 0.3);
  animation: regional-whatsapp-pulse 2s ease-in-out infinite;
}

.site-floating-whatsapp:hover {
  transform: translateY(-2px) scale(1.04);
}

.site-floating-whatsapp:focus-visible {
  outline: 3px solid rgba(37, 211, 102, 0.45);
  outline-offset: 3px;
}

@keyframes regional-whatsapp-pulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(18, 140, 74, 0.3), 0 0 0 0 rgba(37, 211, 102, 0.38); }
  50% { box-shadow: 0 12px 32px rgba(18, 140, 74, 0.36), 0 0 0 12px rgba(37, 211, 102, 0); }
}

@media (max-width: 640px) {
  .site-floating-whatsapp {
    width: 3.25rem;
    height: 3.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-floating-whatsapp {
    animation: none;
  }
}
