/* Results and Progress Page Styles - Optimized for Mobile Conversions */

/* Main title - compact for mobile */
.main-title {
  font-size: 1.6em;
  margin-bottom: 0.5em;
  font-weight: 700;
  color: var(--color-heading);
  text-align: center;
}

@media (min-width: 600px) {
  .main-title {
    font-size: 2.25em;
    margin-bottom: 0.5em;
  }
}

/* Results Layout - Mobile First */
.results-flex {
  display: flex;
  flex-direction: column;
  gap: 1em;
  margin-top: 1em;
  align-items: center;
}

@media (min-width: 800px) {
  .results-flex {
    flex-direction: row;
    gap: 2.5em;
    align-items: flex-start;
    justify-content: center;
    margin-top: 2em;
  }
}

/* Image container */
.results-image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  width: 100%;
  max-width: 280px;
}

@media (min-width: 800px) {
  .results-image-container {
    min-height: 260px;
    max-width: 350px;
  }
}

/* Sticker preview image with dynamic sizing */
.results-image {
  width: 160px;
  height: auto;
  max-width: 160px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: width 0.3s ease, max-width 0.3s ease;
  /* SVG filter for white outline effect - uses inline SVG in results.html for mobile compatibility */
  -webkit-filter: url(#results-sticker-outline) drop-shadow(0 0 2px rgba(0,0,0,1));
  filter: url(#results-sticker-outline) drop-shadow(0 0 2px rgba(0,0,0,1));
}

/* Form container */
.results-form {
  width: 100%;
  max-width: 420px; /* Increased from 380px for mobile */
  background: var(--color-bg-form);
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--shadow-primary-medium);
  padding: 1.2em;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--color-border-light);
}

@media (min-width: 600px) {
  .results-form {
    padding: 1.5em;
    max-width: 480px; /* Slightly larger for tablets/desktops */
  }
}

/* Section labels */
.section-label {
  display: block;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5em;
}

/* Size selection section */
.size-selection-section {
  margin-bottom: 1em;
}

#size-btn-group {
  display: flex;
  gap: 0.5em;
}

#size-btn-group input[type="radio"] {
  display: none;
}

.size-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.7em 0.4em;
  border-radius: 8px;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 0;
}

.size-btn:hover {
  border-color: var(--color-primary);
}

.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.02);
  box-shadow: 0 3px 12px var(--shadow-primary-intense);
}

.size-value {
  font-size: 1.1em;
  font-weight: 700;
}

.size-price {
  font-size: 0.85em;
  opacity: 0.8;
  margin-top: 0.2em;
}

/* Type selection (vinyl/hologram) - subtle pill style */
.type-selection-section {
  display: flex;
  gap: 0.5em;
  margin-bottom: 1em;
}

.type-option {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95em;
  margin: 0;
  padding: 0.7em 0.4em;
  border-radius: 8px;
  background: var(--color-bg-light, #f5f5f5);
  border: 2px solid var(--color-border);
  transition: background 0.2s, border-color 0.2s;
  font-weight: 600;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.type-option:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.type-option:has(input:checked) {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-color: var(--color-primary-dark);
  color: var(--color-text-dark);
}

.type-option:has(input:checked) .type-label {
  color: var(--color-text-dark);
}

.type-option input[type="radio"] {
  display: none;
}

.type-label {
  font-weight: 600;
}

/* Quantity section with bundle highlight */
.quantity-section {
  margin-bottom: 1em;
}

.quantity-options {
  display: flex;
  gap: 0.5em;
}

.quantity-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8em 0.5em;
  border-radius: 8px;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  margin: 0;
  box-shadow: 0 2px 8px var(--shadow-primary-light);
}

.quantity-option input[type="radio"] {
  display: none;
}

.quantity-option:hover {
  border-color: var(--color-primary);
  transform: scale(1.02);
}

.quantity-option:has(input:checked) {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-color: var(--color-primary-dark);
  transform: scale(1.02);
  box-shadow: 0 3px 12px var(--shadow-primary-intense);
}

.quantity-option:has(input:checked) .qty-label {
  color: var(--color-text-dark);
}

.qty-label {
  font-size: 1em;
  font-weight: 700;
  transition: color 0.2s;
}

/* Bundle option - same style as regular, badge provides the highlight */
.quantity-bundle {
  border-color: var(--color-border);
}

.quantity-bundle:has(input:checked) {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-color: var(--color-primary-dark);
}

.bundle-badge {
  font-size: 0.65em;
  background: var(--color-primary-dark);
  color: var(--color-text-dark);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  margin-top: 0.25em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Product features */
.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: 1em;
  justify-content: center;
}

.feature {
  font-size: 0.75em;
  background: var(--color-bg-light, #f5f5f5);
  color: var(--color-text);
  padding: 0.3em 0.6em;
  border-radius: 4px;
  font-weight: 500;
}

/* Checkout section */
.checkout-section {
  margin-bottom: 0.8em;
}

/* Sticky buy button container on mobile */
@media (max-width: 800px) {
  .checkout-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 1em;
    background: var(--color-bg-form);
    box-shadow: 0 -4px 12px var(--shadow-primary-medium);
    z-index: 1000;
    transition: transform 0.3s ease;
  }
  
  .checkout-section.unstick {
    position: static;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0.8em;
  }
  
  /* Add padding to form to prevent content from being hidden behind sticky button */
  .results-form {
    padding-bottom: 120px;
  }
  
  .results-form:has(.checkout-section.unstick) {
    padding-bottom: 1.2em;
  }
}

.btn-checkout {
  width: 100%;
  padding: 1em 1.5em;
  font-size: 1.15em;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-dark);
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 12px var(--shadow-primary-btn);
  transition: all 0.2s;
}

