:host {
  display: block;
  width: 100%;
}

.ticket {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 78px auto;
  align-items: center;
  width: 100%;
  min-height: 76px;
  gap: 16px;
  padding: 16px 0;
  color: #666666;
}

.ticket__selection {
  display: flex;
  margin: 0;
  cursor: pointer;
}

.ticket__selection input {
  width: 21px;
  height: 21px;
  margin: 0;
  accent-color: var(--tenant-primary, #009933);
  cursor: pointer;
}

.ticket__details {
  min-width: 0;
}

.ticket__title,
.ticket__id {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket__title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.ticket__id {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.4;
}

.ticket__date {
  display: block;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

.ticket__status {
  text-align: center;
}

.ticket__expired {
  display: block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.ticket__actions {
  display: flex;
  grid-column: 4;
  align-items: center;
  gap: 8px;
}

:host ::ng-deep button.ticket__qr-button {
  width: 115px;
  min-width: 0;
  max-width: 115px;
  min-height: 36px;
  padding-inline: 14px;
}

.ticket--disabled {
  grid-template-columns: minmax(0, 1fr) 78px auto;
  color: #8a8a8a;
}

.ticket--disabled .ticket__actions {
  grid-column: 3;
}

:host ::ng-deep .ticket--disabled button.ticket__qr-button:disabled {
  --bs-btn-disabled-bg: #8a8a8a;
  --bs-btn-disabled-border-color: #8a8a8a;
  --bs-btn-disabled-color: #ffffff;
  --bs-btn-disabled-opacity: 1;
}

.ticket__selection input:focus-visible {
  outline: 2px solid var(--tenant-primary, #009933);
  outline-offset: 2px;
}

@media (max-width: 767.98px) {
  .ticket {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }

  .ticket__status {
    grid-column: 2;
  }

  .ticket__actions {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .ticket--disabled {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ticket--disabled .ticket__status {
    grid-column: 1;
  }

  .ticket--disabled .ticket__actions {
    grid-column: 2;
  }
}
