/* Caddy Classics return portal. Everything is scoped under .ccr so the store
   theme and the portal can't restyle each other. In theme layout the font
   comes from the theme; the standalone page sets its own (below). */

.ccr {
  --ccr-accent: #123f21;
  --ccr-accent-ink: #ffffff;
  --ccr-ink: #1a1a1a;
  --ccr-muted: #5f6368;
  --ccr-line: #e3e3e0;
  --ccr-soft: #f6f6f3;
  --ccr-good: #1f7a3f;
  --ccr-good-soft: #e8f3ec;
  --ccr-warn-soft: #fff6e0;
  --ccr-bad: #b3261e;
  --ccr-bad-soft: #fdecea;
  --ccr-radius: 12px;
  box-sizing: border-box;
  max-width: 640px;
  margin: 24px auto 64px;
  padding: 0 16px;
  color: var(--ccr-ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}
.ccr *,
.ccr *::before,
.ccr *::after {
  box-sizing: border-box;
}
.ccr h1,
.ccr h2,
.ccr h3,
.ccr p {
  margin: 0;
  letter-spacing: normal;
  text-transform: none;
}
.ccr h1 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
}
.ccr h2 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 650;
}
.ccr h3 {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}
.ccr .ccr-sub {
  color: var(--ccr-muted);
  font-size: 15px;
}
.ccr .ccr-small {
  font-size: 13px;
  color: var(--ccr-muted);
}
.ccr .ccr-stack > * + * {
  margin-top: 16px;
}
.ccr .ccr-stack-sm > * + * {
  margin-top: 8px;
}
.ccr .ccr-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ccr .ccr-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ccr .ccr-shell-loading {
  padding: 48px 0;
  text-align: center;
  color: var(--ccr-muted);
}
.ccr :focus-visible {
  outline: 2px solid var(--ccr-accent);
  outline-offset: 2px;
}
/* Headings are focused programmatically on step change for screen readers. */
.ccr h1[tabindex="-1"]:focus {
  outline: none;
}
.ccr a {
  color: var(--ccr-accent);
  text-underline-offset: 2px;
}
.ccr a.ccr-btn {
  color: var(--ccr-accent-ink);
  text-decoration: none;
}

/* Standalone page: our own document, so the portal owns the body, the brand
   header (logo, or the store name in plain type) and the font. */
body.ccr-page {
  margin: 0;
  background: #ffffff;
  color: #111111;
  font-family: "DIN Pro", "DINPro", "DIN Next LT Pro", "D-DIN", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.ccr-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 16px;
  background: #ffffff;
  border-bottom: 1px solid #e6e6e6;
}
.ccr-brand-link {
  display: inline-flex;
  align-items: center;
  color: #111111;
  text-decoration: none;
}
.ccr-brand-link:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 4px;
  border-radius: 4px;
}
.ccr-brand-logo {
  display: block;
  height: 64px;
  width: auto;
  max-width: min(320px, 80vw);
  object-fit: contain;
}
.ccr-brand-name {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #111111;
}

/* Header + progress */
.ccr-head {
  margin-bottom: 20px;
}
.ccr-head .ccr-sub {
  margin-top: 6px;
}
.ccr-progress {
  display: flex;
  gap: 6px;
  margin: 18px 0 4px;
}
.ccr-progress span {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--ccr-line);
}
.ccr-progress span.on {
  background: var(--ccr-accent);
}

/* Cards */
.ccr-card {
  background: #fff;
  border: 1px solid var(--ccr-line);
  border-radius: var(--ccr-radius);
  padding: 20px;
}
.ccr-card + .ccr-card {
  margin-top: 12px;
}
.ccr-card.soft {
  background: var(--ccr-soft);
  border-color: transparent;
}

/* Banners */
.ccr-banner {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.ccr-banner svg {
  flex: 0 0 18px;
  margin-top: 2px;
}
.ccr-banner.good {
  background: var(--ccr-good-soft);
  color: #134d28;
}
.ccr-banner.warn {
  background: var(--ccr-warn-soft);
  color: #5c4400;
}
.ccr-banner.bad {
  background: var(--ccr-bad-soft);
  color: var(--ccr-bad);
}
.ccr-banner.info {
  background: var(--ccr-soft);
  color: var(--ccr-ink);
}

/* Form controls */
.ccr label.ccr-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.ccr input.ccr-input,
.ccr textarea.ccr-input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ccr-ink);
  background: #fff;
  border: 1px solid #c9c9c4;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0;
  box-shadow: none;
  min-height: 48px;
  -webkit-appearance: none;
  appearance: none;
}
.ccr textarea.ccr-input {
  min-height: 84px;
  resize: vertical;
}
.ccr input.ccr-input:focus,
.ccr textarea.ccr-input:focus {
  border-color: var(--ccr-accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ccr-accent) 18%, transparent);
}

