/* Compare feature — checkbox on each mealbox card + sticky tray + modal */

.spudo-mealbox {
  position: relative;
}

.spudo-mealbox .spudo-compare-checkbox {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.spudo-mealbox .spudo-compare-checkbox:hover {
  border-color: #16A34A;
  color: #15803D;
}
.spudo-mealbox .spudo-compare-checkbox input {
  margin: 0;
  accent-color: #16A34A;
}
.spudo-mealbox .spudo-compare-checkbox.is-checked {
  border-color: #16A34A;
  color: #15803D;
  background: #ECFDF3;
}

.spudo-compare-tray {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: #0F172A;
  color: #FFFFFF;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(15,23,42,0.25);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
}
.spudo-compare-tray.is-visible {
  display: inline-flex;
}
.spudo-compare-tray-names {
  color: #E6E8E1;
  font-weight: 500;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spudo-compare-tray-open {
  padding: 8px 16px;
  background: #16A34A;
  color: #FFFFFF;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.15s ease;
}
.spudo-compare-tray-open:hover {
  background: #15803D;
}
.spudo-compare-tray-open:disabled {
  background: #4B5563;
  cursor: not-allowed;
}
.spudo-compare-tray-close {
  padding: 4px;
  background: transparent;
  color: #FFFFFF;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0.7;
}
.spudo-compare-tray-close:hover {
  opacity: 1;
}

.spudo-compare-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  background: rgba(15,23,42,0.6);
  padding: 24px;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
.spudo-compare-modal.is-open {
  display: block;
}
.spudo-compare-modal-inner {
  max-width: 1000px;
  margin: 20px auto;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 24px;
  color: #0F172A;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.spudo-compare-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5E7EB;
}
.spudo-compare-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}
.spudo-compare-modal-close {
  background: #F3F4EE;
  border: 0;
  color: #0F172A;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.spudo-compare-grid {
  display: grid;
  gap: 0;
  font-size: 14px;
  overflow-x: auto;
}
.spudo-compare-brandcell {
  padding: 16px;
  border-bottom: 1px solid #E5E7EB;
  text-align: center;
}
.spudo-compare-brandcell img {
  max-width: 160px;
  max-height: 60px;
  object-fit: contain;
  margin: 0 auto 8px;
}
.spudo-compare-brandcell-name {
  font-weight: 600;
  font-size: 15px;
}
.spudo-compare-brandcell-name a {
  color: #0F172A;
  text-decoration: none;
}
.spudo-compare-brandcell-name a:hover {
  color: #15803D;
}
.spudo-compare-label {
  padding: 12px 16px;
  background: #F3F4EE;
  font-weight: 600;
  color: #6B7280;
  font-size: 13px;
  border-bottom: 1px solid #EEF0F3;
}
.spudo-compare-cell {
  padding: 12px 16px;
  border-bottom: 1px solid #EEF0F3;
  text-align: center;
  color: #0F172A;
  font-variant-numeric: tabular-nums;
}
.spudo-compare-cell--price {
  font-weight: 600;
  color: #15803D;
}
.spudo-compare-ctacell {
  padding: 16px;
  text-align: center;
}
.spudo-compare-ctacell a {
  display: inline-block;
  padding: 10px 18px;
  background: #16A34A;
  color: #FFFFFF;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
}
.spudo-compare-ctacell a:hover {
  background: #15803D;
}
@media (max-width: 720px) {
  .spudo-compare-modal-inner {
    padding: 16px;
    margin: 8px auto;
  }
  .spudo-compare-modal-title {
    font-size: 18px;
  }
  .spudo-compare-grid {
    font-size: 13px;
  }
}
