@import url('../pdf-tools-design.css');

/* ===== Text to PDF — tool specific overrides =====
   This tool uses .file-selected-wrap as its single card — that class
   already has margin-left:auto in the shared site CSS, which is exactly
   what right-aligns every other tool's "configure" panel under the hero.
   By default it (and the Generate .btn inside it) only becomes visible
   once body gets a .has-file class — this tool has no separate upload
   step, so instead of toggling that class we just force both to stay
   visible permanently. Nothing else needs overriding: the base CSS
   already handles the right-alignment, spacing and responsive behavior. */

#fileSelectedWrap {
  display: flex !important;
}

#btn {
  display: inline-flex !important;
}

#btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* Text input card — styled to match the same "surface card" look as
   .quality-bar / .file-row-card below it, since this tool doesn't use
   .upload-card (which is centered and hidden by has-file rules). */
.ttp-text-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 14px 16px;
}

/* Header row: icon + title + character count */
.ttp-input-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}

.ttp-input-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.ttp-input-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-dark);
}

.ttp-char-count {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.76rem;
  color: var(--dim);
  background: rgba(128,128,128,0.10);
  padding: 3px 10px;
  border-radius: 50px;
}

.ttp-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 240px;
  resize: vertical;
  margin-bottom: 10px;
}

.ttp-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .ttp-input-title {
    font-size: 0.86rem;
  }
  .ttp-char-count {
    font-size: 0.7rem;
    padding: 2px 8px;
  }
}

/* PDF settings grid */
.ttp-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.ttp-opt-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ttp-opt-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dim);
}

@media (max-width: 520px) {
  .ttp-options-grid {
    grid-template-columns: 1fr;
  }
}