/**
 * Published Client Quote Cart Stylesheet
 * Matches https://tenddy.shop/store/ayme-pet
 * Reference constants from .runtime/published-acceptance/reference-order-styles.json
 */

.order-entry-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.order-entry-overlay.open {
  opacity: 1 !important;
  visibility: visible !important;
}

.order-entry-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(2, 6, 23, 0.8);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.order-entry-panel-wrap {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  max-width: 100%;
  display: flex;
  padding-left: 0;
}

@media (min-width: 640px) {
  .order-entry-panel-wrap {
    padding-left: 2.5rem;
  }
}

.order-entry-panel {
  width: 100vw;
  max-width: 28rem;
  height: 100%;
  border-left: 1px solid rgba(166, 28, 46, 0.28);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  background-color: rgb(10, 17, 40);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.order-entry-overlay.open .order-entry-panel {
  transform: translateX(0);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#order-entry-drawer,
#order-entry-panel,
.order-entry-panel {
  --tenant-primary: #A61C2E;
  --tenant-primary-hover: #921928;
  --tenant-primary-light: rgba(166, 28, 46, 0.10);
  --tenant-primary-border: rgba(166, 28, 46, 0.28);
  --tenant-primary-text: #ffffff;
  --tenant-bg: #0a1128;
  font-family: "Instrument Sans", "Plus Jakarta Sans", sans-serif !important;
  line-height: 1.6;
  color: oklch(0.968 0.007 247.896);
  background-color: rgb(10, 17, 40) !important;
  border-left: 1px solid rgba(166, 28, 46, 0.28);
  box-sizing: border-box;
}

/* Header typography and buttons */
#order-entry-drawer .order-entry-header {
  padding: 16px;
  border-bottom: 1px solid rgba(166, 28, 46, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-sizing: border-box;
}

@media (max-width: 640px) {
  #order-entry-drawer .order-entry-header {
    padding: 20px 16px 16px 16px;
  }
}

#order-entry-drawer .order-entry-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

#order-entry-drawer .order-entry-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(166, 28, 46, 0.28);
  background-color: rgba(166, 28, 46, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgb(166, 28, 46);
  box-sizing: border-box;
}

#order-entry-drawer .order-entry-title,
#order-entry-panel .order-entry-title,
#order-entry-drawer h3.order-entry-title {
  font-family: Montserrat, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 17.5px;
  color: #ffffff !important;
  margin: 0;
}

#order-entry-drawer .order-entry-count,
#order-entry-panel .order-entry-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-size: 11px !important;
  font-weight: 400;
  line-height: 17.6px;
  color: oklch(0.704 0.04 256.788) !important;
  margin-top: 2px;
  margin-bottom: 0;
}

#order-entry-drawer .order-entry-close-btn {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
  box-sizing: border-box;
}

#order-entry-drawer .order-entry-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Location selector row */
#order-entry-drawer .order-entry-location-row {
  padding: 10px 16px;
  background-color: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  line-height: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

#order-entry-drawer .order-entry-location-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: oklch(0.704 0.04 256.788);
}

#order-entry-drawer .order-entry-location-label svg {
  color: rgb(166, 28, 46);
  flex-shrink: 0;
}

#order-entry-drawer .order-entry-location-select {
  background-color: rgb(30, 41, 59);
  color: rgb(226, 232, 240);
  border: 1px solid rgb(51, 65, 85);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}

/* Scrollable cart body */
#order-entry-drawer .order-entry-body {
  flex: 1 1 0%;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#order-entry-drawer .order-items-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 0 auto;
  box-sizing: border-box;
}

/* Cart item card */
#order-entry-drawer .order-item-card {
  background-color: rgba(2, 6, 23, 0.8);
  border: 1px solid rgb(30, 41, 59);
  border-radius: 12px;
  padding: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  transition: border-color 0.15s ease;
}

#order-entry-drawer .order-item-card:hover {
  border-color: rgba(166, 28, 46, 0.4);
}

#order-entry-drawer .order-item-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

#order-entry-drawer .order-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background-color: rgb(15, 23, 42);
  border: 1px solid rgb(30, 41, 59);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
  box-sizing: border-box;
}

#order-entry-drawer .order-item-thumb img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

#order-entry-drawer .order-item-details {
  flex: 1 1 0%;
  min-width: 0;
  padding-right: 24px;
}

#order-entry-drawer .order-item-title,
#order-entry-drawer h4.order-item-title {
  font-family: Montserrat, sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 16px;
  color: #ffffff !important;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#order-entry-drawer .order-item-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

#order-entry-drawer .order-item-sku {
  font-size: 11px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-weight: 500 !important;
  line-height: 17.6px;
  color: rgb(166, 28, 46) !important;
}

#order-entry-drawer .order-item-tier {
  font-size: 10px;
  font-weight: 600;
  color: rgb(52, 211, 153);
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0 6px;
  border-radius: 4px;
  line-height: 16px;
  box-sizing: border-box;
}

#order-entry-drawer .order-item-packaging {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
}

#order-entry-drawer .order-item-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #64748b;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

#order-entry-drawer .order-item-remove:hover {
  color: #fb7185;
}

