.pisell-sale-detail-tickets {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  scrollbar-width: none;

  &::-webkit-scrollbar {
    display: none;
  }

  &__body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    padding: 8px 10px;
  }

  &__content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    scrollbar-width: none;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  .pisell-sale-detail-ticket-group-view {
    width: 100%;
  }

  &__footer {
    display: grid;
    flex: 0 0 auto;
    grid-template-rows: 1fr;
    margin-top: auto;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition:
      grid-template-rows 180ms ease,
      opacity 160ms ease,
      transform 180ms ease,
      visibility 0s linear;
  }

  &__footer--scrolling {
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    visibility: hidden;
    transition-delay: 0s, 0s, 0s, 180ms;
  }

  &__footer-content {
    min-height: 0;
    overflow: hidden;
  }

  &__bulk-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 8px;
    background: #05070d;
  }

  &__bulk-button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #7f56d9;
    border-radius: 9px;
    background: transparent;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);

    &:disabled {
      cursor: not-allowed;
      opacity: 0.56;
    }

    &:not(:disabled):hover,
    &:not(:disabled):active {
      color: #fff;
      border-color: #7a4df5;
      background: rgba(127, 86, 217, 0.12);
    }
  }

  &__bulk-button--secondary {
    border-color: #7f56d9 !important;
    background: transparent !important;
    color: #ffffff !important;
  }

  &__bulk-button--theme {
    border-color: #6941c6 !important;
    background: #6941c6 !important;
    color: #ffffff !important;

    &:not(:disabled):hover,
    &:not(:disabled):active {
      border-color: #7f56d9 !important;
      background: #7f56d9 !important;
      color: #ffffff !important;
    }
  }
}

