/* ZEN GSM — header nou (izolat de legacy .navbar / .nav-menu) */

.zgs-header {
  --zgs-bar-h: 4rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* backdrop-filter rămâne doar pe bară — altfel `position:fixed` pe foaia mobilă
   e ancorat de header și vede doar o „șipcă” din meniu (Safari / iOS). */
.zgs-header__bar {
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.zgs-header--scrolled .zgs-header__bar {
  background: rgba(15, 23, 42, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.zgs-header__inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(0.75rem, 3vw, 1.5rem);
  min-height: var(--zgs-bar-h);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.4rem, 1.5vw, 1rem);
}

.zgs-header__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  font-family: var(--font-display, "Poppins", system-ui, sans-serif);
  font-weight: 700;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  flex-shrink: 0;
  min-width: 0;
}

.zgs-header__logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.zgs-header__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zgs-header__mobile-quick {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
}

.zgs-header__nav {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.zgs-header__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(0.2rem, 1vw, 0.65rem);
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.zgs-header__list::-webkit-scrollbar {
  display: none;
}

.zgs-header__list > li {
  flex-shrink: 0;
}

.zgs-header__link {
  display: inline-block;
  padding: 0.45rem 0.35rem;
  font-family: var(--font-primary, "Inter", system-ui, sans-serif);
  font-size: clamp(0.78rem, 1.1vw, 0.92rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0.375rem;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.zgs-header__link:hover,
.zgs-header__link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.zgs-header__link--active {
  color: #fff;
  box-shadow: inset 0 -2px 0 0 #10b981;
}

.zgs-header__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Pilule uniforme: Status + Prețuri (mobil & desktop) */
.zgs-header__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.38rem 0.85rem;
  font-family: var(--font-display, "Poppins", system-ui, sans-serif);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 9999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    filter 0.15s ease,
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.zgs-header__pill:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

.zgs-header__pill:hover {
  transform: translateY(-1px);
}

.zgs-header__pill--solid {
  color: #fff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.38);
}

.zgs-header__pill--solid:hover,
.zgs-header__pill--solid:focus-visible {
  filter: brightness(1.05);
}

.zgs-header__pill--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.zgs-header__pill--ghost:hover,
.zgs-header__pill--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
}

.zgs-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-display, "Poppins", system-ui, sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 9999px;
  white-space: nowrap;
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.35);
  transition:
    filter 0.15s ease,
    transform 0.15s ease;
}

.zgs-header__cta:hover,
.zgs-header__cta:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-1px);
  outline: none;
}

.zgs-header__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: #fff;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.zgs-header__chip:hover,
.zgs-header__chip:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.zgs-header__chip--auction {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.95) 0%,
    rgba(234, 88, 12, 0.88) 100%
  );
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff8e7;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.zgs-header__chip--auction .zgs-header__chip-long {
  display: inline;
}

.zgs-header__chip--auction .zgs-header__chip-short {
  display: none;
}

@media (max-width: 1100px) {
  .zgs-header__chip--auction .zgs-header__chip-long {
    display: none;
  }
  .zgs-header__chip--auction .zgs-header__chip-short {
    display: inline;
  }
}

.zgs-header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  flex-shrink: 0;
}

.zgs-header__burger:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

