:root{
  --tmh-accent: #1EC85A;
  --tmh-text: #e5e7eb;
  --tmh-muted: rgba(229,231,235,.75);
}

/* ===== Topbar ===== */
.tmh-topbar{
  position: sticky;
  top: 0;
  z-index: 999;
  background: linear-gradient(135deg, rgba(11,18,32,.88), rgba(15,23,42,.80));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06));
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.tmh-topbar::after{
  content:"";
  display:block;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tmh-accent), transparent);
  background-size: 200% 100%;
  animation: tmh-sheen 6s ease-in-out infinite;
  opacity: .9;
}

@keyframes tmh-sheen{
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 0%; }
  100% { background-position: 0% 0%; }
}

/* ===== Layout ===== */
.tmh-topbar__inner{
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
}

/* Brand */
.tmh-brand{
  display:flex;
  align-items:center;
  gap: 14px;
  text-decoration:none;
  color: var(--tmh-text);
  flex: 0 0 auto;
  min-width: 0;
}

.tmh-brand__logo{
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
}

.tmh-brand__title{
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}
.tmh-brand__title span{ color: var(--tmh-accent); }

.tmh-brand__subtitle{
  font-size: 12px;
  color: var(--tmh-muted);
  margin-top: 2px;
}

/* Search */
.tmh-search{
  flex: 1 1 auto;
  min-width: 0;
}

.tmh-search__field{
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.tmh-search__icon{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(229,231,235,.75);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tmh-search__input{
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 44px 0 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--tmh-text);
  outline: none;
}

.tmh-search__input::placeholder{
  color: rgba(229,231,235,.55);
}

.tmh-search__input:focus{
  border-color: rgba(30,200,90,.60);
  box-shadow: 0 0 0 4px rgba(30,200,90,.12);
}

.tmh-search__kbd{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(229,231,235,.75);
  background: rgba(0,0,0,.25);
  user-select: none;
  pointer-events: none;
}

/* Actions */
.tmh-topbar__actions{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
  position: relative;
  z-index: 10;
}

/* Language */
.tmh-lang-switch,
.tmh-lang-switch--pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color: var(--tmh-text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
}

/* ===== Responsive ===== */
@media (max-width: 640px){
  .tmh-topbar__inner{
    min-height: 64px;
    padding: 10px 14px;
    gap: 10px;
  }
  .tmh-brand__logo{ width: 38px; height: 38px; }
  .tmh-brand__title{ font-size: 18px; }
  .tmh-brand__subtitle{ display:none; }
  .tmh-search__input{ height: 40px; }
}

/* Portrait (vertical): buscador + EN/ES en la MISMA FILA */
@media (max-width: 576px){
  .tmh-topbar__inner{
    flex-wrap: nowrap; /* <-- para que NO baje el botón */
    gap: 8px;
    padding: 10px 12px;
  }

  .tmh-brand__title{
    font-size: 16px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tmh-search__kbd{ display:none !important; }

  .tmh-search__input{
    height: 38px;
    padding-left: 34px;
    padding-right: 10px;
    font-size: 13px;
  }

  .tmh-lang-switch,
  .tmh-lang-switch--pill{
    padding: 7px 9px;
    font-size: 11px;
    letter-spacing: .06em;
  }
}
