/* =====================================================================
   Print tab — temperature cards, progress bar, SD file selector
   ===================================================================== */

.print-temp-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.temp-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.temp-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.temp-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.temp-value small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
}

.temp-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.temp-bar > div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--danger));
  transition: width .4s ease;
}

.temp-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.temp-actions input[type="number"] {
  width: 80px;
  flex: none;
}

.temp-actions select {
  flex: 1;
}

/* Print progress card */
.print-progress-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.print-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  width: fit-content;
}

.print-badge-offline,
.print-badge-idle {
  background: var(--surface-3);
  color: var(--text-dim);
}

.print-badge-busy {
  background: var(--accent-soft);
  color: var(--accent-hover);
  animation: print-blink 1.2s ease-in-out infinite;
}

.print-badge-pausing,
.print-badge-paused {
  background: var(--warning-soft);
  color: var(--warning);
}

.print-badge-done {
  background: var(--success-soft);
  color: var(--success);
}

.print-badge-error,
.print-badge-cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}

@keyframes print-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

.progress-bar-container {
  height: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: var(--r-md);
  transition: width .5s ease;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* SD file selector */
#sd-file-select {
  font-family: var(--font-mono);
  font-size: 12px;
}

#sd-file-select option {
  padding: 4px 6px;
}

/* Print control card */
.print-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Print info in sidebar */
.print-info {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.print-info .pos-row b {
  width: auto;
  margin-right: 4px;
}

/* Quick actions with park */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-actions .btn {
  width: 100%;
}

/* =====================================================================
   Connection — Duet mode field
   ===================================================================== */

#field-duet .input {
  font-family: var(--font-mono);
}

/* =====================================================================
   RTL adjustments for print tab
   ===================================================================== */

[dir="rtl"] .temp-actions input[type="number"] {
  direction: ltr;
  text-align: right;
}

[dir="rtl"] .temp-actions select {
  padding-right: 10px;
  padding-left: 28px;
  background-position: left 10px center;
}

[dir="rtl"] #sd-file-select {
  direction: ltr;
  text-align: left;
}

[dir="rtl"] .progress-info {
  direction: ltr;
}

[dir="rtl"] .temp-value {
  direction: ltr;
}
