/* ── DTF Calculator ── */
*, *::before, *::after { box-sizing: border-box; }

.dtf-calculator {
  max-width: 720px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  margin: 0 auto;
}

/* Section title */
.dtf-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: #111;
}

/* ── Row card ── */
.dtf-row-card {
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
  position: relative;
}
.dtf-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.dtf-row-num {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dtf-row-remove {
  background: none; border: none; cursor: pointer;
  color: #bbb; font-size: 18px; line-height: 1;
  padding: 2px 6px; border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.dtf-row-remove:hover { background: #fef0f0; color: #e33; }

/* ── Upload area ── */
.dtf-upload-area {
  border: 1.5px solid #d0d0d0;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  background: #fafafa;
}
.dtf-upload-area input[type=file] { display: none; }
.dtf-upload-btn {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.dtf-upload-btn:hover { background: #f0f0f0; }
.dtf-upload-filename {
  color: #888;
  font-size: 13px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dtf-upload-filename.has-file { color: #1a1a1a; }
.dtf-upload-hint { font-size: 12px; color: #999; margin-bottom: 10px; }

/* ── Toggle link ── */
.dtf-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.dtf-toggle {
  position: relative;
  width: 42px; height: 24px;
  flex-shrink: 0;
}
.dtf-toggle input { opacity: 0; width: 0; height: 0; }
.dtf-toggle-slider {
  position: absolute; inset: 0;
  background: #2563eb;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.dtf-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.dtf-toggle input:checked + .dtf-toggle-slider { background: #2563eb; }
.dtf-toggle input:not(:checked) + .dtf-toggle-slider { background: #2563eb; }
.dtf-toggle input:checked + .dtf-toggle-slider::before { transform: translateX(18px); }
.dtf-toggle-label { font-size: 13px; font-weight: 500; color: #333; }

.dtf-link-input {
  width: 100%;
  border: 1.5px solid #d0d0d0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
.dtf-link-input:focus { outline: none; border-color: #2563eb; }

/* ── Disclaimer checkbox ── */
.dtf-disclaimer {
  background: #fff5f5;
  border: 1px solid #fcd0d0;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}
.dtf-disclaimer input[type=checkbox] {
  margin-top: 2px;
  width: 16px; height: 16px;
  flex-shrink: 0;
  accent-color: #2563eb;
  cursor: pointer;
}

/* ── Name field ── */
.dtf-name-field {
  margin-bottom: 14px;
}
.dtf-name-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 5px;
}
.dtf-name-field input {
  width: 100%;
  border: 1.5px solid #d0d0d0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: #1a1a1a;
  transition: border-color 0.2s;
  background: #fff;
}
.dtf-name-field input:focus { outline: none; border-color: #2563eb; }
.dtf-name-field input::placeholder { color: #bbb; }

/* ── Dimensions grid ── */
.dtf-dims-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 500px) { .dtf-dims-grid { grid-template-columns: 1fr 1fr; } }
.dtf-dim-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 5px;
}
.dtf-dim-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #d0d0d0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.2s;
}
.dtf-dim-input-wrap:focus-within { border-color: #2563eb; }
.dtf-dim-input-wrap input {
  border: none; outline: none;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  background: transparent;
  color: #1a1a1a;
}
.dtf-dim-unit {
  padding: 0 12px;
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
}

/* ── Options / add-ons ── */
.dtf-addon {
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.dtf-addon:hover { border-color: #bbb; background: #fafafa; }
.dtf-addon.checked { border-color: #2563eb; background: #f0f5ff; }
.dtf-addon input[type=checkbox] { display: none; }
.dtf-addon-check {
  width: 18px; height: 18px;
  border: 2px solid #ccc;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.dtf-addon.checked .dtf-addon-check {
  background: #2563eb; border-color: #2563eb;
}
.dtf-addon.checked .dtf-addon-check::after {
  content: ''; display: block;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px,-1px);
}
.dtf-addon-text { flex: 1; }
.dtf-addon-label { font-size: 13px; font-weight: 500; color: #1a1a1a; }
.dtf-addon-price { font-size: 13px; color: #555; }
.dtf-addon-badge {
  position: absolute; top: -10px; right: 12px;
  background: #111; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 9px; border-radius: 20px;
  letter-spacing: 0.3px;
}
.dtf-addon-desc {
  font-size: 12px; color: #888; margin-top: 2px; line-height: 1.4;
}
.dtf-addon-icon {
  font-size: 22px; opacity: 0.6;
}

/* ── Cost summary ── */
.dtf-cost-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eee;
}
.dtf-cost-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dtf-cost-label { font-size: 13px; color: #777; }
.dtf-cost-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* ── Add row button ── */
.dtf-add-row-btn {
  width: 100%;
  border: 1.5px dashed #d0d0d0;
  background: transparent;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 20px;
}
.dtf-add-row-btn:hover { border-color: #2563eb; color: #2563eb; background: #f5f9ff; }

/* ── Notes ── */
.dtf-notes-field { margin-bottom: 20px; }
.dtf-notes-field label { display: block; font-size: 13px; color: #777; margin-bottom: 6px; }
.dtf-notes-field textarea {
  width: 100%;
  border: 1.5px solid #d0d0d0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
}
.dtf-notes-field textarea:focus { outline: none; border-color: #2563eb; }
.dtf-notes-field textarea::placeholder { color: #ccc; }

/* ── Total summary ── */
.dtf-total-box {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 20px;
}
.dtf-total-row {
  display: flex; justify-content: space-between;
  font-size: 13px; color: #666; padding: 4px 0;
}
.dtf-total-row.main {
  font-size: 1rem; font-weight: 700; color: #1a1a1a;
  border-top: 1px solid #ddd; margin-top: 8px; padding-top: 10px;
}

/* ── Actions ── */
.dtf-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.dtf-btn {
  padding: 12px 28px; border-radius: 10px;
  border: none; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s, transform 0.1s;
}
.dtf-btn:active { transform: scale(0.98); }
.dtf-btn:hover { opacity: 0.88; }
.dtf-btn-primary  { background: #111; color: #fff; }
.dtf-btn-secondary { background: #fff; color: #111; border: 1.5px solid #ccc; }

/* ── Error ── */
.dtf-errore {
  background: #fff5f5; border: 1px solid #fcc;
  border-radius: 8px; padding: 10px 14px;
  color: #c00; font-size: 13px; margin-top: 12px;
}
