/* Barra compacta — estilo institucional amarillo (tipo IPCH Week) */
.ipc-announce-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  min-height: 40px;
  max-height: 80px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #ffc93d 0%, #ffb300 45%, #f5a000 100%);
  color: #1a1a1a;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.35;
  text-align: center;
  border-top: 2px solid #e69500;
  border-bottom: 2px solid #e69500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

.ipc-announce-bar__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: block;
  color: #1a1a1a;
  opacity: 0.9;
}

.ipc-announce-bar__body {
  flex: 0 1 auto;
  max-width: min(100%, 520px);
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.ipc-announce-bar__title {
  font-weight: 700;
  margin-right: 0.35em;
}

.ipc-announce-bar__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ipc-announce-bar__link {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 2px;
  background: #fff;
  color: #1a1a1a;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ipc-announce-bar__link:hover,
.ipc-announce-bar__link:focus-visible {
  background: #fffbeb;
  border-color: rgba(0, 0, 0, 0.14);
}

.ipc-announce-bar__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
  cursor: pointer;
  flex-shrink: 0;
}

.ipc-announce-bar__close:hover,
.ipc-announce-bar__close:focus-visible {
  background: rgba(0, 0, 0, 0.14);
}

.ipc-announce-bar__close svg {
  width: 14px;
  height: 14px;
}

/* Modal compacto — no ocupa toda la pantalla */
.ipc-announce-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px 10px 0;
  background: rgba(15, 23, 42, 0.45);
  box-sizing: border-box;
}

.ipc-announce-modal__card {
  width: min(100%, 380px);
  max-height: min(42vh, 180px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  border-top: 3px solid #b91c1c;
}

.ipc-announce-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 4px;
  flex-shrink: 0;
}

.ipc-announce-modal__title {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #b91c1c;
  line-height: 1.3;
}

.ipc-announce-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
  flex-shrink: 0;
}

.ipc-announce-modal__close:hover {
  background: #e5e7eb;
}

.ipc-announce-modal__close svg {
  width: 14px;
  height: 14px;
}

.ipc-announce-modal__message {
  margin: 0;
  padding: 0 10px 8px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #374151;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.ipc-announce-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 6px 10px 8px;
  border-top: 1px solid #f3f4f6;
  flex-shrink: 0;
}

.ipc-announce-modal__link {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #b91c1c;
  text-decoration: none;
}

.ipc-announce-modal__link:hover {
  text-decoration: underline;
}

.ipc-announce-modal__btn {
  padding: 5px 12px;
  border: none;
  border-radius: 5px;
  background: #b91c1c;
  color: #fff;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
}

.ipc-announce-modal__btn:hover {
  background: #991b1b;
}

/* Desplazamiento del contenido y del dock flotante */
:root {
  --ipc-announce-bar-gap: 18px;
}

body.ipc-has-announce-bar {
  padding-top: calc(
    var(--ipc-announce-bar-height, 40px) + var(--ipc-announce-bar-gap, 18px)
  );
}

body.ipc-has-announce-bar .ipc-float-dock {
  top: calc(
    var(--ipc-announce-bar-height, 40px) + var(--ipc-announce-bar-gap, 18px) + 6px
  );
}

@media (max-height: 700px) {
  .ipc-announce-bar {
    min-height: 32px;
    max-height: 64px;
    padding: 5px 8px;
    font-size: 0.6875rem;
  }

  .ipc-announce-modal__card {
    max-height: min(38vh, 150px);
  }

  body.ipc-has-announce-bar .ipc-float-dock {
    top: calc(var(--ipc-announce-bar-height, 32px) + 4px);
  }
}

@media (max-width: 480px) {
  .ipc-announce-bar__link span {
    display: none;
  }

  .ipc-announce-bar__link::after {
    content: "→";
    font-size: 0.75rem;
  }
}
