/* AVISO PHISHING (NWEB-15440): franja informativa sobre fraudes. En flujo, encima de la cabecera, sin sticky. */

/* Altura de la franja plegada: la usan la propia franja y el hero de la home (franja + hero = alto de ventana). */
:root {
  --phishing-notice-h: 48px;
}

.phishing-notice {
  --phishing-notice-bg: hsl(var(--primary-h), var(--primary-s), 12%);
  --phishing-notice-accent: var(--color-secondary);
  display: block;
  background-color: var(--phishing-notice-bg);
  color: #fff;
  font-family: var(--font-text-family);
  text-align: center;
}

.phishing-notice__summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  box-sizing: border-box;
  height: var(--phishing-notice-h);
  padding: 0 20px;
  cursor: pointer;
  list-style: none;
}

.phishing-notice__summary::-webkit-details-marker {
  display: none;
}

.phishing-notice__summary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.phishing-notice__icon {
  flex: none;
  color: var(--phishing-notice-accent);
}

.phishing-notice__title {
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 1px;
}

.phishing-notice__title strong {
  font-weight: 700;
}

.phishing-notice__accent {
  color: var(--phishing-notice-accent);
  font-weight: 700;
}

.phishing-notice__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phishing-notice__toggle-text--less,
.phishing-notice[open] .phishing-notice__toggle-text--more {
  display: none;
}

.phishing-notice[open] .phishing-notice__toggle-text--less {
  display: inline;
}

.phishing-notice__chevron {
  flex: none;
}

.phishing-notice[open] .phishing-notice__chevron {
  transform: rotate(180deg);
}

.phishing-notice__text {
  max-width: 1470px;
  margin: 0 auto;
  padding: 0 20px 24px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
}

.phishing-notice__link {
  color: var(--phishing-notice-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.phishing-notice__link:hover,
.phishing-notice__link:focus-visible {
  color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
  .phishing-notice__chevron {
    transition: transform 0.2s ease-in-out;
  }

  /* Despliegue/pliegue suave del contenido. Mejora progresiva: los navegadores sin
     ::details-content o interpolate-size abren y cierran sin animación. */
  .phishing-notice {
    interpolate-size: allow-keywords;
  }

  .phishing-notice::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.28s ease, content-visibility 0.28s ease allow-discrete;
  }

  .phishing-notice[open]::details-content {
    height: auto;
  }
}

/* Tablet / Mobile */
@media screen and (max-width: 991px) {
  :root {
    --phishing-notice-h: 82px;
  }

  .phishing-notice__summary {
    flex-wrap: wrap;
    align-content: center;
    gap: 6px 12px;
    padding: 10px 15px;
  }

  .phishing-notice__icon {
    width: 20px;
    height: 20px;
  }

  .phishing-notice__title {
    flex: 1 1 calc(100% - 44px);
    max-width: calc(100% - 44px);
    font-size: 14px;
    letter-spacing: 0.5px;
    text-align: left;
  }

  .phishing-notice__toggle {
    flex: 1 1 100%;
    justify-content: center;
    font-size: 14px;
  }

  .phishing-notice__text {
    padding: 0 15px 18px;
    font-size: 14px;
    line-height: 1.7;
  }
}

/* Móviles muy estrechos: en es y de el título pasa a tres líneas */
@media screen and (max-width: 359px) {
  :root {
    --phishing-notice-h: 100px;
  }
}
