/**
 * 2026 Tricore Info Tech
 * Tricore Product Estimated Delivery Styles
 */

/* Hide default prestashop availability text when module is active */
#product-availability.js-product-availability {
  display: none !important;
}

/* =========================================================
   1. Size / Attribute Buttons with Status Indicator Dots
   ========================================================= */
.product-variants .input-container {
  position: relative !important;
  display: inline-block !important;
  cursor: pointer !important;
}

.product-variants input.input-radio {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 10 !important;
  margin: 0 !important;
  display: block !important;
}

.product-variants .radio-label {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 44px !important;
  height: 38px !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  border: 1px solid #dcdcdc !important;
  background-color: #ffffff !important;
  color: #222222 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  pointer-events: none !important; /* Critical: clicks pass to input.input-radio */
  transition: all 0.2s ease !important;
  z-index: 1 !important;
}

/* Checked/Active size box */
.product-variants input.input-radio:checked + .radio-label {
  background-color: #2b2927 !important;
  border-color: #2b2927 !important;
  color: #ffffff !important;
}

/* Top-right Status Dot inside Size Option */
.tped-attr-dot {
  position: absolute !important;
  top: 4px !important;
  right: 5px !important;
  width: 5.5px !important;
  height: 5.5px !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  z-index: 2 !important;
  display: block !important;
}

.tped-attr-dot.tped-dot-ready_to_ship,
.tped-attr-dot.tped-dot-ready,
.tped-attr-dot.tped-dot-green {
  background-color: #0e8345 !important;
}

.tped-attr-dot.tped-dot-made_to_order,
.tped-attr-dot.tped-dot-made,
.tped-attr-dot.tped-dot-orange {
  background-color: #c87a2a !important;
}

/* =========================================================
   2. Status Legend
   ========================================================= */
.tped-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 10px 0 16px 0;
  font-size: 11.5px;
  color: #666666;
  line-height: 1.4;
}

.tped-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tped-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.tped-dot.tped-dot-green {
  background-color: #0e8345;
}

.tped-dot.tped-dot-orange {
  background-color: #c87a2a;
}

.tped-legend-label {
  font-size: 11.5px;
  color: #666666;
  font-weight: 500;
}

/* =========================================================
   3. Estimated Delivery Card Box
   ========================================================= */
.tped-container {
  margin: 16px 0 20px 0;
  width: 100%;
  box-sizing: border-box;
  clear: both;
}

.tped-box {
  background-color: #ffffff;
  border: 1px solid #e7e9ec;
  border-radius: 0px;
  box-sizing: border-box;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

/* Ready To Ship Left Border (Green) */
.tped-box.tped-status-ready {
  border-left: 3.5px solid #0e8345 !important;
}

/* Made To Order Left Border (Orange / Amber) */
.tped-box.tped-status-made {
  border-left: 3.5px solid #c87a2a !important;
}

.tped-card {
  padding: 16px 20px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-sizing: border-box;
}

/* Header with Icon and Title */
.tped-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.tped-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.tped-icon-truck {
  color: #0e8345;
}

.tped-icon-needle {
  color: #c87a2a;
}

.tped-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #222222;
  line-height: 1.3;
  letter-spacing: -0.1px;
}

/* Subtitle for Made To Order */
.tped-card-subtitle {
  margin: 0 0 2px 32px;
}

.tped-subtitle-text {
  font-size: 12px;
  color: #666666;
  line-height: 1.4;
}

/* Dates Row */
.tped-card-dates {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 2px 32px;
  font-size: 13.5px;
  color: #222222;
  line-height: 1.4;
}

.tped-dates-prefix {
  font-weight: 500;
  color: #444444;
}

.tped-date-range {
  font-weight: 700;
  color: #111111;
  letter-spacing: 0.1px;
}

/* Made to Order Pill Badge */
.tped-pill-badge {
  display: inline-flex;
  align-items: center;
  background-color: #fdf6e7;
  border: 1px solid #e8bc5e;
  color: #946313;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 12px;
  line-height: 1.3;
}

/* Footer Guarantee / Free Shipping Text */
.tped-card-footer {
  margin: 2px 0 0 32px;
}

.tped-footer-text {
  font-size: 12px;
  color: #777777;
  line-height: 1.45;
}

/* =========================================================
   4. Responsive Adjustments
   ========================================================= */
@media (max-width: 767px) {
  .tped-card {
    padding: 14px 14px 14px 14px;
  }
  .tped-card-subtitle,
  .tped-card-dates,
  .tped-card-footer {
    margin-left: 30px;
  }
  .tped-card-title {
    font-size: 13px;
  }
  .tped-card-dates {
    font-size: 13px;
  }
  .tped-footer-text,
  .tped-subtitle-text {
    font-size: 11.5px;
  }
}
