/* =========================================================
   e-PSR Dispatch Alert V3
   Całkowicie nowy wzór inspirowany zaakceptowanym screenem.
   ========================================================= */

.epsr-alert-v3 {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 55, 95, .09), transparent 35%),
    rgba(1, 7, 16, .88);
  backdrop-filter: blur(16px) saturate(.84);
  opacity: 0;
  transition: opacity .26s ease;
}

.epsr-alert-v3.is-hidden {
  display: none;
}

.epsr-alert-v3.is-visible {
  opacity: 1;
}

.epsr-alert-v3.is-leaving {
  opacity: 0;
}

.epsr-alert-v3__panel {
  position: relative;
  width: min(590px, calc(100vw - 40px));
  padding: 34px 34px 30px;
  display: flex;
  align-items: center;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 86, 117, .26);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 66, 101, .11), transparent 38%),
    linear-gradient(160deg, #0d1b2f 0%, #101c30 66%, #15192a 100%);
  box-shadow:
    0 48px 140px rgba(0, 0, 0, .68),
    inset 0 1px 0 rgba(255, 255, 255, .035);
  transform: translateY(22px) scale(.965);
  opacity: 0;
  transition:
    transform .42s cubic-bezier(.2,.85,.25,1),
    opacity .3s ease;
}

.epsr-alert-v3.is-visible .epsr-alert-v3__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.epsr-alert-v3.is-leaving .epsr-alert-v3__panel {
  transform: translateY(14px) scale(.98);
  opacity: 0;
}

.epsr-alert-v3__topline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #ff315f, #ff7890, #ff315f);
  background-size: 220% 100%;
  animation: epsrV3Sweep 2.2s linear infinite;
}

.epsr-alert-v3__signal {
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
}

.epsr-alert-v3__signal-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 94, 122, .16);
  border-radius: 50%;
  opacity: 0;
}

.epsr-alert-v3__signal-ring.ring-one {
  animation: epsrV3Ring 1.9s ease-out infinite;
}

.epsr-alert-v3__signal-ring.ring-two {
  animation: epsrV3Ring 1.9s .72s ease-out infinite;
}

.epsr-alert-v3__signal-core {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 98, 125, .16);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 88, 117, .22), rgba(255, 88, 117, .07));
  color: #ff6882;
  box-shadow:
    inset 0 0 0 10px rgba(255, 86, 115, .025),
    0 16px 36px rgba(255, 45, 84, .14);
  animation: epsrV3Beacon 1.15s ease-in-out infinite alternate;
}

.epsr-alert-v3 svg {
  width: 1em;
  height: 1em;
  display: block;
  fill: currentColor;
}

.epsr-alert-v3__signal-core svg {
  width: 36px;
  height: 36px;
}

.epsr-alert-v3__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ff718a;
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-align: center;
}

.epsr-alert-v3__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4d70;
  animation: epsrV3Dot 1.2s ease-out infinite;
}

