/* ===== FORM STYLES ===== */

/* Full width utilities */
.full-width {
  width: 100%;
}

/* Custom size inputs */
.custom-size-inputs {
  display: none;
  margin-bottom: 16px;
}

.custom-size-grid {
  display: flex;
  gap: 8px;
  align-items: end;
}

.size-input-group {
  flex: 1;
}

.size-input-group label {
  display: block;
  margin-bottom: 4px;
}

.size-input-group input,
.size-input-group select {
  width: 100%;
}

/* Slider controls */
.slider-controls {
  align-items: center;
  gap: 8px;
}

.slider-input {
  flex: 1;
}

.slider-display {
  min-width: 3ch;
  text-align: center;
}

/* Slider labels and values */
.slider-label {
  min-width: 140px;
}

.slider-value {
  width: 64px;
  text-align: right;
}

/* Switch margins */
.switch-margin {
  margin-top: 8px;
}

/* Button row styling */
.btn-row {
  margin-top: 0;
  display: flex;
  gap: 8px;
}

/* ===== FORM ELEMENTS ===== */
label { 
  display: block; 
  margin: 12px 0 6px; 
}

input[type="file"], 
input[type="number"], 
input[type="text"], 
select, 
textarea, 
input[type="color"] { 
  background: var(--input-bg); 
  color: var(--input-text); 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  padding: 6px 8px; 
  width: 100%; 
}

textarea { 
  height: 120px; 
}

input[type="color"] { 
  height: 24px; 
  padding: 0; 
}

/* PPI input specific styling */
input[id="deckPPI"] {
  font-weight: 500;
  text-align: left;
}

input[id="deckPPI"]:focus {
  border-color: #22314a;
  box-shadow: 0 0 0 2px rgba(34, 49, 74, 0.1);
}

/* ===== FILE INPUTS ===== */
input[type=file].hidden-file { 
  display: none; 
}

.fileline { 
  display: grid !important;
  grid-template-columns: 1fr 76px;
  gap: 18px;
  align-items: center;
  width: 100%;
  position: relative;
}

.fileline .filename { 
  opacity: .7; 
  font-size: 14px; 
}

/* ===== TYPOGRAPHY CONTROLS ===== */
.right-typo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.right-typo-grid .group label { 
  display: block; 
  margin-bottom: 8px; 
}

.right-typo-grid .btn-row#qStyleRow button { 
  min-width: 44px; 
}

.two-col .inline .btn-row#qStyleRow button { 
  min-width: 44px; 
}

.two-col .inline.tight { 
  gap: 12px; 
}

/* ===== HINTS ===== */
.hint { 
  font-size: 12px; 
  color: var(--muted); 
  margin-top: 4px; 
}

/* ===== DECK ROW ===== */
.deck-row { 
  display: flex; 
  align-items: center; 
  justify-content: flex-start; 
  gap: 12px; 
  flex-wrap: nowrap; 
  width: 100%; 
  margin-top: 18px; 
}

.deck-row .themed-btn { 
  flex: 0 0 auto; 
}

.deck-row .caution { 
  flex: 1 1 auto; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
}

.deck-row .caution.amber { 
  font-size: 12px !important; 
}

/* ===== TEMPLATE TABLE ===== */
.template-section {
  margin: auto;
  width: 1000px;
  margin-top: 20px;
  margin-bottom: 40px;
  padding-bottom: 40px;
}

.template-table-container {
  width: 100%;
}

.template-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.template-table th {
  background: var(--panel);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.template-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.template-table input {
  width: 100%;
  min-width: 200px;
  height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--input-text);
}

.template-table .delete-row-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.themed-btn.success {
  background: #28a745;
  color: white;
  border: 1px solid #28a745;
}

.themed-btn.success:hover {
  background: #218838;
  border-color: #1e7e34;
}

.themed-btn.info {
  background: #17a2b8;
  color: white;
  border: 1px solid #17a2b8;
}

.themed-btn.info:hover {
  background: #138496;
  border-color: #117a8b;
}

/* ===== DECK MODAL GRID ===== */
.deck-sidegrid {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(420px, 1fr);
  gap: 16px;
  align-items: start;
}

.deck-sidegrid .controls-col > .grid { 
  margin: 0; 
}

.deck-sidegrid .preview-col .previewBox { 
  margin-top: 0; 
}

.deck-sidegrid .preview-col { 
  min-width: 410px; 
}

@media (max-width: 1100px) {
  .deck-sidegrid { 
    grid-template-columns: 1fr; 
  }
  .deck-sidegrid .preview-col { 
    order: 2; 
  }
}

/* ===== DECK MODAL ===== */
.deck-modal .grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 12px; 
}

.deck-modal h3 { 
  margin: 0 0 8px; 
}
