.sytec-delivery-calendar {
  width: 100%;
  max-width: 100%;
  margin: 18px 0;
  padding: 18px;
  background: var(--sytec-color-secondary, #fff);
  border-radius: var(--sytec-radius-medium, 12px);
  box-shadow: var(--sytec-shadow-small, 0 12px 30px rgba(15, 23, 42, .08));
  text-align: center;
  font-family: inherit;
  border: 1px solid var(--sytec-color-border, rgba(15, 23, 42, .08));
  box-sizing: border-box;
  overflow: hidden;
}
.sytec-delivery-calendar *,
.sytec-delivery-calendar *::before,
.sytec-delivery-calendar *::after {
  box-sizing: border-box;
}
.sytec-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  width: 100%;
  min-width: 0;
}
.sytec-calendar-head button {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--sytec-color-text, #111827);
}
.sytec-calendar-head > div {
  min-width: 0;
}
.sytec-cal-month,
.sytec-cal-year {
  display: block;
  font-size: 16px;
  letter-spacing: 0;
}
.sytec-cal-year { margin-top: 2px; }
.sytec-cal-weekdays,
.sytec-cal-grid {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  overflow: hidden;
  min-width: 0;
}
.sytec-cal-weekdays {
  margin-bottom: 8px;
  color: #9ca3af;
  font-size: 12px;
}
.sytec-cal-weekdays span,
.sytec-cal-grid span {
  min-width: 0;
  max-width: 100%;
}
.sytec-cal-day {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #111827;
  cursor: pointer;
  transition: background var(--sytec-transition, .18s ease), color var(--sytec-transition, .18s ease), transform var(--sytec-transition, .18s ease);
}
.sytec-cal-day:hover:not(:disabled) {
  background: color-mix(in srgb, var(--sytec-color-accent, #0b6fb8), transparent 88%);
  color: var(--sytec-color-accent, #0b6fb8);
  transform: translateY(-1px);
}
.sytec-cal-day.is-muted,
.sytec-cal-day:disabled {
  background: var(--sytec-color-surface, #f1f1f1);
  color: #c7cbd1;
  cursor: not-allowed;
}
.sytec-cal-day.is-selected {
  background: var(--sytec-color-accent, #0b6fb8);
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 111, 184, .28);
}
.sytec-cal-status {
  min-height: 1.35em;
  margin-top: 14px;
  font-size: 14px;
  color: var(--sytec-color-muted, #6b7280);
  letter-spacing: 0;
  line-height: 1.35;
}
.sytec-cal-help {
  margin-top: 8px;
  font-size: 13px;
  color: var(--sytec-color-text, #374151);
  letter-spacing: 0;
  line-height: 1.35;
}
/* Botón clásico */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button.sytec-disabled-checkout,
.woocommerce-checkout .wc-block-components-checkout-place-order-button.sytec-disabled-checkout,
.wc-block-cart__submit-button.sytec-disabled-checkout,
.wc-block-components-checkout-place-order-button.sytec-disabled-checkout {
  opacity: .45 !important;
  filter: grayscale(1);
  cursor: not-allowed !important;
}
/* Botones blocks */
a.wc-block-cart__submit-button.sytec-disabled-checkout,
button.wc-block-components-checkout-place-order-button.sytec-disabled-checkout {
  opacity: .45 !important;
  filter: grayscale(1);
}
.sytec-block-calendar-anchor {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.sytec-delivery-date-summary-anchor {
  width: 100%;
  min-width: 0;
}
.sytec-delivery-date-summary {
  width: 100%;
  max-width: 720px;
  margin: 16px auto;
  padding: 14px 16px;
  border: 1px solid var(--sytec-color-border, rgba(15, 23, 42, .1));
  border-radius: var(--sytec-radius-medium, 10px);
  background: var(--sytec-color-secondary, #fff);
  box-shadow: var(--sytec-shadow-small, 0 1px 3px rgba(15, 23, 42, .08));
  color: var(--sytec-color-text, #111827);
  font-size: 15px;
  box-sizing: border-box;
}
.sytec-delivery-date-summary__header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}
.sytec-delivery-date-summary__title {
  min-width: 0;
  margin: 0;
  color: var(--sytec-color-text, #111827);
  font-size: 1rem;
  line-height: 1.35;
}
.sytec-delivery-date-summary__details {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 7px;
  min-width: 0;
  margin-top: 4px;
  line-height: 1.45;
}
.sytec-delivery-date-summary__date,
.sytec-delivery-date-summary__time {
  min-width: 0;
  overflow-wrap: anywhere;
}
.sytec-delivery-date-summary.is-empty .sytec-delivery-date-summary__details {
  color: var(--sytec-color-muted, #6b7280);
}
.sytec-delivery-date-summary.is-selected .sytec-delivery-date-summary__date,
.sytec-delivery-date-summary.is-selected .sytec-delivery-date-summary__time {
  font-weight: 650;
}
.sytec-delivery-date-summary__time::before {
  content: "·";
  margin-right: 7px;
  color: var(--sytec-color-muted, #6b7280);
}
.sytec-delivery-date-summary .sytec-delivery-calendar-open {
  width: auto;
  min-height: 44px;
  flex: 0 0 auto;
  margin: 0;
  padding: .55rem .85rem;
  border: 1px solid var(--sytec-color-accent, #2563eb);
  border-radius: var(--sytec-button-radius, 8px);
  background: transparent;
  color: var(--sytec-color-accent, #2563eb);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background var(--sytec-transition, 180ms ease), border-color var(--sytec-transition, 180ms ease), box-shadow var(--sytec-transition, 180ms ease), color var(--sytec-transition, 180ms ease), transform var(--sytec-transition, 180ms ease);
}
.sytec-delivery-date-summary.is-empty .sytec-delivery-calendar-open {
  background: var(--sytec-color-accent, #2563eb);
  color: #fff;
}
.sytec-delivery-date-summary .sytec-delivery-calendar-open:hover {
  box-shadow: var(--sytec-shadow-small, 0 1px 3px rgba(15, 23, 42, .08));
  transform: translateY(-1px);
}
.sytec-delivery-date-summary.is-empty .sytec-delivery-calendar-open:hover {
  filter: brightness(.94);
}
.sytec-delivery-date-summary.is-selected .sytec-delivery-calendar-open:hover {
  background: color-mix(in srgb, var(--sytec-color-accent, #2563eb), transparent 92%);
}
.sytec-delivery-date-summary .sytec-delivery-calendar-open:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--sytec-color-accent, #2563eb), transparent 55%);
  outline-offset: 3px;
}
.sytec-delivery-date-order {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--sytec-color-border, rgba(15, 23, 42, .1));
  border-radius: var(--sytec-radius-medium, 10px);
  background: var(--sytec-color-secondary, #fff);
  color: var(--sytec-color-text, #111827);
  font-size: 15px;
}
.sytec-delivery-date-order h2 {
  margin: 0 0 4px;
  color: var(--sytec-color-text, #111827);
}
.sytec-delivery-date-summary-row th,
.sytec-delivery-date-summary-row td {
  color: #111827;
}
.sytec-delivery-modal-open {
  overflow: hidden !important;
}
.sytec-delivery-calendar-modal[hidden] {
  display: none !important;
}
.sytec-delivery-calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sytec-delivery-calendar-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .62);
}
.sytec-delivery-calendar-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--sytec-color-border, rgba(15, 23, 42, .1));
  border-radius: var(--sytec-radius-medium, 14px);
  background: var(--sytec-color-secondary, #fff);
  box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
  outline: none;
}
.sytec-delivery-calendar-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sytec-color-text, #111827);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.sytec-delivery-calendar-modal__title {
  margin: 0 42px 6px 0;
  color: var(--sytec-color-text, #111827);
  font-size: 22px;
  line-height: 1.25;
}
.sytec-delivery-calendar-modal__intro {
  margin: 0 42px 12px 0;
  color: var(--sytec-color-muted, #4b5563);
  font-size: 14px;
  line-height: 1.45;
}
.sytec-delivery-calendar-modal .sytec-delivery-calendar {
  margin-bottom: 0;
  box-shadow: none;
}
.sytec-delivery-time-slots[hidden] {
  display: none !important;
}
.sytec-delivery-time-slots {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--sytec-color-border, rgba(15, 23, 42, .1));
  text-align: left;
}
.sytec-delivery-time-slots__title {
  margin: 0 0 10px;
  color: var(--sytec-color-text, #111827);
  font-size: 17px;
}
.sytec-delivery-time-slots__options {
  display: grid;
  gap: 8px;
}
.sytec-delivery-time-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--sytec-color-border, rgba(15, 23, 42, .12));
  border-radius: var(--sytec-radius-medium, 8px);
  color: var(--sytec-color-text, #111827);
  cursor: pointer;
}
.sytec-delivery-time-slots__status {
  min-height: 1.35em;
  margin: 10px 0;
  color: var(--sytec-color-muted, #4b5563);
  font-size: 13px;
}
.sytec-delivery-time-slots__confirm {
  width: 100%;
}
@media (max-width: 768px) {
  .sytec-delivery-calendar-modal {
    align-items: flex-end;
    padding: 0;
  }
  .sytec-delivery-calendar-modal__dialog {
    width: 100%;
    max-height: 92vh;
    padding: 18px 12px 14px;
    border-radius: 16px 16px 0 0;
  }
  .sytec-delivery-calendar-modal__title {
    font-size: 19px;
  }
  .sytec-delivery-calendar {
    width: 100%;
    max-width: 100%;
    margin: 14px 0;
    padding: 12px;
    border-radius: 10px;
  }
  .sytec-calendar-head {
    gap: 8px;
    margin-bottom: 10px;
  }
  .sytec-calendar-head button {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    font-size: 22px;
  }
  .sytec-cal-month,
  .sytec-cal-year {
    font-size: 14px;
  }
  .sytec-cal-weekdays,
  .sytec-cal-grid {
    gap: 4px;
  }
  .sytec-cal-weekdays {
    font-size: 11px;
    margin-bottom: 6px;
  }
  .sytec-cal-day {
    border-radius: 6px;
    font-size: 12px;
  }
  .sytec-cal-status {
    margin-top: 10px;
    font-size: 13px;
  }
  .sytec-cal-help {
    display: none;
  }
}

@media (max-width: 480px) {
  .sytec-delivery-date-summary {
    padding: 14px;
  }
  .sytec-delivery-date-summary__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .sytec-delivery-date-summary__details {
    margin-top: 8px;
  }
  .sytec-delivery-date-summary .sytec-delivery-calendar-open {
    width: 100%;
  }
}
