/* =========================================================
   SHORTCODE-ONLY SCOPING (Checkout-safe)
   - Keep Bricks SVG rules GLOBAL (do not scope) to avoid breaking buttons
   - Scope only Woo shipping method selectors + shared utility blocks
   ========================================================= */


/* === ONLY shortcode shipping list (prevents checkout leakage) ====== */
/* These selectors existed on checkout too. Scope them to the modal wrapper. */
.dd-flow-debug .woocommerce-shipping-methods #shipping_method input{
  min-width: 20px;
  min-height: 20px;
  accent-color: #8e1837;
}

.dd-flow-debug .woocommerce-shipping-methods #shipping_method{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.dd-flow-debug .woocommerce-shipping-methods #shipping_method label{
  display: flex;
  gap: 5px;
  cursor: pointer;
  color: #8e1837;
  font-weight: 600;
  font-size: 16px;
}

/* Active step display (safe to scope to modal flow) */
.dd-flow-debug .active-step.brxe-block {
  display: flex!important;
}


/* === Admin SVG tweaks – 2025-05-19 =============================== */
/* IMPORTANT: leave GLOBAL so Bricks SVG buttons elsewhere do not break */
#brxe-phalmw,
.brxe-svg,
svg.brxe-svg {
	/* compact padding around the icon */
	padding: 5px;
	max-height: 40px;
}

/* styled CTA built with Bricks’ “SVG button” element */
/* leave GLOBAL (this is your Bricks button styling) */
.dd-modal-btn.brxe-svg {
	background-color: #8e1837;
	padding: 6px 40px;              /* 6 px top/bottom, 40 px left/right  */
	border: 1px solid var(--bricks-border-color);
	border-radius: 6px;
	color: var(--base-ultra-light);
	text-align: center;
	transition: all 300ms ease;
	display: flex;
	justify-content: center;
	box-shadow: 0 2px 18px 0 #ffffff;
	cursor: pointer;
  aspect-ratio: 1;
  max-width: 40px;
}

/* leave GLOBAL (this is used all over your modal/buttons) */
.dd-modal-btn{
  background-color: var(--action);
  padding-top: 6px;
  padding-right: 40px;
  padding-bottom: 6px;
  padding-left: 40px;
  border: 1px solid var(--bricks-border-color);
  border-radius: 6px;
  color: var(--base-ultra-light);
  text-align: center;
  transition: all 300msease 0ms;
  display: flex;
  justify-content: center;
  box-shadow: 0px 2px 18px 0px #ffffff;
  cursor: pointer;
}


/* === Address book (My Account + delivery modal) ===================== */
.delivery-address-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.delivery-address-list > .delivery-address.dd-delivery-address-card,
.delivery-address-list > .delivery-address {
  border: 1px solid #111;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.delivery-address__text {
  font-size: 16px;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

.delivery-address__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.delivery-address__actions .delivery-address__delete {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  line-height: 0;
  flex-shrink: 0;
}

.delivery-address__actions .delivery-address__delete svg {
  width: 24px;
  height: 24px;
  display: block;
}

.delivery-address__actions .use-billing-address,
.delivery-address__actions .use-shipping-address {
  font-size: 12px;
  padding: 8px 12px;
  border: 1px solid #8e1837;
  background: #fff;
  color: #8e1837;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.delivery-address__actions .use-this-address {
  font-size: 12px;
  padding: 10px 12px;
  background-color: #8e1837;
  color: #fff;
  border: 1px solid #8e1837;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 991px) {
  .delivery-address-list > .delivery-address.dd-delivery-address-card,
  .delivery-address-list > .delivery-address {
    flex-direction: column;
    align-items: stretch;
  }

  .delivery-address__text {
    flex: none;
    width: 100%;
  }

  .delivery-address__actions {
    margin-left: 0;
    width: 100%;
    justify-content: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
  }

  .delivery-address__actions .delivery-address__delete {
    grid-column: 1 / -1;
    justify-self: start;
    margin-bottom: 2px;
  }

  .delivery-address__actions .use-billing-address,
  .delivery-address__actions .use-shipping-address {
    white-space: normal;
    text-align: center;
    min-width: 0;
  }

  .delivery-address__actions .use-this-address {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
  }
}

/* Modal flow: keep legacy hook (rules above apply globally) */
.dd-flow-debug .delivery-address-list .delivery-address .use-this-address {
  min-width: 0;
}


/* === Shipping details UI (scoped to modal flow) ==================== */
.dd-flow-debug .shipping-details p {
  margin-bottom: 0;
}


/* === Shipping method cards (scoped to modal flow) ================== */
.dd-flow-debug .shipping_method_item {
  background: whitesmoke;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 5px;
  padding-bottom: 15px;
}

.dd-flow-debug .shipping-method-notes ul{
  margin: 0px;
  font-size: 14px;
  padding-left: 20px;
}

.dd-flow-debug .shipping-method-notes .shipping-method-notes_title{
  padding-left: 30px;
  margin: 0px;
}

.dd-flow-debug .sm_item-date{
  font-weight: 600;
}

.dd-flow-debug .shipping_method_item .woocommerce-Price-amount.amount {
  margin-left: auto;
}

.dd-flow-debug .shipping_method_item-date {
  padding-left: 15px;
}

.dd-flow-debug .shipping_method_item-date .sm_item-date {
  font-size: 15px!important;
}

.dd-flow-debug .date-update.pickup {
  font-size: 16px;
}


/* === Confirmation step UI (scoped to modal flow) =================== */
.dd-flow-debug .users-model-title {
  font-size: 22px;
}

.dd-flow-debug .confirm-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 10px;
}

