/* Venstar NavbarTop — estilos vanilla (prefijo vs-nav-) */

:root {
  --vs-nav-bg: #000;
  --vs-nav-text: #fff;
  --vs-nav-ice: #f7f7f7;
  --vs-nav-gray-700: #3e3e3e;
  --vs-nav-gray-300: #858585;
  --vs-nav-wifi-header: #264059;
  --vs-nav-nonwifi-header: #9e9e9d;
  --vs-nav-nonwifi-bg: #e2e2e2;
  --vs-nav-z: 50;
  --vs-nav-panel-z: 30;
}

body.vs-nav-body-lock {
  overflow: hidden;
}

#venstar-navbar-top.vs-nav {
  position: relative;
  width: 100%;
  z-index: var(--vs-nav-z);
  background: var(--vs-nav-bg);
  color: var(--vs-nav-text);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 15px;
  box-sizing: border-box;
}

#venstar-navbar-top.vs-nav *,
#venstar-navbar-top.vs-nav *::before,
#venstar-navbar-top.vs-nav *::after {
  box-sizing: border-box;
}

.vs-nav__inner {
  max-width: 100%;
  margin: 0 auto;
  padding-left: 5vw;
  padding-right: 5vw;
}

@media (min-width: 1024px) {
  .vs-nav__inner {
    padding-left: 3.75rem;
    padding-right: 3.75rem;
  }
}

.vs-nav__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
}

@media (min-width: 1024px) {
  .vs-nav__bar {
    justify-content: space-around;
  }
}

.vs-nav__mobile-btn {
  display: block;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

@media (min-width: 1024px) {
  .vs-nav__mobile-btn {
    display: none;
  }
}

.vs-nav__mobile-btn:hover {
  color: #d1d5db;
}

/* Un solo icono visible: hamburguesa cerrado, X abierto */
.vs-nav__mobile-btn [data-icon-close] {
  display: none;
}

.vs-nav--mobile-open .vs-nav__mobile-btn [data-icon-menu] {
  display: none;
}

.vs-nav--mobile-open .vs-nav__mobile-btn [data-icon-close] {
  display: block;
}

.vs-nav__icon {
  width: 1.5rem;
  height: 1.5rem;
}

.vs-nav__logo-link {
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
}

.vs-nav__logo-wrap {
  position: relative;
  width: 120px;
  height: 40px;
}

@media (min-width: 768px) {
  .vs-nav__logo-wrap {
    width: 92px;
    height: 17px;
  }
}

.vs-nav__logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.vs-nav__desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .vs-nav__desktop {
    display: flex;
  }
}

.vs-nav__link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}

.vs-nav__link:hover {
  color: #d1d5db;
}

.vs-nav__dropdown {
  position: relative;
}

.vs-nav__auth {
  display: none;
  align-items: center;
}

@media (min-width: 1024px) {
  .vs-nav__auth {
    display: flex;
  }
}

.vs-nav__auth a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.vs-nav__auth a:hover {
  color: #d1d5db;
}