/* Buttons */
.ccr button {
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}
.ccr .ccr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--ccr-accent);
  background: var(--ccr-accent);
  color: var(--ccr-accent-ink);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  transition: filter 120ms ease, transform 60ms ease;
}
.ccr .ccr-btn:hover {
  filter: brightness(1.08);
}
.ccr .ccr-btn:active {
  transform: translateY(1px);
}
.ccr .ccr-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}
.ccr .ccr-btn.ghost {
  background: #fff;
  color: var(--ccr-ink);
  border-color: #c9c9c4;
}
.ccr .ccr-btn.inline {
  width: auto;
}
.ccr .ccr-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ccr-accent);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.ccr .ccr-howto {
  padding-left: 18px;
}
.ccr .ccr-howto li + li {
  margin-top: 4px;
}
.ccr .ccr-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.ccr .ccr-actions .ccr-btn.ghost {
  flex: 0 0 auto;
  width: auto;
}
.ccr .ccr-spin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: ccr-spin 0.7s linear infinite;
}
@keyframes ccr-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Items */
.ccr-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--ccr-line);
  border-radius: var(--ccr-radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.ccr-item + .ccr-item {
  margin-top: 10px;
}
.ccr-item.selected {
  border-color: var(--ccr-accent);
  box-shadow: 0 0 0 1px var(--ccr-accent);
}
.ccr-item.disabled {
  cursor: default;
  opacity: 0.6;
}
.ccr .ccr-thumb {
  width: 64px;
  height: 64px;
  max-width: none;
  border-radius: 8px;
  object-fit: cover;
  background: var(--ccr-soft);
  flex: 0 0 64px;
  display: block;
}
.ccr-item .ccr-item-body {
  flex: 1;
  min-width: 0;
}
.ccr-item .ccr-item-title {
  font-weight: 600;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ccr-check {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid #b8b8b2;
  flex: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ccr-item.selected .ccr-check {
  background: var(--ccr-accent);
  border-color: var(--ccr-accent);
  color: #fff;
}
.ccr-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ccr-soft);
  color: var(--ccr-muted);
}
.ccr-pill.good {
  background: var(--ccr-good-soft);
  color: var(--ccr-good);
}

/* Quantity stepper */
.ccr-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c9c9c4;
  border-radius: 999px;
  overflow: hidden;
}
.ccr-qty button {
  width: 36px;
  height: 36px;
  border: 0;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  color: var(--ccr-ink);
}
.ccr-qty span {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
}

/* Choice chips + option cards */
.ccr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ccr-chip {
  border: 1px solid #c9c9c4;
  background: #fff;
  color: var(--ccr-ink);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 14px;
  cursor: pointer;
  min-height: 40px;
}
.ccr-chip.on {
  border-color: var(--ccr-accent);
  background: var(--ccr-accent);
  color: var(--ccr-accent-ink);
}
.ccr-option {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--ccr-line);
  border-radius: var(--ccr-radius);
  background: #fff;
  cursor: pointer;
  width: 100%;
  text-align: left;
  color: var(--ccr-ink);
}
.ccr-option + .ccr-option {
  margin-top: 10px;
}
.ccr-option.on {
  border-color: var(--ccr-accent);
  box-shadow: 0 0 0 1px var(--ccr-accent);
}
.ccr-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #b8b8b2;
  flex: 0 0 22px;
  margin-top: 1px;
  position: relative;
}
.ccr-option.on .ccr-radio {
  border-color: var(--ccr-accent);
}
.ccr-option.on .ccr-radio::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--ccr-accent);
}
.ccr-option .ccr-option-body {
  flex: 1;
}
.ccr-option .ccr-option-title {
  font-weight: 600;
}
.ccr-option .ccr-amount {
  font-weight: 700;
  white-space: nowrap;
}

/* Photos */
.ccr-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ccr-photo {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
}
.ccr-upload {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1.5px dashed #b8b8b2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ccr-muted);
  background: #fff;
  font-size: 26px;
  position: relative;
}
.ccr-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Summary */
.ccr-lines > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 15px;
}
.ccr-lines > div.total {
  border-top: 1px solid var(--ccr-line);
  margin-top: 6px;
  padding-top: 12px;
  font-weight: 700;
  font-size: 17px;
}

/* Status timeline */
.ccr-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ccr-steps li {
  position: relative;
  padding: 0 0 18px 34px;
  color: var(--ccr-muted);
}
.ccr-steps li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #c9c9c4;
  background: #fff;
}
.ccr-steps li::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--ccr-line);
}
.ccr-steps li:last-child::after {
  display: none;
}
.ccr-steps li.done {
  color: var(--ccr-ink);
}
.ccr-steps li.done::before {
  background: var(--ccr-accent);
  border-color: var(--ccr-accent);
}
.ccr-steps li.done::after {
  background: var(--ccr-accent);
}
.ccr-steps li.current {
  font-weight: 700;
}
.ccr-qr {
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
  border: 1px solid var(--ccr-line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}
.ccr-success-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ccr-good-soft);
  color: var(--ccr-good);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ccr-orders .ccr-item {
  cursor: pointer;
}
.ccr-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ccr-muted);
  font-size: 13px;
  margin: 20px 0;
}
.ccr-divider::before,
.ccr-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ccr-line);
}
.ccr-fade {
  animation: ccr-fade 180ms ease;
}
@keyframes ccr-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 480px) {
  .ccr {
    margin-top: 12px;
  }
  .ccr-brand {
    min-height: 72px;
    padding: 12px 16px;
  }
  .ccr-brand-logo {
    height: 44px;
  }
  .ccr-brand-name {
    font-size: 19px;
  }
  .ccr h1 {
    font-size: 24px;
  }
  .ccr-card {
    padding: 16px;
  }
  .ccr .ccr-thumb {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ccr-fade,
  .ccr .ccr-spin {
    animation: none;
  }
}