.epsr-alert-v3 h2 {
  width: 100%;
  margin: 10px 0 0;
  color: #f7f9ff;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 790;
  line-height: 1.12;
  letter-spacing: -.035em;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.epsr-alert-v3__address {
  width: 100%;
  margin-top: 13px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 9px;
  color: #aebfd3;
  font-size: .92rem;
  line-height: 1.5;
  text-align: center;
}

.epsr-alert-v3__address-icon {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #6faaff;
}

.epsr-alert-v3__address-icon svg {
  width: 19px;
  height: 19px;
}

.epsr-alert-v3__address span:last-child {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.epsr-alert-v3__details {
  width: 100%;
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.epsr-alert-v3__detail {
  min-width: 0;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value";
  column-gap: 10px;
  align-items: center;
  border: 1px solid rgba(145, 178, 217, .10);
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
}

.epsr-alert-v3__detail-icon {
  grid-area: icon;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(74, 142, 234, .10);
  color: #76adfa;
}

.epsr-alert-v3__detail-icon svg {
  width: 17px;
  height: 17px;
}

.epsr-alert-v3__detail-label {
  grid-area: label;
  color: #7f94af;
  font-size: .58rem;
  font-weight: 700;
  line-height: 1.25;
}

.epsr-alert-v3__detail strong {
  grid-area: value;
  min-width: 0;
  margin-top: 3px;
  color: #dce7f4;
  font-size: .72rem;
  font-weight: 780;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.epsr-alert-v3__actions {
  width: 100%;
  margin-top: 25px;
  padding-top: 19px;
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  gap: 11px;
  border-top: 1px solid rgba(143, 174, 213, .08);
}

.epsr-alert-v3__button {
  min-height: 52px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 14px;
  font: 740 .74rem Poppins, sans-serif;
  cursor: pointer;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    border-color .18s ease;
}

.epsr-alert-v3__button:hover {
  transform: translateY(-2px);
}

.epsr-alert-v3__button svg {
  width: 20px;
  height: 20px;
}

.epsr-alert-v3__button--secondary {
  border: 1px solid rgba(148, 180, 218, .20);
  background: rgba(14, 33, 57, .92);
  color: #c8d6e7;
}

.epsr-alert-v3__button--secondary:hover {
  border-color: rgba(148, 180, 218, .34);
  background: rgba(20, 43, 71, .98);
}

.epsr-alert-v3__button--primary {
  border: 1px solid rgba(255, 118, 141, .20);
  background: linear-gradient(135deg, #ef315b, #ff5d78);
  color: #fff;
  box-shadow:
    0 16px 34px rgba(240, 48, 89, .25),
    inset 0 1px 0 rgba(255, 255, 255, .16);
}

.epsr-alert-v3__button--primary:hover {
  background: linear-gradient(135deg, #f43b64, #ff6a82);
  box-shadow:
    0 20px 40px rgba(240, 48, 89, .30),
    inset 0 1px 0 rgba(255, 255, 255, .17);
}

.epsr-alert-v3__arrow {
  font-size: 1.15rem;
  transition: transform .18s ease;
}

.epsr-alert-v3__button--primary:hover .epsr-alert-v3__arrow {
  transform: translateX(3px);
}

.epsr-alert-audio-toggle-v3 {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147482000;
  min-height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(86, 149, 235, .23);
  border-radius: 12px;
  background: rgba(9, 25, 47, .95);
  color: #9dc6ff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .26);
  font: 720 .63rem Poppins, sans-serif;
  cursor: pointer;
}

.epsr-alert-audio-toggle-v3 svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

@keyframes epsrV3Sweep {
  to { background-position: -220% 0; }
}

@keyframes epsrV3Ring {
  0% { transform: scale(.70); opacity: 0; }
  20% { opacity: .65; }
  100% { transform: scale(1.25); opacity: 0; }
}

@keyframes epsrV3Beacon {
  from {
    transform: translateY(0);
    box-shadow:
      inset 0 0 0 10px rgba(255, 86, 115, .025),
      0 14px 30px rgba(255, 45, 84, .10);
  }
  to {
    transform: translateY(-3px);
    box-shadow:
      inset 0 0 0 10px rgba(255, 86, 115, .04),
      0 20px 42px rgba(255, 45, 84, .18);
  }
}

@keyframes epsrV3Dot {
  0% { box-shadow: 0 0 0 0 rgba(255, 78, 112, .45); }
  100% { box-shadow: 0 0 0 9px rgba(255, 78, 112, 0); }
}

@media (max-width: 620px) {
  .epsr-alert-v3 {
    padding: 15px;
  }

  .epsr-alert-v3__panel {
    width: min(100%, 500px);
    padding: 27px 20px 22px;
    border-radius: 22px;
  }

  .epsr-alert-v3__signal {
    width: 92px;
    height: 92px;
  }

  .epsr-alert-v3__signal-core {
    width: 64px;
    height: 64px;
  }

  .epsr-alert-v3__signal-core svg {
    width: 31px;
    height: 31px;
  }

  .epsr-alert-v3 h2 {
    font-size: 1.75rem;
  }

  .epsr-alert-v3__details {
    grid-template-columns: 1fr;
  }

  .epsr-alert-v3__actions {
    grid-template-columns: 1fr;
  }

  .epsr-alert-v3__button {
    width: 100%;
  }
}


/* V7.15 — BLOKADA STARYCH FORMATK */
#globalDispatchOverlay,
.global-dispatch-overlay,
#incomingDispatchOverlay,
.incoming-overlay,
#dispatchOverlay,
.dispatch-overlay {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Jedyną aktywną formatką jest V3 */
#epsrDispatchAlertV3.epsr-alert-v3 {
  display: grid;
}

#epsrDispatchAlertV3.epsr-alert-v3.is-hidden {
  display: none;
}


/* V8.3 — usunięcie przycisków „Włącz alarmy” z interfejsu */
#globalAlarmUnlock,
#epsrAlertAudioToggleV3,
#enableSoundBtn,
.global-alarm-unlock,
.epsr-alert-audio-toggle-v3,
.sound-toggle-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