/* Bottom quantity controls row */
#order-entry-drawer .order-item-bottom {
  padding-top: 8px;
  border-top: 1px solid rgba(30, 41, 59, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#order-entry-drawer .order-qty-ctrls {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgb(15, 23, 42);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 18px;
  padding: 2px;
  box-sizing: border-box;
}

#order-entry-drawer .order-qty-btn {
  width: 22px;
  height: 22px;
  padding: 4px;
  color: #94a3b8;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease, opacity 0.15s ease;
  box-sizing: border-box;
}

#order-entry-drawer .order-qty-btn:hover:not(:disabled) {
  color: #ffffff;
}

#order-entry-drawer .order-qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

#order-entry-drawer .order-qty-display {
  font-size: 12px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  padding: 0 8px;
  color: #ffffff;
}

#order-entry-drawer .order-units-display {
  font-size: 12px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  color: rgb(52, 211, 153);
}

/* Totals summary & checkout CTA */
#order-entry-drawer .order-summary-box {
  margin-top: auto;
  margin-left: -16px;
  margin-right: -16px;
  margin-bottom: -16px;
  padding: 16px;
  border-top: 1px solid rgba(166, 28, 46, 0.28);
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

#order-entry-drawer .order-summary-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  line-height: 16px;
  box-sizing: border-box;
}

#order-entry-drawer .order-summary-label {
  color: #94a3b8;
}

#order-entry-drawer .order-summary-val {
  font-weight: 700;
}

#order-entry-drawer .order-continue-btn {
  width: 100%;
  height: 40px;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  padding: 12px 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: rgb(166, 28, 46);
  color: #ffffff;
  border: 0;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transition: all 0.15s ease;
  box-sizing: border-box;
}

#order-entry-drawer .order-continue-btn:hover {
  opacity: 0.9;
}

#order-entry-drawer .order-continue-btn:active {
  transform: scale(0.99);
}

/* Internal checkout form */
#order-entry-drawer #published-order-checkout-form,
#order-entry-drawer form.space-y-4 {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

#order-entry-drawer .order-checkout-banner {
  border-radius: 12px;
  padding: 12px;
  font-size: 12px;
  line-height: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background-color: rgba(166, 28, 46, 0.1);
  border: 1px solid rgba(166, 28, 46, 0.28);
  color: rgb(248, 250, 252);
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

#order-entry-drawer .order-checkout-banner strong {
  font-weight: 700;
  color: rgb(248, 250, 252);
}

#order-entry-drawer .space-y-3 {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

#order-entry-drawer .order-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
}

#order-entry-drawer .order-form-label {
  display: block;
  color: oklch(0.704 0.04 256.788);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  margin-bottom: 4px;
}

#order-entry-drawer .order-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

#order-entry-drawer .order-input-wrapper svg,
#order-entry-drawer .order-input-icon {
  position: absolute;
  left: 12px;
  top: 9px;
  color: #64748b;
  pointer-events: none;
  width: 16px;
  height: 16px;
}

#order-entry-drawer .order-input {
  width: 100%;
  height: 34px;
  background-color: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 18px;
  padding: 8px 12px 8px 36px;
  color: #ffffff;
  font-family: "Instrument Sans", "Plus Jakarta Sans", sans-serif !important;
  font-size: 12px;
  line-height: 16px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#order-entry-drawer .order-textarea {
  width: 100%;
  height: 54px;
  background-color: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 18px;
  padding: 10px;
  color: #ffffff;
  font-family: "Instrument Sans", "Plus Jakarta Sans", sans-serif !important;
  font-size: 12px;
  line-height: 16px;
  outline: none;
  resize: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#order-entry-drawer .order-input:focus,
#order-entry-drawer .order-textarea:focus {
  border-color: #A61C2E;
  box-shadow: 0 0 0 1px #A61C2E;
}

#order-entry-drawer .order-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

#order-entry-drawer .order-form-buttons {
  padding-top: 8px;
  display: flex;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

#order-entry-drawer .order-btn-back {
  width: calc((100% - 8px) / 3);
  flex: 0 0 calc((100% - 8px) / 3);
  height: 36px;
  background-color: rgb(30, 41, 59);
  color: rgb(203, 213, 225);
  font-family: "Instrument Sans", "Plus Jakarta Sans", sans-serif !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  padding: 10px 0;
  border-radius: 18px;
  border: 0;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease;
  box-sizing: border-box;
}

#order-entry-drawer .order-btn-back:hover {
  background-color: #334155;
}

#order-entry-drawer .order-btn-submit {
  width: calc((100% - 8px) * 2 / 3);
  flex: 0 0 calc((100% - 8px) * 2 / 3);
  height: 36px;
  background-color: rgb(5, 150, 105);
  color: #ffffff;
  font-family: "Instrument Sans", "Plus Jakarta Sans", sans-serif !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  padding: 10px 0;
  border-radius: 18px;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.2), 0 4px 6px -4px rgba(5, 150, 105, 0.2);
  transition: background-color 0.15s ease, opacity 0.15s ease;
  box-sizing: border-box;
}

#order-entry-drawer .order-btn-submit:hover:not(:disabled) {
  background-color: #10b981;
}

#order-entry-drawer .order-btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
