:root {
  --mdt-event-bg: #f9fafb;
  --mdt-panel-bg: #ffffff;
  --mdt-border: #e2e8f0;
  --mdt-muted: #6b7280;
  --mdt-primary: #2563eb;
  --mdt-card-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.mdt-event-page {
  padding: 32px 24px 48px;
  min-height: 100vh;
  background: var(--mdt-event-bg);
}

.mdt-section.mdt-event-shell {
  border: none;
  margin: 0;
  padding: 0;
}

.mdt-event-grid {
  display: grid;
  gap: 24px;
  min-height: calc(100vh - 140px);
  align-items: stretch;
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
}

.mdt-map-panel,
.mdt-tickets-panel {
  background: var(--mdt-panel-bg);
  border-radius: 24px;
  border: 1px solid var(--mdt-border);
  box-shadow: var(--mdt-card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.mdt-map-panel__header {
  padding: 24px;
  border-bottom: 1px solid var(--mdt-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.mdt-map-panel__header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.mdt-map-panel__body {
  padding: 24px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
}

.mdt-map-panel__placeholder {
  border: 1px dashed var(--mdt-border);
  border-radius: 18px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: var(--mdt-muted);
  background: #f5f5fb;
}

.mdt-map-viewport {
  border: 1px solid var(--mdt-border);
  border-radius: 18px;
  overflow: hidden;
  min-height: 280px;
  background: #fff;
}

.mdt-map-canvas {
  min-height: 280px;
}

.mdt-map-panel__helper {
  font-size: 0.9rem;
  color: var(--mdt-muted);
}

.mdt-map-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mdt-map-panel__body figure {
  margin: 0;
}

.mdt-map-panel__body img {
  width: 100%;
  border-radius: 18px;
  display: block;
}

.mdt-map-panel__notice {
  border-radius: 16px;
  background: #fef3c7;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: #92400e;
}

.mdt-map-panel__toggle {
  font-size: 0.9rem;
}

.mdt-map-panel.is-collapsed .mdt-map-panel__body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.mdt-tickets-panel {
  padding: 0;
}

.mdt-tickets-sticky {
  position: sticky;
  top: 0;
  background: var(--mdt-panel-bg);
  z-index: 2;
  padding: 24px;
  border-bottom: 1px solid var(--mdt-border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mdt-tickets-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.mdt-tickets-header h1 {
  margin: 4px 0 0;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
}

.mdt-tickets-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mdt-qty-pill {
  background: linear-gradient(135deg, #eef2ff, #dbe7ff);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.mdt-qty-pill strong {
  font-size: 1.4rem;
}

.mdt-pill {
  padding: 6px 16px;
  border-radius: 999px;
  background: #eef2ff;
  color: #30415d;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mdt-event-meta {
  color: #5c6674;
  font-size: 0.95rem;
  margin: 2px 0;
}

.mdt-control-bar {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  margin-bottom: 6px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.mdt-control-bar__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  font-size: 0.9rem;
  color: #2b3140;
  flex: 0 0 auto;
  min-width: 0;
}

.mdt-control-bar__item label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mdt-control-bar__item select {
  width: auto;
  min-width: 120px;
  padding: 0;
  padding-right: 28px;
  border: none;
  border-radius: 0;
  background: transparent;
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
  box-shadow: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, #1f2430 50%, transparent 50%),
    linear-gradient(-45deg, #1f2430 50%, transparent 50%);
  background-position: calc(100% - 16px) center;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  transition: color 0.2s ease;
}

.mdt-control-bar__item select:focus {
  outline: none;
  box-shadow: none;
}

.mdt-control-bar__item--sort {
  min-width: 160px;
}

.mdt-control-bar__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #2b3140;
}

.mdt-control-bar__toggle span {
  font-weight: 600;
  color: #111827;
}

.mdt-control-bar__summary-group {
  order: 99;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  margin-left: auto;
}

.mdt-control-bar__summary {
  font-weight: 600;
  color: #111827;
}

.mdt-control-bar__reset {
  font-size: 0.8rem;
  background: transparent;
  border: none;
  color: #2563eb;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.mdt-control-bar__reset:hover,
.mdt-control-bar__reset:focus-visible {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  outline: none;
}

.mdt-trust-strip {
  width: 100%;
  border-radius: 14px;
  padding: 10px 16px;
  background: #f5f7ff;
  border: 1px solid #dbe4ff;
  color: #475467;
  font-size: 0.95rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mdt-trust-strip::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
  display: inline-flex;
}

.mdt-filters {
  display: grid;
  gap: 12px;
  padding-bottom: 12px;
}

.mdt-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mdt-filter-row label {
  font-size: 0.95rem;
  color: var(--mdt-muted);
}

.mdt-filter-row--summary {
  justify-content: space-between;
}

.mdt-filter-summary {
  font-weight: 600;
}

.mdt-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mdt-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.mdt-switch span {
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #e5e7eb;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.mdt-switch span::after {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease;
}

.mdt-switch input:checked + span {
  background: var(--mdt-primary);
}

.mdt-switch input:checked + span::after {
  transform: translateX(20px);
}

.mdt-ticket-list {
  flex: 1;
  padding: 24px;
  gap: 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
}

.mdt-smart-picks {
  padding: 8px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mdt-smart-pick {
  border: 1px solid var(--mdt-border);
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mdt-smart-pick:hover,
.mdt-smart-pick:focus-visible {
  border-color: var(--mdt-primary);
  background: #eef2ff;
  outline: none;
}

.mdt-ticket-card {
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  box-shadow: 0 14px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.mdt-ticket-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
}

.mdt-ticket-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mdt-ticket-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.mdt-ticket-card__head strong {
  font-size: 1.1rem;
}

.mdt-ticket-card__meta {
  font-size: 0.85rem;
  color: var(--mdt-muted);
}

.mdt-ticket-card__status {
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--mdt-muted);
}

.mdt-ticket-card__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mdt-ticket-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
}

.mdt-ticket-badge--best {
  background: #dcfce7;
  color: #047857;
  font-weight: 600;
}

.mdt-ticket-card.is-selected {
  border-color: #2563eb;
  background: #f4f6ff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.15);
}

.mdt-ticket-card.flash {
  animation: mdt-ticket-flash 1.2s ease-out;
}

.mdt-ticket-card.flash::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 2px solid rgba(37, 99, 235, 0.5);
  opacity: 0;
  animation: mdt-ticket-flash-border 1.2s ease-out;
  pointer-events: none;
}

@keyframes mdt-ticket-flash {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes mdt-ticket-flash-border {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.mdt-ticket-card__actions-column {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 120px;
}

.mdt-ticket-card__actions-column .mdt-btn {
  width: 100%;
}

.mdt-ticket-card__price {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mdt-ticket-card__price strong {
  font-size: 1.4rem;
}

.mdt-ticket-card__price small {
  display: block;
  color: var(--mdt-muted);
}

.mdt-ticket-card__helper {
  min-height: 1.4rem;
  margin: 0;
  font-size: 0.85rem;
  color: var(--mdt-muted);
  visibility: hidden;
  width: 100%;
  text-align: right;
}

.mdt-ticket-card__helper.is-visible {
  visibility: visible;
}

.mdt-list-footer {
  padding: 24px;
  border-top: 1px solid var(--mdt-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mdt-list-footer button {
  width: 100%;
}

.mdt-selection-summary {
  position: sticky;
  bottom: 0;
  margin: 0 24px 0;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid #d7dae4;
  background: #fdfdff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.1);
  z-index: 3;
}

.mdt-selection-summary__content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mdt-selection-pill {
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #0f172a;
  font-weight: 600;
}

.mdt-selection-summary__details {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--mdt-muted);
}

.mdt-selection-summary__details strong {
  font-size: 1rem;
  color: #111827;
}

.mdt-selection-summary__details span {
  font-weight: 600;
}

.mdt-selection-summary button {
  min-width: 120px;
}

.mdt-empty-state {
  text-align: center;
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed var(--mdt-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--mdt-muted);
}

.mdt-empty-state--no-offers {
  padding: 28px;
  border-style: solid;
  border-width: 1px;
  background: var(--mdt-panel-bg);
  box-shadow: var(--mdt-card-shadow);
  border-radius: 18px;
  margin-top: 12px;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mdt-empty-state--no-offers strong {
  font-size: 1.4rem;
  color: #111827;
}

.mdt-empty-state--no-offers p {
  color: var(--mdt-muted);
}

.mdt-qty-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.mdt-qty-modal[hidden] {
  display: none;
}

.mdt-qty-modal__panel {
  background: #ffffff;
  border-radius: 28px;
  padding: 32px;
  width: min(420px, calc(100% - 32px));
  text-align: center;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
}

.mdt-qty-modal__grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
}

.mdt-map-panel__toggle {
  display: none;
}

@media (max-width: 1023px) {
  .mdt-event-page {
    padding: 20px 16px 32px;
  }

  .mdt-event-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .mdt-map-panel,
  .mdt-tickets-panel {
    order: initial;
    border-radius: 20px;
  }

  .mdt-map-panel__body {
    padding: 12px;
  }

  .mdt-map-panel__toggle {
    display: inline-flex;
  }

  .mdt-tickets-sticky {
    position: relative;
    top: 0;
  }

  .mdt-tickets-header {
    flex-direction: column;
  }

  .mdt-tickets-header__actions {
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .mdt-qty-pill {
    width: 100%;
  }

  .mdt-filter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .mdt-filter-row select,
  .mdt-filter-row .mdt-switch,
  .mdt-filter-row span {
    width: 100%;
  }

  .mdt-ticket-list {
    padding: 16px;
  }

  .mdt-ticket-card {
    flex-direction: column;
  }

  .mdt-ticket-card__actions-column {
    align-items: stretch;
    width: 100%;
  }

  .mdt-list-footer {
    padding: 16px;
  }

  .mdt-map-panel__body {
    padding: 12px;
  }

  .mdt-map-viewport {
    min-height: 320px;
  }

  .mdt-map-panel__placeholder {
    min-height: 220px;
  }

  .mdt-map-panel__helper {
    font-size: 0.85rem;
  }

  .mdt-filters {
    gap: 10px;
  }

  .mdt-filter-row select {
    font-size: 0.95rem;
  }

  .mdt-empty-state {
    gap: 6px;
  }
  .mdt-control-bar {
    justify-content: flex-start;
    padding: 10px 12px;
  }

  .mdt-control-bar__item--sort {
    min-width: 140px;
  }

  .mdt-control-bar__summary-group {
    margin-left: auto;
    width: auto;
    justify-content: flex-end;
  }
  .mdt-selection-summary {
    margin: 0;
    border-radius: 0;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.1);
  }
  .mdt-selection-summary__content {
    flex-wrap: wrap;
  }
}