.dd-flow-debug .confirm-wrap > div {
  background: whitesmoke;
  padding: 10px;
  border-radius: 10px;
}

.dd-flow-debug .modal-actions-wrap {
  display: flex;
}


/* === Misc UI (scoped to modal flow) ================================ */
.dd-flow-debug .dd-filter-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  margin-right: 5px;
}

.dd-flow-debug .dd-filter-option span.dd-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.dd-flow-debug .dd-suggestion-actions .dd-suggestion-atc {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.dd-flow-debug .dd-suggestion-actions .dd-suggestion-atc:hover {
  background: #f3f4f6;
}

.dd-flow-debug .dd-suggestion-actions .dd-notify-when-in-stock {
  font-size: 0.75rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.dd-flow-debug .dd-suggestion-actions .dd-notify-when-in-stock:hover {
  background: #e5e7eb;
}

/* === Future Pickup Checkbox Styling ================================= */
.show-date-pick {
  accent-color: #8e1837 !important;
}

.show-date-pick:checked {
  background-color: #8e1837 !important;
  border-color: #8e1837 !important;
  accent-color: #8e1837 !important;
}

/* === Delivery Options Button in Address Book Modal ================== */
.dd-step-card.address-book.inner-step-2 .choose-method {
  margin-top: 20px;
  background-color: #8e1837;
  color: white;
}

.dd-step-card.address-book.inner-step-2 .choose-method * {
  color: white;
}

/* === Custom Monthly Calendar (Future Pickup / Special Delivery) ======= */
.dd-custom-calendar {
  margin: 1rem 0;
}

.dd-custom-calendar .dd-calendar-month {
  text-align: center;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: black;
}

.dd-custom-calendar .dd-calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
}

.dd-custom-calendar .dd-calendar-header span {
  font-size: 1.2rem;
  color: black;
  font-weight: bold;
}

.dd-custom-calendar .dd-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}

.dd-custom-calendar .dd-calendar-cell {
  position: relative;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.dd-custom-calendar .dd-calendar-cell:hover:not(.dd-calendar-cell--disabled):not(.dd-calendar-cell--selected) {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.dd-custom-calendar .dd-calendar-cell--disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.4;
}

.dd-custom-calendar .dd-calendar-cell--empty {
  border: none;
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.dd-custom-calendar .dd-calendar-cell-month-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: inherit;
}

.dd-calendar-tooltip {
  position: fixed;
  z-index: 100000;
  padding: 8px 12px;
  background: #1f2937;
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 6px;
  max-width: 240px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dd-calendar-tooltip.dd-calendar-tooltip--visible {
  opacity: 1;
  visibility: visible;
}

/* Delayed/backorder tooltip: bigger, right-aligned so it doesn't go off screen */
.dd-calendar-tooltip.dd-calendar-tooltip--delayed {
  padding: 14px 18px;
  font-size: 15px;
  min-width: 280px;
  max-width: 420px;
  left: auto;
}

.dd-delayed-info-icon {
  display: inline-flex;
  align-items: flex-start;
  user-select: none;
}

.dd-delayed-info-icon .dd-delayed-info-icon-svg {
  width: 14px;
  height: 14px;
  color: #8e1837;
}

.dd-custom-calendar .dd-calendar-cell.dd-calendar-cell--selected,
.dd-custom-calendar .dd-calendar-cell.dd-calendar-cell--selected:hover,
.dd-custom-calendar .dd-calendar-cell.dd-calendar-cell--selected:focus {
  background-color: #8e1837 !important;
  border-color: #8e1837 !important;
  color: #fff !important;
}

.dd-custom-calendar .dd-calendar-cell.dd-calendar-cell--selected .dd-calendar-cell-num,
.dd-custom-calendar .dd-calendar-cell.dd-calendar-cell--selected:hover .dd-calendar-cell-num,
.dd-custom-calendar .dd-calendar-cell.dd-calendar-cell--selected .dd-calendar-cell-month-tag,
.dd-custom-calendar .dd-calendar-cell.dd-calendar-cell--selected:hover .dd-calendar-cell-month-tag {
  color: #fff !important;
}

.dd-custom-calendar .dd-calendar-cell-num {
  display: block;
  font-size: 1.3rem;
  font-weight: 600;
}

.dd-custom-calendar .dd-calendar-confirm {
  width: 100%;
  padding: 10px 20px;
  background-color: #8e1837;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.dd-custom-calendar .dd-calendar-confirm:hover:not(:disabled) {
  background-color: #721429;
}

.dd-custom-calendar .dd-calendar-confirm:disabled {
  background-color: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}
