.bpdt-box {
  --bpdt-border: #e5e7eb;
  --bpdt-muted: #6b7280;
  --bpdt-soft: #f8fafc;
  --bpdt-text: #111827;
  margin: 1.25rem 0;
  padding: 1.1rem;
  border: 1px solid var(--bpdt-border);
  border-radius: 16px;
  background: #fff;
  color: var(--bpdt-text);
}

.bpdt-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .8rem;
  font-size: 1.05rem;
}

.bpdt-title strong {
  font-weight: 700;
}

.bpdt-required {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  margin-right: .4rem;
}

.bpdt-current {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  margin: .65rem 0 1rem;
  padding: .75rem .9rem;
  border: 1px solid rgba(87, 171, 0, .24);
  border-radius: 12px;
  background: rgba(87, 171, 0, .06);
  color: #245b10;
  font-size: .92rem;
}

.bpdt-current-label {
  font-weight: 700;
}

.bpdt-message {
  margin: .6rem 0;
  padding: .7rem .85rem;
  border-radius: 12px;
  font-size: .92rem;
  line-height: 1.8;
}

.bpdt-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.bpdt-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.bpdt-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.bpdt-message.bpdt-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.bpdt-slots {
  width: 100%;
}

.bpdt-slot-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: .7rem;
}

.bpdt-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .28rem;
  width: 100%;
  min-height: 74px;
  padding: .82rem .9rem;
  border: 1px solid var(--bpdt-border);
  border-radius: 14px;
  background: #fff;
  color: var(--bpdt-text);
  cursor: pointer;
  text-align: right;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}

.bpdt-slot:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--bpdt-color-enabled, #57ab00);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

.bpdt-slot:focus-visible {
  outline: 3px solid rgba(87, 171, 0, .20);
  outline-offset: 2px;
}

.bpdt-slot.selected {
  border-color: var(--bpdt-color-enabled, #57ab00);
  background: rgba(87, 171, 0, .07);
  box-shadow: inset 0 0 0 1px var(--bpdt-color-enabled, #57ab00), 0 8px 20px rgba(15, 23, 42, .07);
}

.bpdt-slot.selected::after {
  content: '✓';
  position: absolute;
  top: .65rem;
  left: .65rem;
  width: 22px;
  height: 22px;
  line-height: 22px;
  border-radius: 999px;
  background: var(--bpdt-color-enabled, #57ab00);
  color: #fff;
  font-size: .8rem;
  text-align: center;
  font-weight: 700;
}

.bpdt-slot:disabled {
  cursor: not-allowed;
  opacity: .72;
  background: var(--bpdt-soft);
}

.bpdt-slot-date {
  display: block;
  color: var(--bpdt-muted);
  font-size: .82rem;
  line-height: 1.5;
}

.bpdt-slot-time {
  display: block;
  color: var(--bpdt-text);
  font-weight: 700;
  font-size: .98rem;
  line-height: 1.7;
}

.bpdt-slot-meta {
  display: inline-flex;
  margin-top: .18rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--bpdt-muted);
  font-size: .76rem;
  line-height: 1.6;
}

.bpdt-status-active {
  border-color: color-mix(in srgb, var(--bpdt-color-enabled, #57ab00) 45%, #e5e7eb);
}

.bpdt-status-full,
.bpdt-status-full_day {
  border-color: var(--bpdt-color-full, #ff0000);
  background: rgba(255, 0, 0, .045);
}

.bpdt-status-disabled,
.bpdt-status-expired {
  border-color: var(--bpdt-color-disabled, #a9a9a9);
  background: rgba(169, 169, 169, .11);
}

.bpdt-status-unavailable {
  border-color: var(--bpdt-color-unavailable, #ffa500);
  background: rgba(255, 165, 0, .09);
}

.bpdt-tabs {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  padding: .15rem .05rem .75rem;
  margin-bottom: .8rem;
  scrollbar-width: thin;
}

.bpdt-tab {
  flex: 0 0 auto;
  min-width: 128px;
  padding: .72rem .85rem;
  border: 2px solid var(--bpdt-border);
  border-radius: 14px;
  background: var(--bpdt-soft);
  color: var(--bpdt-text);
  cursor: pointer;
  text-align: right;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.bpdt-tab:hover,
.bpdt-tab.active {
  background: #fff;
 background: rgba(87, 171, 0, .07);
  border: 2px solid var(--bpdt-color-enabled, #57ab00);
}

.bpdt-tab-main,
.bpdt-tab-sub {
  display: block;
  white-space: nowrap;
}

.bpdt-tab-main {
  font-weight: 700;
  font-size: .92rem;
}

.bpdt-tab-sub {
  margin-top: .2rem;
  color: var(--bpdt-muted);
  font-size: .78rem;
}

.bpdt-tabpane {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: .65rem;
}

.bpdt-tabpane[hidden] {
  display: none;
}

.bpdt-slot--grouped {
  min-height: 58px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.bpdt-slot--grouped .bpdt-slot-time {
  font-size: .96rem;
}

.bpdt-slot--grouped .bpdt-slot-meta {
  align-self: center;
}

.bpdt-order-box {
  margin-top: 1rem;
}

@supports not (color: color-mix(in srgb, #000 50%, #fff)) {
  .bpdt-status-active {
    border-color: var(--bpdt-color-enabled, #57ab00);
  }
}

@media (max-width: 767px) {
  .bpdt-box {
    padding: .9rem;
    border-radius: 14px;
  }

  .bpdt-slot-list,
  .bpdt-tabpane {
    grid-template-columns: 1fr 1fr;
  }

  .bpdt-slot {
    min-height: 68px;
    padding: .75rem;
  }

  .bpdt-tab {
    min-width: 112px;
  }
}

@media (max-width: 420px) {
  .bpdt-slot-list,
  .bpdt-tabpane {
    grid-template-columns: 1fr;
  }
}


.bpdt-product-hint {
  margin: .75rem 0;
  direction: rtl;
  text-align: right;
}

.bpdt-product-hint-loading,
.bpdt-product-hint-empty {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .75rem .9rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  color: #4b5563;
  font-size: .92rem;
  line-height: 1.8;
}

.bpdt-product-hint-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #e5e7eb;
  border-top-color: #6b7280;
  animation: bpdt-spin .75s linear infinite;
  flex: 0 0 auto;
}

.bpdt-product-hint-box {
  padding: .75rem .9rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-size: .94rem;
  line-height: 2;
}

.bpdt-product-hint-box p {
  margin: 0;
}

.bpdt-product-hint-item[hidden] {
  display: none !important;
}

.bpdt-product-hint-icon {
  margin-left: .2rem;
}

.bpdt-product-hint-price {
  white-space: nowrap;
}

.bpdt-product-hint-more {
  margin-top: .25rem;
  padding: .15rem 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

@keyframes bpdt-spin {
  to { transform: rotate(360deg); }
}
