/* Emergencias global · visual institucional 2026 */
#tp-emergency-widget,
#tp-emergency-widget * { box-sizing: border-box; }
#tp-emergency-widget {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 2147483000;
  width: auto;
  max-width: calc(100vw - 36px);
  font-family: Arial, Helvetica, sans-serif;
  color: #40131f;
  line-height: 1.3;
}
#tp-emergency-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 9px 17px;
  border: 0;
  border-radius: 999px;
  background: #8f1738;
  color: #fff;
  box-shadow: 0 12px 28px rgba(70, 10, 25, .32);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
#tp-emergency-trigger:hover {
  transform: translateY(-2px);
  background: #76112d;
  box-shadow: 0 16px 34px rgba(70, 10, 25, .38);
}
#tp-emergency-trigger:focus-visible,
#tp-emergency-panel a:focus-visible {
  outline: 3px solid #d9b97d;
  outline-offset: 3px;
}
.tp-emergency-alarm {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  font-size: 23px;
  line-height: 1;
}
.tp-emergency-trigger-copy { display: grid; gap: 1px; text-align: left; }
.tp-emergency-trigger-copy strong { color: #fff; font-size: 15px; font-weight: 800; line-height: 1.1; }
.tp-emergency-trigger-copy small { color: rgba(255,255,255,.88); font-size: 11px; font-weight: 600; line-height: 1.1; }
#tp-emergency-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  display: grid;
  gap: 11px;
  width: min(330px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid #ead3c0;
  border-radius: 18px;
  background: #fffaf5;
  box-shadow: 0 18px 42px rgba(54, 12, 23, .25);
}
#tp-emergency-panel[hidden] { display: none !important; }
.tp-emergency-title {
  margin: 0;
  color: #40131f;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}
.tp-emergency-call {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid #ead3c0;
  border-radius: 14px;
  background: #fff;
  color: #40131f !important;
  text-decoration: none !important;
  box-shadow: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tp-emergency-call:hover {
  transform: translateY(-1px);
  border-color: #c89c67;
  box-shadow: 0 8px 20px rgba(70, 10, 25, .09);
}
.tp-emergency-service-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 15px;
  background: #f7e8e8;
  font-size: 31px;
  line-height: 1;
}
.tp-emergency-call.is-patrol .tp-emergency-service-icon { background: #e9eef8; }
.tp-emergency-call-copy { display: grid; gap: 3px; min-width: 0; }
.tp-emergency-call strong { display: block; margin: 0; color: #40131f; font-size: 14px; font-weight: 800; line-height: 1.25; }
.tp-emergency-mobile-hint { display: block; color: #6d1029; font-size: 12px; font-weight: 600; }
.tp-emergency-number { display: block; color: #6d1029; font-size: 17px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
@media (max-width: 600px) {
  #tp-emergency-widget {
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
  }
  #tp-emergency-trigger {
    width: 58px;
    height: 58px;
    min-height: 58px;
    padding: 0;
    justify-content: center;
  }
  .tp-emergency-alarm { width: 42px; height: 42px; flex-basis: 42px; font-size: 27px; }
  .tp-emergency-trigger-copy { display: none; }
  #tp-emergency-panel { width: min(330px, calc(100vw - 24px)); padding: 14px; }
  .tp-emergency-call { min-height: 78px; padding: 12px; }
  .tp-emergency-service-icon { width: 50px; height: 50px; flex-basis: 50px; font-size: 29px; }
  .tp-emergency-number { display: none; }
  .tp-emergency-mobile-hint { display: block; }
}
@media (min-width: 601px) {
  .tp-emergency-mobile-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #tp-emergency-trigger,
  .tp-emergency-call { transition: none; }
}
@media print { #tp-emergency-widget { display: none !important; } }
