body.event-modal-open {
  overflow: hidden;
}

.event-modal {
  width: min(1040px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  color: #193657;
  border: 0;
  border-radius: 22px;
  background: transparent;
}

.event-modal::backdrop {
  background: rgba(1, 33, 62, .68);
  backdrop-filter: blur(4px);
}

.event-modal-card {
  --event-blue: #079fe1;
  --event-blue-dark: #0873cf;
  --event-cyan-soft: #eaf8ff;
  --event-border: #a8dcf5;
  --event-accent: #0873cf;
  position: relative;
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  max-height: calc(100dvh - 32px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #63c9ef;
  border-radius: 22px;
  background: #f7fcff;
  box-shadow: 0 26px 70px rgba(0, 54, 91, .30);
}

.event-modal-close {
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #53728f;
  cursor: pointer;
  border: 1px solid #bfe5f6;
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
}

.event-modal-close:hover {
  color: var(--event-accent);
  border-color: #7bcdef;
  background: #fff;
}

.event-modal-close:focus-visible,
.event-action:focus-visible {
  outline: 3px solid rgba(7, 159, 225, .30);
  outline-offset: 2px;
}

.event-modal-close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.event-modal-content {
  min-height: 0;
  padding: 20px;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #62c8ed transparent;
}

.event-modal-brand,
.event-benefit-table-wrap,
.event-condition-card,
.event-important {
  border: 1px solid var(--event-border);
  background: #fff;
}

.event-modal-brand {
  min-height: 104px;
  padding: 10px 56px;
  display: grid;
  place-items: center;
  border-radius: 15px;
}

.event-modal-logo {
  width: min(580px, 78%);
  max-height: 92px;
  display: block;
  object-fit: contain;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.event-benefit-table-wrap {
  overflow: hidden;
  border-radius: 14px;
}

.event-benefit-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.event-benefit-table th,
.event-benefit-table td {
  padding: 13px 9px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
}

.event-benefit-table th {
  color: #fff;
  background: var(--event-blue);
}

.event-benefit-table th + th {
  border-left: 1px solid rgba(255, 255, 255, .42);
}

.event-benefit-table td {
  color: #17466f;
  background: #fff;
}

.event-benefit-table td + td {
  border-left: 1px solid #cbeafa;
}

.event-benefit-table td:nth-child(2) {
  color: var(--event-accent);
  font-size: 18px;
  font-weight: 900;
}

.event-condition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.event-condition-card {
  min-width: 0;
  padding: 19px 20px 20px;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
}

.event-condition-card h3,
.event-important h3 {
  margin: 0 0 16px;
  color: #086fca;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 900;
  text-align: center;
  letter-spacing: .02em;
}

.event-numbered-list {
  margin: 0;
  padding: 0;
  display: grid;
  flex: 1;
  grid-template-rows: repeat(6, minmax(28px, 1fr));
  gap: 8px;
  list-style: none;
  counter-reset: event-rule;
}

.event-numbered-list li {
  position: relative;
  min-height: 28px;
  padding-left: 38px;
  color: #526b83;
  font-size: 15px;
  line-height: 1.48;
  font-weight: 600;
  word-break: normal;
  overflow-wrap: break-word;
  counter-increment: event-rule;
}

.event-numbered-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  content: counter(event-rule, decimal-leading-zero);
  color: #0876ce;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  border-radius: 6px;
  background: #dff4fd;
}

.event-numbered-list strong {
  color: var(--event-accent);
  font-weight: 850;
}

.event-important {
  padding: 19px 22px;
  border-radius: 14px;
  background: #f3fbff;
}

.event-important h3 {
  margin-bottom: 12px;
  color: var(--event-accent);
  text-align: left;
}

.event-important ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  list-style: none;
}

.event-important li {
  position: relative;
  padding-left: 20px;
  color: #526b83;
  font-size: 15px;
  line-height: 1.48;
  font-weight: 600;
  word-break: normal;
  overflow-wrap: break-word;
}

.event-important li::before {
  position: absolute;
  top: .46em;
  left: 2px;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 2px;
  background: var(--event-blue);
  transform: rotate(45deg);
}

.event-modal-actions {
  padding: 12px 20px 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid #c5e8f8;
  background: #fff;
}

.event-action {
  width: min(240px, 100%);
  min-height: 43px;
  padding: 9px 16px;
  color: #0873cf;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  border: 1px solid #62bee9;
  border-radius: 9px;
  background: #fff;
}

.event-action-primary {
  color: #fff;
  border-color: var(--event-blue);
  background: var(--event-blue);
}

.event-action:hover {
  background: #eefaff;
}

.event-action-primary:hover {
  border-color: #087fc0;
  background: #087fc0;
}

@media (max-width: 640px) {
  .event-modal {
    width: calc(100% - 14px);
    max-height: calc(100dvh - 14px);
    border-radius: 15px;
  }

  .event-modal-card {
    max-height: calc(100dvh - 14px);
    border-radius: 15px;
  }

  .event-modal-close {
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
  }

  .event-modal-content {
    padding: 11px;
    gap: 10px;
  }

  .event-modal-brand {
    min-height: 74px;
    padding: 8px 42px 8px 12px;
    border-radius: 11px;
  }

  .event-modal-logo {
    width: 100%;
    max-height: 66px;
  }

  .event-benefit-table-wrap {
    border-radius: 11px;
  }

  .event-benefit-table,
  .event-benefit-table tbody,
  .event-benefit-table tr {
    display: block;
  }

  .event-benefit-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
  }

  .event-benefit-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-benefit-table td {
    min-height: 66px;
    padding: 9px 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
    border-bottom: 1px solid #cbeafa;
  }

  .event-benefit-table td::before {
    content: attr(data-label);
    color: #0873cf;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 850;
    text-transform: uppercase;
  }

  .event-benefit-table td:first-child {
    grid-column: 1 / -1;
  }

  .event-benefit-table td:nth-child(even) {
    border-right: 1px solid #cbeafa;
  }

  .event-benefit-table td:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .event-condition-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .event-condition-card,
  .event-important {
    padding: 16px 14px;
    border-radius: 11px;
  }

  .event-condition-card h3,
  .event-important h3 {
    font-size: 15px;
  }

  .event-numbered-list li,
  .event-important li {
    font-size: 14px;
  }

  .event-modal-actions {
    padding: 9px 10px 10px;
    gap: 8px;
  }

  .event-action {
    width: auto;
    min-height: 42px;
    flex: 1;
    padding: 8px 10px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .event-modal *,
  .event-modal *::before,
  .event-modal *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
