/* VMS Ticketing Entitlements (Public) */

.vms-entitlements-block {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 16px;
  font-size: 16px;
}

.vms-entitlements-block.vms-entitlements--compact {
  margin: 12px 0;
  padding: 12px;
  border-radius: 12px;
  font-size: 16px;
}

.tribe-tickets__tickets .vms-entitlements-block.vms-entitlements--compact,
.tribe-tickets__tickets-form .vms-entitlements-block.vms-entitlements--compact,
#tribe-tickets .vms-entitlements-block.vms-entitlements--compact {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.vms-entitlements-block.vms-entitlements--compact h3 {
  font-size: 16px;
  margin: 0 0 6px;
}

.vms-entitlements-note {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.45;
}

.vms-entitlements-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}

.vms-ent-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 86px 120px;
  gap: 12px;
  align-items: start;
  padding: 12px 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  transition: background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.vms-ent-row:first-child {
  border-top: 0;
}

.vms-ent-row + .vms-ent-row {
  margin-top: 8px;
}

.vms-ent--selected {
  background: rgba(11, 102, 92, 0.08);
  border-color: rgba(11, 102, 92, 0.28);
}

.vms-ent--pool-disabled {
  opacity: 0.72;
}

.vms-ent-img {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(0, 0, 0, 0.02);
}

.vms-ent-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vms-ent-main {
  min-width: 0;
}

.vms-ent-title {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}
.vms-ent-descline {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.vms-ent-short {
  font-size: 13px;
  line-height: 1.45;
}

.vms-ent-more {
  display: inline;
  margin-left: 6px;
}

.vms-ent-more summary {
  display: inline;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.vms-ent-more summary::-webkit-details-marker {
  display: none;
}

.vms-ent-more summary::marker {
  content: "";
}

.vms-ent-more[open] {
  display: block;
  margin: 7px 0 0;
}

.vms-ent-more-body {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.45;
}


.vms-ent-note {
  margin-top: 7px;
  min-height: 16px;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.66);
}

.vms-ent-price {
  align-self: start;
  min-width: 86px;
  white-space: nowrap;
  text-align: right;
  font-size: 17px;
  font-weight: 600;
  opacity: 0.9;
}

.vms-ent-qty {
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

/* Icon-only remove buttons (row + subtotal) */
.vms-ent-remove,
.vms-sub-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  font-size: 18px;
  opacity: 0.85;
  color: #1f2937;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Keep the row remove (×) in-place for symmetry, but hide it until qty > 0.
   We reserve its space on every row so the minus/input/plus never shift. */
.vms-ent-qty .vms-ent-remove{
  width: 24px;
  height: 24px;
  font-size: 16px;
  margin-left: 10px;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.vms-ent-qty .vms-ent-remove.vms-is-visible{
  visibility: visible;
  pointer-events: auto;
  opacity: 0.85;
}
@media (max-width: 480px){
  .vms-ent-qty .vms-ent-remove{ margin-left: 6px; }
}

/* Hover intent: make it obvious this removes */
.vms-ent-remove:hover,
.vms-sub-remove:hover {
  opacity: 1;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
  color: #dc2626;
}

/* Keyboard accessibility */
.vms-ent-remove:focus-visible,
.vms-sub-remove:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.65);
  outline-offset: 2px;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
  color: #dc2626;
}

.vms-entitlements-add {
  padding: 6px 12px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  color: #111827;
  background: #ffffff;
}

.vms-entitlements-add:visited {
  color: #111827;
}

.vms-entitlements-add:hover,
.vms-entitlements-add:focus-visible {
  color: #111827;
  border-color: rgba(15, 23, 42, 0.35);
  background: #f8fafc;
  text-decoration: none;
}

.vms-ent-note a,
.vms-ent-note a:visited {
  color: #0f172a;
  text-decoration: underline;
}

.vms-ent-note a:hover,
.vms-ent-note a:focus-visible {
  color: #0f172a;
  text-decoration: underline;
}

.vms-entitlements-soldout {
  opacity: 0.74;
  white-space: nowrap;
}

.vms-entitlements-debug {
  margin-top: 12px;
}

.vms-entitlements-debug-list {
  margin: 10px 0 0;
}

@media (max-width: 782px) {
  .vms-ent-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .vms-ent-img {
    width: 72px;
    height: 72px;
  }

  .vms-ent-price {
    grid-column: 1 / -1;
    margin-top: 2px;
    text-align: left;
  }

  .vms-ent-qty {
    grid-column: 1 / -1;
    justify-self: start;
    flex-wrap: wrap;
  }

  .vms-ent-remove {
    margin-top: 2px;
  }

  .vms-ent-remove,
  .vms-sub-remove {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}


/* When embedded in the unified ticketing flow, keep add-ons as a simple section (not a separate card). */
.vms-ticketing-flow .vms-entitlements-block.vms-entitlements--compact {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}
