/* group-pricing.css
   Chip shown on a saved duration row + the editor tool inside the duration
   panel (max group per booking, per-person tiers, live net total).
   Follows the same visual language as payment-dropdown.css. */

/* ---------- Chip on the saved row ---------- */
.duration-group-card {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

/* ---------- Editor dropdown ---------- */
.group-pricing-dropdown {
  display: inline-block;
  margin-left: 8px;
  position: relative;
  font-size: 0.85rem;
}

.group-pricing-dropdown > summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 12px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
  white-space: nowrap;
}
.group-pricing-dropdown > summary::-webkit-details-marker { display: none; }
.group-pricing-dropdown[open] > summary { border-color: #6366f1; }

.group-pricing-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  min-width: 320px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.group-pricing-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
}
.group-pricing-row label { font-weight: 600; }

/* ---------- Tier table ---------- */
.group-pricing-tiers-head,
.group-tier-row {
  display: grid;
  grid-template-columns: 1fr 1fr 28px;
  gap: 8px;
  align-items: center;
}

.group-pricing-tiers-head {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 6px;
}

.group-tier-row { margin-bottom: 6px; }
.group-tier-row input {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.tier-remove {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
}
.tier-remove:hover { background: #fee2e2; }

.group-pricing-add {
  margin-top: 4px;
  padding: 5px 10px;
  border: 1px dashed #a5b4fc;
  background: #f8faff;
  color: #3730a3;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
.group-pricing-add:hover { background: #eef2ff; }

.group-pricing-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 400;
  white-space: normal;
}

/* ---------- Net total preview ---------- */
.group-pricing-net {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}
.group-pricing-net label { font-weight: 600; }
.group-pricing-net input {
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}
.group-pricing-net-out {
  font-size: 1.05rem;
  color: #166534;
}
.group-pricing-net .group-pricing-hint { margin-top: 0; flex-basis: 100%; }

@media (max-width: 600px) {
  .group-pricing-menu {
    position: static;
    min-width: 0;
    width: 100%;
    box-shadow: none;
    margin-top: 8px;
  }
}
/* ---------- Max bookings per time slot (php/lib/max_bookings_lib.php) ----------
   Same pill as the group chip; amber like "N spots", because it's capacity too. */
.duration-maxbook-card,
.schedule-card.owner-schedule .duration-maxbook-card {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}