.zgs-header__burger span {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: 0 auto;
  background: #fff;
  border-radius: 1px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.zgs-header__burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.zgs-header__burger.is-open span:nth-child(2) {
  opacity: 0;
}

.zgs-header__burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.zgs-header__backdrop {
  display: none;
}

/* Pe desktop panelul mobil nu trebuie în flux — altfel apare ca a doua bară de navigare. */
.zgs-header__sheet {
  display: none;
}

@media (max-width: 960px) {
  .zgs-header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.35rem;
  }

  .zgs-header__mobile-quick {
    display: flex;
  }

  .zgs-header__mobile-quick .zgs-header__pill {
    padding: 0.34rem 0.62rem;
    font-size: 0.65rem;
    min-height: 2rem;
    letter-spacing: 0.03em;
  }

  .zgs-header__nav,
  .zgs-header__actions {
    display: none;
  }

  .zgs-header__burger {
    display: flex;
  }

  .zgs-header__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    top: var(--zgs-bar-h);
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1100;
  }

  .zgs-header__backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .zgs-header__sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    top: var(--zgs-bar-h);
    bottom: auto;
    height: calc(100dvh - var(--zgs-bar-h));
    max-height: calc(100dvh - var(--zgs-bar-h));
    z-index: 1101;
    padding: 1rem 1.25rem 2rem;
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.22s ease,
      opacity 0.22s ease;
  }

  .zgs-header__sheet.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .zgs-header__sheet-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .zgs-header__sheet-link {
    display: block;
    padding: 0.85rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background 0.15s ease;
  }

  .zgs-header__sheet-link:hover,
  .zgs-header__sheet-link:focus-visible {
    background: rgba(16, 185, 129, 0.15);
    outline: none;
  }

  .zgs-header__sheet-link--active {
    background: rgba(16, 185, 129, 0.22);
  }

  .zgs-header__sheet-actions {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .zgs-header__sheet-actions .zgs-header__pill,
  .zgs-header__sheet-actions .zgs-header__cta,
  .zgs-header__sheet-actions .zgs-header__chip {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  .zgs-header__sheet-actions .zgs-header__pill {
    text-transform: none;
    font-size: 0.95rem;
    font-weight: 800;
  }

  .zgs-header__sheet-actions .zgs-header__chip--auction {
    font-size: 0.8rem;
  }
}

body.zgs-nav-open {
  overflow: hidden;
}

/* Iframe full-height: SiteGate pune clasele pe html/body pentru rute /preturi/embed și /formulare/embed */
html.zgs-embed-fill,
body.zgs-embed-fill {
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body.zgs-embed-fill {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.zgs-embed-bare-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Rute embed: lățime completă din primul paint (fără a aștepta clasele html/body din useEffect) */
.zgs-embed-bare-layout[data-zgs-embed="preturi"],
.zgs-embed-bare-layout[data-zgs-embed="formulare"] {
  width: 100%;
  max-width: none;
  align-self: stretch;
  min-height: 100vh;
  min-height: 100dvh;
}

/* În iframe: fără scroll pe body — scroll în interiorul calculatorului React */
.zgs-embed-bare-layout[data-zgs-embed="preturi"] {
  overflow: hidden;
  height: 100%;
}

.zgs-embed-bare-layout[data-zgs-embed="preturi"] > section#preturi-calculator {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

/* Host LegacyMain în embed (formulare etc.) */
.zgs-embed-bare-layout[data-zgs-embed="preturi"] > .zgs-embed-legacy-host,
.zgs-embed-bare-layout[data-zgs-embed="formulare"] > .zgs-embed-legacy-host {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

/* /preturi/embed (și iframe): lățime plină în documentul „bare” */
html.zgs-embed-fill body.zgs-embed-fill .zgs-embed-bare-layout[data-zgs-embed="preturi"] {
  width: 100%;
  max-width: none;
  align-self: stretch;
}

.zgs-embed-formulare-status.formulare-status-embed .forms-section {
  padding: 0.35rem 0 0.75rem;
}

.zgs-embed-formulare-status.formulare-status-embed .form-container.active {
  padding-top: 0;
}

.zgs-embed-formulare-status.formulare-status-embed .status-check-form .form-section {
  margin-bottom: 0;
}

.zgs-embed-formulare-status.formulare-status-embed .info-box {
  margin-top: 0.85rem;
}

.zgs-embed-formulare-status.formulare-status-embed .info-box h4 {
  font-size: 0.95rem;
}

.zgs-embed-formulare-status.formulare-status-embed .info-box li {
  font-size: 0.82rem;
}

body.zgs-trust-modal-open {
  overflow: hidden;
}

/* ===== Modale calculator + status — model TrustGSM (backdrop centrat, animație, închidere) ===== */
.zgs-trust-calc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8500;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top, 0px))
    max(0.75rem, env(safe-area-inset-right, 0px))
    max(0.75rem, env(safe-area-inset-bottom, 0px))
    max(0.75rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  animation: zgsTrustFadeIn 0.3s ease both;
}

.zgs-trust-calc-backdrop.is-open {
  display: flex;
}

@keyframes zgsTrustFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.zgs-trust-calc-modal {
  width: 100%;
  max-width: min(1180px, 96vw);
  max-height: 94vh;
  overflow: hidden;
  background: linear-gradient(
    165deg,
    rgba(15, 23, 42, 0.98) 0%,
    rgba(15, 23, 42, 0.94) 100%
  );
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 1rem;
  padding: 1.25rem 1.1rem 1rem;
  position: relative;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(16, 185, 129, 0.12);
  animation: zgsTrustModalIn 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

@keyframes zgsTrustModalIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(18px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.zgs-trust-calc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.zgs-trust-calc-close:hover,
.zgs-trust-calc-close:focus-visible {
  background: rgba(16, 185, 129, 0.85);
  color: #0f172a;
  transform: rotate(90deg);
  outline: none;
}

.zgs-trust-calc-title {
  font-family: var(--font-display, "Poppins", system-ui, sans-serif);
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  font-weight: 800;
  text-align: center;
  margin: 0.15rem 2.5rem 0.85rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, #34d399 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.zgs-trust-calc-iframe {
  display: block;
  flex: 1 1 auto;
  min-height: min(72vh, 760px);
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0.65rem;
  background: #0f172a;
}

@media (max-width: 640px) {
  .zgs-trust-calc-iframe {
    min-height: min(68vh, 640px);
  }
}

.zgs-trust-status-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8500;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top, 0px))
    max(0.75rem, env(safe-area-inset-right, 0px))
    max(0.75rem, env(safe-area-inset-bottom, 0px))
    max(0.75rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  animation: zgsTrustFadeIn 0.3s ease both;
}

.zgs-trust-status-backdrop.is-open {
  display: flex;
}

.zgs-trust-status-modal {
  width: 100%;
  max-width: 720px;
  max-height: 94vh;
  overflow: hidden;
  background: linear-gradient(
    165deg,
    rgba(15, 23, 42, 0.98) 0%,
    rgba(15, 23, 42, 0.94) 100%
  );
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 1rem;
  padding: 1.2rem 1rem 0.9rem;
  position: relative;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  animation: zgsTrustModalIn 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.zgs-trust-status-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.zgs-trust-status-close:hover,
.zgs-trust-status-close:focus-visible {
  background: rgba(16, 185, 129, 0.85);
  color: #0f172a;
  transform: rotate(90deg);
  outline: none;
}

.zgs-trust-status-title {
  font-family: var(--font-display, "Poppins", system-ui, sans-serif);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 800;
  text-align: center;
  margin: 0.1rem 2.5rem 0.75rem;
  background: linear-gradient(135deg, #34d399 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.zgs-trust-status-iframe {
  display: block;
  width: 100%;
  height: min(80vh, 780px);
  min-height: 320px;
  border: 0;
  border-radius: 0.65rem;
  background: #0f172a;
}

@media (max-width: 640px) {
  .zgs-trust-status-iframe {
    height: min(74vh, 680px);
  }
}
