/* ------------------------------------------
   Upload-to-Print – Modern UI Styling
   Optimized for inline layout + readability
-------------------------------------------*/

:root {
  --utp-border: #e2e8f0;
  --utp-bg-light: #ffffff;
  --utp-bg-soft: #f8fafc;
  --utp-blue: #3b82f6;
  --utp-blue-dark: #2563eb;
  --utp-dark: #1e293b;
  --utp-text: #475569;
  --utp-radius: 8px;
  --utp-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --utp-link: #2563eb;
}

/* WRAPPER */
.utp-wrapper {
  padding: 20px;
  border-radius: var(--utp-radius);
  border: 1px solid var(--utp-border);
  background: var(--utp-bg-light);
  box-shadow: var(--utp-shadow);
  max-width: 780px;
  margin: 20px auto;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--utp-dark);
}

.utp-wrapper h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* TEXT */
.utp-wrapper p {
  color: var(--utp-text);
  margin: 4px 0 14px;
  font-size: 14px;
}

/* GLOBAL PROGRESS BAR */
#utp-progress-bar {
  width: 100%;
  height: 22px;
  background: #eff6ff;
  border-radius: 6px;
  overflow: hidden;
  margin: 10px 0 15px;
}

#utp-progress-bar div {
  height: 100%;
  width: 0%;
  background: var(--utp-blue);
  transition: width .3s ease;
  color: #fff;
  text-align: center;
  line-height: 22px;
  font-size: 13px;
  font-weight: 600;
}

/* FILE CARD */
.utp-card {
  background: var(--utp-bg-soft);
  border: 1px solid var(--utp-border);
  border-radius: var(--utp-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--utp-shadow);
  transition: box-shadow .2s ease;
}

.utp-card:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* HEADER */
.utp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.utp-card-header strong a {
  text-decoration: none;
  color: var(--utp-link);
  font-size: 15px;
}

.utp-card-header strong a:hover {
  text-decoration: underline;
}

.utp-pages-mini {
  font-size: 13px;
  color: var(--utp-text);
}

/* INLINE ROW */
.utp-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

/* INPUT LABEL */
.utp-label {
  font-size: 13px;
  color: #334155;
  font-weight: 500;
  margin-bottom: 3px;
  display: block;
}

/* RANGE */
.utp-range-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.utp-range-inline input {
  width: 60px !important;
}

/* COPIES RIGHT ALIGN */
.utp-copies-wrap input {
  text-align: right !important;
}

/* INPUTS */
.utp-row input[type="number"],
.utp-row select {
  width: 100%;
  padding: 7px 8px;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  transition: border .2s ease, box-shadow .2s ease;
}

.utp-row input:focus,
.utp-row select:focus {
  border-color: var(--utp-blue);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.25);
}

/* BINDING ROW */
.utp-binding-row {
  margin-top: 10px;
  padding: 10px 6px;
  background: #eef3ff;
  border-radius: 6px;
}

.utp-binding-label {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.utp-binding-label strong {
  font-weight: 600;
  color: var(--utp-dark);
}

/* SUMMARY */
.utp-summary {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--utp-text);
}

.utp-summary span {
  font-weight: 600;
  color: var(--utp-dark);
}

/* ADD TO CART BUTTON */
#utp-add-to-cart {
  margin-top: 14px;
  width: 100%;
  padding: 12px 0;
  background: var(--utp-blue);
  border: none;
  border-radius: var(--utp-radius);
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: background .2s ease;
}

#utp-add-to-cart:hover {
  background: var(--utp-blue-dark);
}

#utp-add-to-cart:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* CARD PROGRESS */
.utp-progress {
  width: 100%;
  height: 7px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.utp-progress div {
  height: 100%;
  width: 0%;
  background: var(--utp-blue);
  transition: width .3s ease;
}

/* DRAG STATE */
#utp-wrapper.utp-dragover {
  border: 2px dashed var(--utp-blue);
  background: #eff6ff;
}

/* RESPONSIVE */
@media (max-width: 680px) {
  .utp-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .utp-row {
    grid-template-columns: 1fr;
  }
}
