/* OHPS Print Lab - Modern & Responsive UI */
#ohps-print-app { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #1a202c; line-height: 1.5; }
.ohps-wrap { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.ohps-title { text-align: center; font-weight: 800; font-size: 2rem; margin-bottom: 2rem; color: #2d3748; }
.ohps-steps { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.ohps-step { padding: 0.5rem 1rem; border-radius: 9999px; background-color: #edf2f7; color: #4a5568; font-weight: 600; font-size: 0.875rem; transition: all 0.2s ease-in-out; }
.ohps-step.is-active{ background-color: #3182ce; color: #ffffff; }
.ohps-card { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1.5rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03); }
.ohps-btn { font-family: inherit; font-size: 0.95rem; font-weight: 600; border-radius: 0.75rem; padding: 0.75rem 1.25rem; border: 1px solid #cbd5e0; background-color: #ffffff; color: #2d3748; cursor: pointer; transition: all 0.15s ease-in-out; -webkit-appearance: none; }
.ohps-btn:hover { background-color: #f7fafc; border-color: #a0aec0; }
.ohps-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ohps-btn--primary { background-color: #3182ce; border-color: #3182ce; color: #ffffff; }
.ohps-btn--primary:hover { background-color: #2b6cb0; border-color: #2b6cb0; }
.ohps-btn--secondary { background-color: #ebf4ff; border-color: #bee3f8; color: #3182ce; }
.ohps-btn--secondary:hover { background-color: #dbeafe; border-color: #90cdf4; }
.ohps-select, .ohps-input { padding: 0.6rem 1rem; border: 1px solid #cbd5e1; border-radius: 0.75rem; background-color: #fff; font-family: inherit; font-size: 1rem; }
.ohps-input { width: 80px; }
.ohps-btngroup { display: flex; border: 1px solid #cbd5e0; border-radius: 0.75rem; overflow: hidden; }
.ohps-btngroup__btn { flex: 1; border: none; border-radius: 0; background: #f7fafc; color: #4a5568; padding: 0.6rem 1rem; }
.ohps-btngroup__btn:hover { background: #edf2f7; }
.ohps-btngroup__btn.is-active { background: #3182ce; color: white; }

.ohps-tray { display: flex; gap: 1rem; overflow-x: auto; padding: 0.5rem 0.25rem 1rem; scrollbar-width: thin; }

/* UPDATED THUMBNAIL STYLES */
.ohps-thumb { 
    position: relative; 
    flex-shrink: 0; 
    width: 150px; /* Slightly wider to accommodate buttons */
    border: 3px solid transparent; 
    border-radius: 0.75rem; 
    background-color: #f7fafc; 
    overflow: hidden; 
    cursor: pointer; 
    text-align: center; 
    transition: border-color 0.2s;
    display: flex;
    flex-direction: column; /* Stack image, name, buttons vertically */
}
.ohps-thumb.is-active { border-color: #3182ce; }

.ohps-thumb img { 
    width: 100%; 
    height: 100px; /* Fixed height for image part */
    object-fit: contain; 
    background-color: #e2e8f0; 
    display: block; 
    border-bottom: 1px solid #e2e8f0;
}

.ohps-thumb small { 
    display: block; 
    padding: 0.5rem; 
    font-size: 0.75rem; 
    color: #4a5568; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
}

/* NEW CONTROLS STYLING (Buttons below name) */
.ohps-thumb-ctrls {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    justify-content: center;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    margin-top: auto; /* Pushes buttons to the bottom if content stretches */
}

.ohps-thumb-btn {
    flex: 1; /* Buttons share space evenly */
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #cbd5e0;
    background-color: #f7fafc;
    color: #4a5568;
    border-radius: 0.375rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.ohps-thumb-btn:hover {
    background-color: #e2e8f0;
    border-color: #a0aec0;
}

.ohps-thumb-btn.is-remove {
    color: #e53e3e;
    border-color: #feb2b2;
    background-color: #fff5f5;
}

.ohps-thumb-btn.is-remove:hover {
    background-color: #fecaca;
    border-color: #f56565;
}

/* Rest of the CSS stays the same */
.ohps-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.ohps-chip { background-color: #ebf4ff; color: #3182ce; border: 1px solid transparent; border-radius: 9999px; padding: 0.5rem 1rem; cursor: pointer; font-weight: 600; font-size: 0.8rem; transition: all 0.2s; }
.ohps-chip.is-active { background-color: #3182ce; color: #fff; }
.ohps-chip .price { opacity: 0.8; margin-left: 0.5rem; }
.ohps-sheet-wrap{ border: 2px dashed #cbd5e1; border-radius: 1rem; padding: 1rem; background-color: #f7fafc; height: 58vh; min-height: 420px; display: flex; align-items: center; justify-content: center; margin: 1rem 0; }
.ohps-sheet{ width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.ohps-canvas { display: block; max-width: 100%; max-height: 100%; margin: auto; background-color: #e2e8f0; }
.ohps-controls-container { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.ohps-controls-top-row { display: flex; justify-content: center; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.ohps-control-group { display: flex; flex-direction: column; gap: 0.25rem; }
.ohps-control-group label { font-size: 0.8rem; font-weight: 600; color: #4a5568; padding-left: 0.25rem; }
.ohps-control-group .ohps-btn { margin-top: auto; } 
.ohps-unit-price { text-align: center; font-weight: 600; margin-top: 0.5rem; color: #2d3748; }
.ohps-controls-nav-row { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.ohps-nav-right { display: flex; gap: 0.75rem; }
.ohps-review-item{ display: flex; flex-direction: column; gap: 1rem; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1rem; margin-bottom: 1rem; }
.ohps-mini{ width: 100%; max-width: 240px; height: auto; aspect-ratio: 4 / 3; background-color: #f7fafc; border-radius: 0.5rem; object-fit: contain; border: 1px solid #e2e8f0; }
.ohps-col{ display: flex; flex-direction: column; gap: 0.5rem; flex-grow: 1; }
.ohps-review-sub { font-size: 0.9rem; color: #718096; }
.ohps-info{ margin-top: 1rem; padding: 1rem; border: 1px solid #e2e8f0; border-radius: 1rem; background-color: #f7fafc; font-size: 0.875rem; color: #4a5568; }
.ohps-zoom-modal{ position:fixed; inset:0; background:rgba(0,0,0,.85); display:flex; align-items:center; justify-content:center; z-index:99990; padding: 2rem; }
.ohps-zoom-container { position: relative; max-width: 100%; max-height: 100%; }
.ohps-zoom-img{ max-width:100%; max-height:90vh; border-radius:0.5rem; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.ohps-zoom-close { position: absolute; top: -15px; right: -15px; width: 36px; height: 36px; background: white; border-radius: 50%; border: 2px solid #cbd5e0; font-size: 1.2rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.2); color: #4a5568; }
.ohps-zoom-close:hover { background: #f7fafc; color: #e53e3e; }

@media (min-width: 768px) {
  .ohps-review-item { flex-direction: row; align-items: center; }
  .ohps-mini { width: 200px; height: 150px; }
}
@media (max-width: 767px) {
  .ohps-card { padding: 1rem; }
  .ohps-sheet-wrap { height: 50vh; min-height: 300px; }
  .ohps-controls-top-row { gap: 1rem; }
  .ohps-control-group { width: 45%; }
  .ohps-control-group .ohps-btn { width: 100%; }
}