.pisell-sale-detail-ticket-group {
  &--receiving {
    .pisell-sale-detail-group-shell__shell {
      border-color: rgba(127, 86, 217, 0.8);
      background: rgba(31, 24, 55, 0.42);
      box-shadow:
        0 0 0 2px rgba(127, 86, 217, 0.12),
        0 12px 28px rgba(44, 28, 82, 0.24);
    }
  }

  &--receiving-only {
    margin-top: 16px;
  }

  &__move-targets {
    display: grid;
    gap: 8px;
  }

  &__move-target {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 9px 12px;
    overflow: hidden;
    border: 1px dashed rgba(151, 112, 255, 0.86);
    border-radius: 10px;
    background:
      linear-gradient(
        90deg,
        rgba(105, 65, 198, 0.16),
        rgba(127, 86, 217, 0.05)
      ),
      #111626;
    color: #e4d7ff;
    animation: pisell-ticket-move-target-pulse 1.1s ease-in-out infinite;
  }

  &__move-target-icon {
    display: grid;
    flex: none;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: rgba(127, 86, 217, 0.22);
    font-size: 17px;
    font-weight: 900;
  }

  &__move-target-copy {
    min-width: 0;

    strong,
    span {
      display: block;
    }

    strong {
      margin-bottom: 2px;
      font-size: 12px;
      line-height: 16px;
    }

    span {
      overflow: hidden;
      color: #b9a5ed;
      font-size: 11px;
      line-height: 15px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }

  &__footer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  &__footer-actions--single {
    grid-template-columns: minmax(0, 1fr);
  }

  &__footer-button {
    width: 100%;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #7f56d9;
    border-radius: 9px;
    background: transparent;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    cursor: pointer;

    &:disabled {
      cursor: not-allowed;
      opacity: 0.56;
    }

    &:not(:disabled):hover,
    &:not(:disabled):active {
      color: #fff;
      border-color: #7a4df5;
      background: rgba(127, 86, 217, 0.12);
    }
  }

  &__footer-button--primary {
    border-color: #6941c6;
    background: #6941c6;
    color: #ffffff;

    &:not(:disabled):hover,
    &:not(:disabled):active {
      border-color: #7f56d9;
      background: #7f56d9;
    }
  }
}

@keyframes pisell-ticket-move-target-pulse {
  50% {
    border-color: rgba(178, 148, 255, 1);
    background:
      linear-gradient(
        90deg,
        rgba(105, 65, 198, 0.25),
        rgba(127, 86, 217, 0.08)
      ),
      #111626;
  }
}

.pisell-sale-detail-ticket-record {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
  --ticket-record-border-color: rgba(127, 86, 217, 0.72);
  --ticket-record-accent-color: #7f56d9;
  border: 1px solid var(--ticket-record-border-color);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(31, 24, 55, 0.96), rgba(11, 16, 31, 0.98)),
    #101828;
  box-shadow:
    inset 4px 0 0 var(--ticket-record-accent-color),
    0 10px 24px rgba(0, 0, 0, 0.22);
  color: var(--pisell-line-item-text-primary, #f9fafb);

  &--used {
    --ticket-record-border-color: rgba(148, 163, 184, 0.58);
    --ticket-record-accent-color: #94a3b8;
    background:
      linear-gradient(135deg, rgba(55, 65, 81, 0.88), rgba(10, 18, 31, 0.98)),
      #101828;
  }

  &--expired {
    --ticket-record-border-color: rgba(245, 158, 11, 0.62);
    --ticket-record-accent-color: #f59e0b;
    background:
      linear-gradient(135deg, rgba(69, 43, 10, 0.9), rgba(10, 18, 31, 0.98)),
      #101828;
  }

  &__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px 6px 14px;
    background: transparent;
  }

  &__number {
    flex: none;
    max-width: 42%;
    overflow: hidden;
    color: #d9e2ff;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    line-height: 24px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__time {
    min-width: 0;
    overflow: hidden;
    color: var(--pisell-line-item-text-secondary, #d0d5dd);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__holder-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 2px 10px 0 14px;
  }

  &__holder {
    display: -webkit-box;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 18px;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  &__venue {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px 8px;
    color: var(--pisell-line-item-text-secondary, #d0d5dd);
    font-size: 12px;

    strong {
      color: #f9fafb;
    }
  }

  &__guest {
    padding: 0 10px 8px;
    color: var(--pisell-line-item-text-secondary, #d0d5dd);
    font-size: 12px;

    strong {
      color: #f9fafb;
    }
  }

  &__actions {
    display: grid;
    gap: 8px;
    max-height: 54px;
    padding: 10px 10px 10px;
    overflow: hidden;
    opacity: 1;
    transition:
      max-height 220ms ease,
      padding 220ms ease,
      opacity 140ms ease;
  }

  &__actions--redeemable {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  &__actions--checked-in {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  &__primary-action,
  &__secondary-action {
    width: 100%;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    background: #6941c6;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    cursor: pointer;

    &:disabled {
      cursor: not-allowed;
      opacity: 0.56;
    }
  }

  &__primary-action {
    border-radius: 9px;
  }

  &__secondary-action {
    border: 1px solid #7f56d9;
    border-radius: 9px;
    background: transparent;
  }

  &--checked-in {
    .pisell-sale-detail-ticket-record__secondary-action {
      border: 1px solid #7f56d9;
      background: transparent;
      color: #ffffff;
    }

    .pisell-sale-detail-ticket-record__primary-action {
      border: 1px solid #6941c6;
      background: #6941c6;
      color: #ffffff;
    }
  }

  &--moving-to-used {
    --ticket-record-border-color: rgba(161, 122, 255, 0.96);
    --ticket-record-accent-color: #9168f3;
    animation: pisell-ticket-moving-pulse 1.1s ease-in-out infinite;

    .pisell-sale-detail-ticket-record__actions {
      max-height: 0;
      padding-top: 0;
      padding-bottom: 0;
      opacity: 0;
      pointer-events: none;
    }
  }

  &--arrived-in-used {
    animation: pisell-ticket-arrive-in-used 560ms
      cubic-bezier(0.22, 0.8, 0.2, 1);
  }

  &__move-status {
    display: flex;
    align-items: center;
    gap: 9px;
    max-height: 0;
    padding: 0 12px 0 14px;
    overflow: hidden;
    color: #e4d7ff;
    opacity: 0;
    pointer-events: none;
    transition:
      max-height 220ms ease,
      padding 220ms ease,
      opacity 180ms ease;
  }

  &--moving-to-used &__move-status {
    max-height: 50px;
    padding-top: 2px;
    padding-bottom: 10px;
    opacity: 1;
  }

  &__success-icon {
    display: grid;
    flex: none;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid rgba(74, 222, 128, 0.72);
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    box-shadow:
      0 0 0 5px rgba(34, 197, 94, 0.12),
      0 0 18px rgba(34, 197, 94, 0.24);
    animation: pisell-ticket-success-pop 320ms
      cubic-bezier(0.2, 0.9, 0.3, 1.25);
  }

  &__move-copy {
    display: flex;
    flex: 1;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    font-size: 12px;
    line-height: 18px;

    strong {
      color: #86efac;
    }

    span {
      color: #c8b7f5;
    }
  }

  &__move-arrow {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(127, 86, 217, 0.2);
    font-size: 15px;
    font-weight: 900;
    line-height: 24px;
    text-align: center;
    animation: pisell-ticket-move-arrow 900ms ease-in-out infinite;
  }
}

@keyframes pisell-ticket-moving-pulse {
  50% {
    --ticket-record-border-color: rgba(190, 165, 255, 0.96);
    --ticket-record-accent-color: #a98bfa;
  }
}

@keyframes pisell-ticket-success-pop {
  from {
    opacity: 0;
    transform: scale(0.35);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pisell-ticket-arrive-in-used {
  from {
    opacity: 0.72;
    transform: translateY(-16px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pisell-ticket-move-arrow {
  50% {
    transform: translateY(3px);
  }
}
