/* Results and Progress Page Styles */

/* Results Layout */
.results-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5em;
  margin-top: 2.5em;
}
@media (max-width: 800px) {
  .results-flex {
    flex-direction: column;
    gap: 1.5em;
  }
  .results-image,
  .results-form {
    max-width: 100%;
    min-width: 0;
    flex-basis: auto;
    width: 100%;
  }
}
.results-image {
  flex: 1 1 320px;
  min-width: 260px;
  max-width: 420px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border-radius: 18px;
  box-shadow: 0 6px 30px var(--shadow-primary-strong);
  background: transparent;
  /* Allow the image's alpha-based drop-shadow (contour outline) to render outside
     the container bounds instead of being clipped. */
  overflow: visible;
}
.results-image img {
  width: 100%;
  max-width: 380px;
  height: auto;
  background: transparent;

  /* Remove rectangular borders/shadows from the image so the PNG's natural
     shape is preserved and the contour filter can be applied cleanly. */
  border: none;
  border-radius: 0;
  box-shadow: none;

  /* Apply SVG filter with chained drop-shadow effect.
     The SVG filter creates a solid white contour outline (9px border) around
     the non-transparent pixels, and the drop-shadow adds a subtle shadow for depth.
     Both effects are combined in a single filter declaration to ensure they work together.
     Browsers that don't support SVG filters will gracefully degrade to showing just
     the original image without filters. */
  -webkit-filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='outline' x='-50%' y='-50%' width='200%' height='200%'><feMorphology in='SourceAlpha' operator='dilate' radius='9' result='dilated'/><feFlood flood-color='white' result='flood'/><feComposite in='flood' in2='dilated' operator='in' result='stroke'/><feMerge><feMergeNode in='stroke'/><feMergeNode in='SourceGraphic'/></feMerge></filter></svg>#outline") drop-shadow(0 0 2px rgba(0,0,0,1));
  filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='outline' x='-50%' y='-50%' width='200%' height='200%'><feMorphology in='SourceAlpha' operator='dilate' radius='9' result='dilated'/><feFlood flood-color='white' result='flood'/><feComposite in='flood' in2='dilated' operator='in' result='stroke'/><feMerge><feMergeNode in='stroke'/><feMergeNode in='SourceGraphic'/></feMerge></filter></svg>#outline") drop-shadow(0 0 2px rgba(0,0,0,1));
}

.results-form {
  flex: 1 1 320px;
  min-width: 260px;
  max-width: 420px;
  background: var(--color-bg-form);
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--shadow-primary-medium);
  padding: 2em 1.5em 1.5em 1.5em;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 2px solid var(--color-border-light);
}
.results-form h2 {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 1.1em; /* Match spacing to selector group */
}

/* Size Button Group */
#size-btn-group {
  display: flex;
  gap: 1em;
  margin-bottom: 1.1em; /* Match the spacing below 'Order Your Sticker' heading */
  justify-content: flex-start;
}
.size-btn {
  display: inline-block;
  padding: 1.5em 1.5em;
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-text);
  border: 2.5px solid var(--color-border);
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 900 !important;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  letter-spacing: 0.01em;
  transition: background 0.2s, border 0.2s, color 0.2s, transform 0.1s;
  margin-right: 0;
  box-shadow: 0 2px 8px var(--shadow-primary-light);
  flex: 1 1 0;
  min-width: 0;
  max-width: 140px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1em 0.5em;
  box-sizing: border-box;
}
.size-btn.selected {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-dark);
  border-color: var(--color-primary-dark);
  transform: scale(1.05);
  box-shadow: 0 3px 12px var(--shadow-primary-intense);
}

/* Add vertical centering for the size button group on results page */
.results-form #size-btn-group {
  margin-bottom: 0;
}
.results-form #size-btn-group {
  flex: none;
}
.results-form .size-btn {
  margin-bottom: 0;
}
/* Ensure the wrapper provides equal space above and below */
.results-form .size-btn-group-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 120px;
  margin-bottom: 0.5em;
}

/* Upgrade options */
.results-form label {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin-top: 0.2em; /* Reduce top margin for tight grouping with selector */
  margin-bottom: 1.1em; /* Add bottom margin for consistent spacing before checkout button */
  font-size: 1.08em;
  font-weight: 500;
  color: var(--color-text);
}
.results-form input[type="radio"] {
  accent-color: var(--color-primary);
  width: 1.1em;
  height: 1.1em;
}

/* Shipping form */
#shipping-form {
  margin-top: 0em; /* Further decreased from 1em to 0.2em for less space above Shipping & Payment */
}
#shipping-form input,
#shipping-form select {
  padding: 0.7em;
  font-size: 1.08em;
  border-radius: 8px;
  border: 2px solid var(--color-border);
  margin-bottom: 0.7em;
  background: var(--color-white);
  color: var(--color-text);
  font-weight: 500;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
#shipping-form input:focus,
#shipping-form select:focus {
  outline: none;
  border-color: var(--color-primary-dark);
  background: var(--color-primary-light);
  box-shadow: 0 0 0 3px var(--shadow-primary-light);
}
#shipping-form input[type="text"],
#shipping-form input[type="email"],
#shipping-form select {
  width: 100%;
  box-sizing: border-box;
}
#shipping-form button,
#shipping-form #pay-btn {
  width: 100%;
  box-sizing: border-box;
}
#shipping-form button {
  padding: 0.9em 2.2em;
  font-size: 1.13em;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text);
  border: none;
  cursor: pointer;
  margin-top: 1.2em;
  font-weight: 700;
  box-shadow: 0 3px 12px var(--shadow-primary-btn);
}
#shipping-form button.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: var(--color-text-dark);
  box-shadow: 0 5px 20px var(--shadow-primary-hover);
}

/* Discount code section */
.discount-section {
  margin: 1em 0;
}

.discount-input-group {
  display: flex;
  gap: 0.5em;
}

.discount-input-group input[type="text"] {
  flex: 1;
  padding: 0.5em;
  border-radius: 5px;
  border: 1px solid var(--color-border);
  font-size: 1em;
  transition: border-color 0.2s;
}

.discount-input-group input[type="text"]:focus {
  outline: none;
  border-color: var(--color-primary-dark);
  box-shadow: 0 0 0 2px var(--shadow-primary-light);
}

.btn-secondary {
  padding: 0.5em 1em;
  font-size: 1em;
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-text-dark);
}

/* Original price badge inside button */
#original-price-badge {
  display: inline;
  margin-left: 0.5em;
  padding: 0.2em 0.5em;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-size: 0.85em;
  text-decoration: line-through;
  opacity: 0.9;
  font-weight: 400;
}

/* Page heading consistent with upload page */
.main-title {
  font-size: 2.25em;
  margin-bottom: 0.5em;
  font-weight: 700;
  color: var(--color-heading);
  text-align: center;
}
.upload-subtitle {
  font-size: 1.25em;
  color: var(--color-text);
  margin-bottom: 2.2em;
  font-weight: 600;
  text-align: center;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
