/* =========================================================
   SOLAROCK · GLOBAL DARK/LIGHT TOGGLE
   Desktop + Mobile
   ========================================================= */

.solarock-global-theme-toggle {
  position: relative !important;

  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;

  padding: 0 !important;
  margin: 0 10px 0 0 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;

  cursor: pointer !important;
  overflow: hidden !important;
  flex: 0 0 44px !important;

  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;

  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22) !important;

  transition:
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    transform 0.22s ease !important;

  z-index: 100000 !important;
}

.solarock-global-theme-toggle:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28) !important;
}

.solarock-global-theme-toggle:active {
  transform: scale(0.96) !important;
}

.solarock-global-theme-toggle .solarock-theme-icon {
  position: absolute !important;
  inset: 0 !important;

  display: grid !important;
  place-items: center !important;

  transition:
    opacity 0.28s ease,
    transform 0.32s ease,
    color 0.28s ease !important;
}

.solarock-global-theme-toggle .solarock-theme-icon svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
}

.solarock-global-theme-toggle .solarock-sun-icon {
  color: #F7BB00 !important;
  opacity: 1 !important;
  transform: scale(1) rotate(0deg) !important;
}

.solarock-global-theme-toggle .solarock-moon-icon {
  color: #ffffff !important;
  opacity: 0 !important;
  transform: scale(0.66) rotate(-32deg) !important;
}


/* =========================================================
   SOLAROCK · TOGGLE LIGHT STATE
   En modo claro mostramos botón oscuro + luna blanca
   ========================================================= */

html[data-solarock-theme="light"] .solarock-global-theme-toggle,
body[data-solarock-theme="light"] .solarock-global-theme-toggle {
  background: #111111 !important;
  border-color: rgba(0, 0, 0, 0.18) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10) !important;
}

html[data-solarock-theme="light"] .solarock-global-theme-toggle .solarock-sun-icon,
body[data-solarock-theme="light"] .solarock-global-theme-toggle .solarock-sun-icon {
  opacity: 0 !important;
  transform: scale(0.66) rotate(32deg) !important;
}

html[data-solarock-theme="light"] .solarock-global-theme-toggle .solarock-moon-icon,
body[data-solarock-theme="light"] .solarock-global-theme-toggle .solarock-moon-icon {
  opacity: 1 !important;
  transform: scale(1) rotate(0deg) !important;
  color: #ffffff !important;
}


/* =========================================================
   SOLAROCK · TOGGLE MOBILE
   Logo | Toggle | Hamburguesa
   ========================================================= */

@media (max-width: 921px) {
  .solarock-global-theme-toggle,
  .solarock-global-theme-toggle.solarock-toggle-mobile {
    display: inline-flex !important;

    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;

    padding: 0 !important;
    margin: 0 8px 0 auto !important;

    position: relative !important;
    z-index: 100000 !important;

    align-items: center !important;
    justify-content: center !important;

    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;

    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;

    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22) !important;
    flex: 0 0 42px !important;
  }

  .solarock-global-theme-toggle .solarock-theme-icon svg {
    width: 17px !important;
    height: 17px !important;
  }

  html[data-solarock-theme="light"] .solarock-global-theme-toggle,
  body[data-solarock-theme="light"] .solarock-global-theme-toggle {
    background: #111111 !important;
    border-color: rgba(0, 0, 0, 0.18) !important;
    color: #ffffff !important;
  }

  html[data-solarock-theme="light"] .solarock-global-theme-toggle .solarock-moon-icon,
  body[data-solarock-theme="light"] .solarock-global-theme-toggle .solarock-moon-icon {
    color: #ffffff !important;
  }
}


/* =========================================================
   SOLAROCK · FORZAR ESTRUCTURA MOBILE DEL HEADER
   Usar solo si Astra acomoda raro el toggle
   ========================================================= */

@media (max-width: 921px) {
  .ast-primary-header-bar .ast-builder-grid-row {
    display: grid !important;
    grid-template-columns: auto 1fr auto auto !important;
    align-items: center !important;
    column-gap: 8px !important;
  }

  .site-branding,
  .ast-site-identity {
    grid-column: 1 !important;
  }

  .solarock-global-theme-toggle {
    grid-column: 3 !important;
    margin-left: auto !important;
  }

  .ast-button-wrap {
    grid-column: 4 !important;
  }
}