.btn-checkout:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  box-shadow: 0 5px 20px var(--shadow-primary-hover);
  transform: translateY(-1px);
}

.btn-checkout:disabled {
  background: #ccc;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
}

/* Original price badge (strikethrough) */
#original-price-badge {
  display: none;
  margin-left: 0.5em;
  padding: 0.15em 0.4em;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-size: 0.8em;
  text-decoration: line-through;
  opacity: 0.85;
  font-weight: 400;
}

/* Shipping note */
.shipping-note {
  font-size: 0.85em;
  color: var(--color-text);
  opacity: 0.8;
  margin-top: 0.5em;
  text-align: center;
  margin-bottom: 0;
}

.free-shipping {
  font-weight: 700;
}

/* Collapsible Discount Section */
.discount-section {
  border-top: 1px solid var(--color-border-light);
  padding-top: 0.8em;
}

.discount-toggle {
  display: block;
  font-size: 0.85em;
  color: var(--color-text);
  opacity: 0.7;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.2s;
}

.discount-toggle:hover,
.discount-toggle.open {
  opacity: 1;
}

.discount-form {
  display: none;
  margin-top: 0.8em;
}

.discount-form.open {
  display: block;
}

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

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

.discount-input-group input[type="text"]:focus {
  outline: none;
  border-color: var(--color-primary);
}

.btn-secondary {
  padding: 0.5em 0.8em;
  font-size: 0.9em;
  border-radius: 6px;
  background: var(--color-white);
  color: var(--color-text);
  border: 1.5px 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);
}

#discount-message {
  margin-top: 0.4em;
  font-size: 0.85em;
}

.discount-success {
  color: var(--color-success, #28a745);
  font-weight: 600;
}

.discount-error {
  color: var(--color-error, #dc3545);
}

.discount-warning {
  color: var(--color-warning, #856404);
}

/* Shipping form (hidden by default) */
#shipping-form {
  display: none;
  margin-top: 0;
}

#shipping-form h3 {
  font-size: 1.1em;
  margin-bottom: 0.8em;
  color: var(--color-heading);
}

#shipping-form input,
#shipping-form select {
  width: 100%;
  padding: 0.7em;
  font-size: 1em;
  border-radius: 8px;
  border: 1.5px solid var(--color-border);
  margin-bottom: 0.6em;
  background: var(--color-white);
  color: var(--color-text);
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#shipping-form input:focus,
#shipping-form select:focus {
  outline: none;
  border-color: var(--color-primary-dark);
  box-shadow: 0 0 0 2px var(--shadow-primary-light);
}

#shipping-info {
  margin: 0.8em 0;
  font-size: 0.9em;
  color: var(--color-text);
  line-height: 1.5;
}

#shipping-form button {
  width: 100%;
  padding: 0.9em;
  font-size: 1.1em;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-dark);
  border: none;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 3px 12px var(--shadow-primary-btn);
  transition: all 0.2s;
}

#shipping-form button:hover {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  box-shadow: 0 5px 20px var(--shadow-primary-hover);
}

/* AI Generation limit bars */
.ai-gen-bar {
  margin-bottom: 1em;
  border-radius: 8px;
  font-size: 0.95em;
  font-weight: 500;
  padding: 0.8em 1em;
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.ai-gen-bar svg {
  flex-shrink: 0;
}

.ai-gen-blocked {
  background: linear-gradient(90deg, #ffeaea 0%, #ffd6d6 100%);
  color: #a94442;
  border: 1.5px solid #ffb3b3;
  box-shadow: 0 2px 8px rgba(255, 71, 71, 0.10);
}

.ai-gen-warning {
  background: linear-gradient(90deg, #fffbe6 0%, #ffe9b3 100%);
  color: #7a5c00;
  border: 1.5px solid #ffe066;
  box-shadow: 0 2px 8px rgba(255, 224, 102, 0.10);
}

/* Alert styles */
.alert-danger {
  background: #ffeaea;
  color: #a94442;
  padding: 1em;
  border-radius: 8px;
  border: 1px solid #ffb3b3;
}

.feedback-messages {
  margin-bottom: 1em;
}

/* Try Again Button */
.try-again-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  margin-top: 1em;
  padding: 0.6em 1.2em;
  font-size: 0.9em;
  color: var(--color-text);
  background: var(--color-bg-light, #f5f5f5);
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.try-again-link:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.try-again-icon {
  font-size: 1.1em;
}