/* Paneles mega-menú */
.vs-nav-panel {
  position: absolute;
  left: 0;
  top: 3rem;
  width: 100%;
  background: var(--vs-nav-ice);
  z-index: var(--vs-nav-panel-z);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.vs-nav-panel--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.vs-nav-panel--thermostat {
  height: 75vh;
  overflow-x: hidden;
}

.vs-nav-panel--apps {
  height: auto;
  min-height: 30vh;
  padding: 2vh 2vw 3vh 2vw;
}

.vs-nav-panel__flex {
  display: flex;
  height: 100%;
  width: 100%;
}

.vs-nav-panel__wifi {
  flex-shrink: 0;
  width: 62%;
  padding: 2vh 1.5vw;
}

.vs-nav-panel__nonwifi {
  flex-shrink: 0;
  flex-grow: 1;
  background: var(--vs-nav-nonwifi-bg);
  padding: 2vh 1.5vw;
}

.vs-nav-section-label {
  width: fit-content;
  margin: 0 auto 1.5vh;
  padding: 0.5vh 0.5vw;
  font-weight: 700;
  font-size: 1vw;
  line-height: 1.2;
}

.vs-nav-section-label--wifi {
  background: var(--vs-nav-wifi-header);
  color: #fff;
}

.vs-nav-section-label--nonwifi {
  background: var(--vs-nav-nonwifi-header);
  color: #fff;
}

.vs-nav-grid {
  display: grid;
  gap: 1vw;
  width: fit-content;
  margin: 0 auto;
  justify-items: center;
}

.vs-nav-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.vs-nav-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Tarjetas termostato */
.vs-nav-thermo-card {
  display: block;
  width: 16vw;
  max-width: 380px;
  height: 32vh;
  padding: 1rem 0.2vw;
  background: #fff;
  box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #000;
  cursor: pointer;
}

.vs-nav-thermo-card:hover {
  text-decoration: none;
  color: #000;
}

.vs-nav-thermo-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.vs-nav-thermo-card__body--start {
  justify-content: flex-start;
}

.vs-nav-thermo-card__body--between {
  justify-content: space-between;
}

.vs-nav-thermo-card__title--colortouch {
  font-weight: 600;
  line-height: 1;
  font-size: 2vw;
  color: var(--vs-nav-gray-700);
}

.vs-nav-thermo-card__title--colortouch .c-blue { color: #3b82f6; }
.vs-nav-thermo-card__title--colortouch .c-green { color: #22c55e; }
.vs-nav-thermo-card__title--colortouch .c-purple { color: #a855f7; }
.vs-nav-thermo-card__title--colortouch .c-orange { color: #f97316; }
.vs-nav-thermo-card__title--colortouch .c-red { color: #ef4444; }

.vs-nav-thermo-card__title--dark {
  font-weight: 900;
  text-transform: uppercase;
  color: var(--vs-nav-wifi-header);
  font-size: 1.2vw;
  line-height: 1;
}

.vs-nav-thermo-card__title--gray {
  font-weight: 600;
  color: #3d3d3b;
  font-size: 2vw;
  line-height: 1;
}

.vs-nav-thermo-card__title--dark .light {
  font-weight: 400;
  text-transform: capitalize;
}

.vs-nav-thermo-card__desc {
  color: #3d3d3b;
  font-size: 0.7vw;
}

.vs-nav-thermo-card__img {
  width: 70%;
  max-height: 12vh;
  margin-top: auto;
  margin-bottom: auto;
  transition: transform 0.3s ease;
}

.vs-nav-thermo-card__img--hover {
  transform: scale(1.2);
}

.vs-nav-thermo-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.vs-nav-thermo-card__img--scaled img {
  transform: scale(1.25);
}

.vs-nav-thermo-card__badge {
  height: 2vh;
  width: auto;
}

.vs-nav-thermo-card__badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Apps panel */
.vs-nav-apps {
  display: flex;
  flex-direction: column;
  gap: 1vh;
  max-width: 1600px;
  margin: 0 auto;
}

.vs-nav-apps__images {
  display: flex;
  gap: 1vw;
  justify-content: center;
  align-items: flex-end;
}

.vs-nav-apps__img-slot {
  width: 9vw;
  display: flex;
  justify-content: center;
}

.vs-nav-apps__img-slot img {
  max-height: 10vh;
  object-fit: contain;
}

.vs-nav-apps__text-row {
  display: flex;
  gap: 1vw;
  justify-content: center;
}

.vs-nav-app-item {
  width: 9vw;
  padding: 0 0.2vw;
  text-align: center;
  text-decoration: none;
  color: #000;
  cursor: pointer;
}

.vs-nav-app-item:hover {
  text-decoration: none;
  color: #000;
}

.vs-nav-app-item h2 {
  font-size: 20px;
  margin: 0 0 0.3vh;
  font-weight: 700;
}

.vs-nav-app-item p {
  font-size: 14px;
  margin: 0;
}

/* Búsqueda */
.vs-nav-search-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  width: 20rem;
  background: var(--vs-nav-ice);
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.vs-nav-search-dropdown.vs-nav-panel--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.vs-nav-search-dropdown input {
  width: 100%;
  padding: 0.5rem;
  border: 2px solid #d1d5db;
  border-radius: 0.375rem;
  color: #000;
  outline-color: #bfdbfe;
}

.vs-nav-search__title {
  font-weight: 700;
  margin: 1rem 0 0.5rem;
  padding-left: 0.5rem;
  color: #000;
  font-size: 1.125rem;
}

.vs-nav-search__list {
  padding: 0 0 0 1.5rem;
  color: #000;
}

.vs-nav-search__link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #000;
  text-decoration: none;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.vs-nav-search__empty {
  padding: 1rem 0 1rem 1.5rem;
  color: #000;
  font-size: 1.125rem;
}

.vs-nav-search__empty[hidden],
.vs-nav-search__results[hidden] {
  display: none !important;
}

/* Menú móvil */
.vs-nav-mobile {
  position: fixed;
  left: 0;
  top: 50px;
  width: 100%;
  height: 0;
  overflow: hidden;
  background: #000;
  z-index: 100;
  padding: 0 1.75rem;
  transition: height 0.2s linear;
}

.vs-nav-mobile--open {
  height: calc(100vh - 50px);
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  overflow-y: auto;
}

.vs-nav-mobile a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  margin-bottom: 1.25rem;
  cursor: pointer;
}

.vs-nav__spacer-mobile {
  display: block;
}

@media (min-width: 1024px) {
  .vs-nav__spacer-mobile {
    display: none;
  }
}
