/* ============================================================
   gelo.fyi — Tool pages (Combine PDF)
   ============================================================ */

/* ---------- Tool hero ---------- */

.tool-hero {
  padding: calc(var(--nav-h) + 76px) 0 40px;
  text-align: center;
}

.tool-title {
  font-size: clamp(38px, 5.6vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0;
  animation: fade-up 0.7s var(--ease-spring) 0.06s both;
}

.tool-sub {
  max-width: 560px;
  margin: 18px auto 0;
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: balance;
  animation: fade-up 0.7s var(--ease-spring) 0.12s both;
}

/* ---------- Flow column ---------- */

.flow {
  width: min(720px, 100% - 48px);
  margin-inline: auto;
}

/* ---------- Dropzone ---------- */

.dropzone {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 56px 28px;
  text-align: center;
  background: var(--bg-elevated);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition:
    border-color 0.25s var(--ease),
    background-color 0.25s var(--ease),
    transform 0.3s var(--ease-spring);
  animation: fade-up 0.7s var(--ease-spring) 0.18s both;
}

.dropzone:hover { border-color: var(--accent); }

.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.01);
}

/* shared squircle look comes from .icon-squircle in base.css */
.dropzone-icon { margin-bottom: 12px; }

.dropzone strong {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.dropzone-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  height: 40px;
  padding: 0 20px;
  border-radius: 980px;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background-color 0.25s var(--ease), transform 0.3s var(--ease-spring);
}

.dropzone:hover .dropzone-btn { background: var(--accent-hover); }
.dropzone:active .dropzone-btn { transform: scale(0.97); }

/* ---------- File list ---------- */

.files { margin-top: 22px; animation: fade-up 0.5s var(--ease-spring) both; }

.files[hidden] { display: none; }

.file-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-tile);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
}

.file-row.is-dragging { opacity: 0.4; }
.file-row.is-drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.drag-handle {
  color: var(--text-tertiary);
  cursor: grab;
  touch-action: none;
  flex: none;
  padding: 4px 2px;
}
.drag-handle:active { cursor: grabbing; }

.file-glyph {
  position: relative;
  flex: none;
  width: 40px;
  height: 48px;
  color: var(--text-tertiary);
}

.file-glyph .file-ext {
  position: absolute;
  left: 50%;
  bottom: 4px;
  translate: -50% 0;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: #ff3b30;
  border-radius: 3px;
  padding: 1.5px 3.5px;
}

.file-glyph .file-ext--img { background: var(--accent); }
.file-glyph .file-ext--doc { background: #ff9f0a; }

.file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.file-name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-sub {
  font-size: 13px;
  color: var(--text-tertiary);
}

.file-actions { display: flex; align-items: center; gap: 2px; flex: none; }

/* per-file rotation stepper (Rotate PDF) */
.rotator {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: 8px;
}

.rotation-value {
  min-width: 36px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--text-secondary);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.icon-btn:hover { background: var(--bg-subtle); color: var(--text); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn:disabled { opacity: 0.3; pointer-events: none; }
.icon-btn--remove:hover { color: var(--danger); }

.files-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.link-btn {
  color: var(--text-secondary);
  font-size: 13.5px;
  border-radius: 6px;
}

.link-btn:hover { color: var(--danger); }

/* ---------- Actions ---------- */

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  animation: fade-up 0.5s var(--ease-spring) both;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid color-mix(in srgb, var(--btn-text) 35%, transparent);
  border-top-color: var(--btn-text);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading { pointer-events: none; }

/* ---------- Result ---------- */

.result {
  margin-top: 34px;
  padding: 40px 32px;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-tile);
  animation: fade-up 0.6s var(--ease-spring) both;
}

.result[hidden] { display: none; }

.result-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
}

.result h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.result p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-secondary);
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ---------- Privacy strip ---------- */

.privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  font-size: 13.5px;
  color: var(--text-tertiary);
}

.privacy svg { color: var(--success); }

@media (max-width: 560px) {
  .dropzone { padding: 44px 20px; }
  .file-row { gap: 10px; padding: 10px 12px; }
}
