/* Main Container */
.print-upload-container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 24px;
  background-color: #f9fafb;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
}

.print-upload-container * {
  box-sizing: border-box;
}

/* Header */
.upload-header {
  background: white;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.upload-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}

.upload-subtitle {
  color: #6b7280;
  margin: 0;
  font-size: 16px;
}

/* Sections */
.material-section,
.laminate-section,
.upload-section,
.files-section,
.pricing-section,
.order-section {
  background: white;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  color: #111827;
}

.icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  color: #6b7280;
}

/* Upload Area */
.upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 16px;
}

.upload-area:hover {
  border-color: #3b82f6;
}

.upload-area.dragover {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: #9ca3af;
  margin: 0 auto 16px;
  display: block;
}

.upload-label {
  cursor: pointer;
}

.upload-text {
  font-size: 18px;
  font-weight: 500;
  color: #2563eb;
  display: block;
  margin-bottom: 8px;
}

.upload-text:hover {
  color: #1d4ed8;
}

.upload-hint {
  color: #6b7280;
  margin: 0;
  font-size: 14px;
}

.file-input {
  display: none;
}

/* Info Box */
.info-box {
  background-color: #eff6ff;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #6b7280;
  display: flex;
  align-items: center;
}

.info-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  color: #6b7280;
}

/* Files List */
.files-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.file-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.file-preview {
  width: 80px;
  height: 80px;
  background-color: #f3f4f6;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.file-preview .file-type {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  text-transform: uppercase;
}

.file-details {
  flex: 1;
}

.file-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.file-name {
  font-weight: 500;
  color: #111827;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-btn {
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.remove-btn:hover {
  color: #ef4444;
}

.file-dimensions {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 8px;
}

.file-error {
  display: flex;
  align-items: center;
  color: #dc2626;
  font-size: 14px;
  margin-top: 8px;
}

.file-error .error-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

.file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.file-tags {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.roll-tag {
  background-color: #dbeafe;
  color: #1e40af;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.linear-feet {
  color: #6b7280;
}

.file-price {
  font-weight: 600;
  font-size: 18px;
  color: #111827;
}

/* Processing States */
.processing-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.spinner {
  width: 24px;
  height: 24px;
  color: #3b82f6;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.file-status {
  font-size: 14px;
  margin: 4px 0;
}

.file-status.processing {
  color: #3b82f6;
  font-style: italic;
}

.remove-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Material Selection */
.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
  align-items: stretch; /* Forces all columns in a row to match height */
}

.material-option {
  position: relative;
  display: flex;
  flex-direction: column;
}

.material-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.material-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%; /* Stretches inside the option wrapper */
  padding: 20px 16px; /* Added extra vertical padding */
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  text-align: center;
}

.material-label:hover {
  border-color: #3b82f6;
  background-color: #f8fafc;
}

.material-radio:checked + .material-label {
  border-color: #3b82f6;
  background-color: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.material-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.3;
}

.material-pricing {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-54,
.price-60 {
  font-size: 14px;
  color: #6b7280;
  padding: 4px 8px;
  background-color: #f3f4f6;
  border-radius: 4px;
  text-align: center;
}

.price-54 {
  color: #059669;
  background-color: #f0fdf4;
}

.price-60 {
  color: #dc2626;
  background-color: #fef2f2;
}

/* Laminate Selection */
.laminate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.laminate-option {
  position: relative;
}

.laminate-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.laminate-label {
  display: block;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  text-align: center;
}

.laminate-label:hover {
  border-color: #3b82f6;
  background-color: #f8fafc;
}

.laminate-radio:checked + .laminate-label {
  border-color: #3b82f6;
  background-color: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.laminate-name {
  font-weight: 500;
  color: #111827;
  font-size: 14px;
}

/* File Quantity */
.file-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.quantity-label-small {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.quantity-input-small {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
}

.quantity-input-small:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Pricing Box */
.pricing-box {
  background-color: #f9fafb;
  border-radius: 8px;
  padding: 16px;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pricing-value {
  font-weight: 500;
}

.pricing-divider {
  border-top: 1px solid #e5e7eb;
  margin: 8px 0;
}

.total-row {
  font-size: 20px;
  font-weight: 700;
}

.total-price {
  color: #2563eb;
  font-size: 20px;
  font-weight: 700;
}

.pricing-info {
  margin-top: 16px;
  font-size: 14px;
  color: #6b7280;
}

.pricing-info-item {
  margin-bottom: 4px;
}

/* Order Form */
.order-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.order-summary {
  width: 100%;
  padding: 16px;
  background-color: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.order-note {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.add-to-cart-btn {
  background-color: #2563eb;
  color: white;
  padding: 8px 32px;
  border-radius: 6px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  align-self: flex-start;
}

.add-to-cart-btn:hover {
  background-color: #1d4ed8;
}

.ready-indicator {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #059669;
}

.check-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  color: #059669;
}

/* Responsive Design */
@media (min-width: 640px) {
  .order-form {
    flex-direction: row;
    align-items: end;
  }
}

@media (max-width: 768px) {
  .print-upload-container {
    padding: 16px;
  }
  
  .upload-section,
  .files-section,
  .pricing-section,
  .order-section {
    padding: 16px;
  }
  
  .file-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .file-header {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  
  .file-info {
    flex-direction: column;
    gap: 8px;
  }
}

/* WP specific resets */
.print-upload-container h1, .print-upload-container h2, .print-upload-container h3 {
    clear: none;
}
.print-upload-container p {
    margin-bottom: 0;
}

/* Multi-Category Dynamic UI Styling */
.category-option:hover {
    background-color: #f8fafc;
    border-color: #3b82f6 !important;
}
.category-option {
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.dynamic-panel {
    background:#ffffff; 
    border: 1px solid #e5e7eb;
    padding:24px; 
    border-radius:8px; 
    margin-bottom:24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display:block; 
    font-weight:600; 
    margin-bottom:8px;
    color: #374151;
}

/* Dropdowns and Text Inputs */
.puw-control {
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0 14px;
    font-size: 16px;
    color: #111827;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
}

select.puw-control {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

.puw-control:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.puw-control::placeholder {
    color: #9ca3af;
}

/* Fleet Text Field Containers */
.fleet-text-fields input {
    margin-bottom: 12px;
}
.fleet-text-fields h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
    margin: 24px 0 16px 0 !important;
}

/* Checkboxes */
.checkbox-group label {
    cursor:pointer; 
    display:flex; 
    align-items:center; 
    gap:10px; 
    font-weight:600;
    color: #111827;
}
.checkbox-group input[type="checkbox"] {
    width:20px; 
    height:20px;
    accent-color: #3b82f6;
    border-radius: 4px;
}

/* Color Swatches and Toggles */
.color-swatch-wrapper input[type="radio"]:checked + .color-swatch {
    box-shadow: 0 0 0 3px #3b82f6;
    border-color: #fff !important;
    transform: scale(1.1);
}

.color-swatch {
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.color-swatch:hover {
    transform: scale(1.1);
    z-index: 1;
}

.toggle-group label {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-align: center;
    background: #f9fafb;
    font-size: 14px;
    font-weight: 500;
}

.toggle-group input[type="radio"] {
    margin-right: 5px;
}

/* Step Number Styling */
.step-number-text {
    color: #2563eb;
    margin-right: 4px;
}

.color-grid {
    background: #fff;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

