/* SaveMyDoc — Free Browser Tools (/tools/*) */

.tools-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 88px;
}

.tools-narrow {
  max-width: 820px;
}

.tools-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}
.tools-breadcrumb:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Hub grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.tool-hub-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tool-hub-card:hover {
  transform: translateY(-3px);
}

.tool-hub-card .tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-tint);
  font-size: 22px;
  margin-bottom: 14px;
}

.tool-hub-card h2 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  color: var(--ink);
}

.tool-hub-card p {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.tool-hub-card .btn {
  align-self: flex-start;
}

/* Tool workspace panel */
.tool-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
}

.tool-warning-box {
  background: rgba(240, 140, 0, 0.10);
  border: 1px solid rgba(240, 140, 0, 0.35);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 14.5px;
  color: var(--ink);
  margin-bottom: 20px;
}

.tool-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 32px 20px;
  border: 2px dashed var(--border-input);
  border-radius: 16px;
  background: var(--bg-tint);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tool-dropzone:hover,
.tool-dropzone.is-dragover {
  border-color: var(--blue-500);
  background: rgba(61, 123, 255, 0.08);
}

.tool-dropzone:focus-visible {
  outline: 2.5px solid var(--blue-500);
  outline-offset: 3px;
}

.tool-drop-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.tool-drop-sub {
  font-size: 14px;
  color: var(--ink-soft);
}

.tool-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Controls row */
.tool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  margin-top: 20px;
}

.tool-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 190px;
  flex: 1 1 200px;
}

.tool-field label {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink);
}

.tool-select {
  appearance: auto;
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  color: var(--ink);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.tool-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  text-decoration: none;
}

.tool-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tool-btn-primary {
  background: var(--blue-500);
  color: #ffffff;
}

.tool-btn-secondary {
  background: var(--bg-chip);
  color: var(--ink);
  border-color: var(--border-input);
}

.tool-btn-sm {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 13.5px;
  border-radius: 10px;
  background: var(--bg-chip);
  color: var(--ink);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.tool-btn-sm:hover:not(:disabled) {
  border-color: var(--blue-500);
}

.tool-btn-sm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tool-btn-danger {
  color: var(--red);
}

/* File queue list */
.tool-list {
  list-style: none;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-tint);
  border: 1px solid var(--border-subtle);
}

.tool-item-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 200px;
}

.tool-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.tool-item-text {
  min-width: 0;
}

.tool-item-name {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-item-meta {
  font-size: 13px;
  color: var(--ink-soft);
}

.tool-item-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Status & result banners */
.tool-status {
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.5;
}

.tool-status-error {
  background: rgba(194, 39, 67, 0.10);
  border: 1px solid rgba(194, 39, 67, 0.35);
  color: var(--ink);
}

.tool-status-info {
  background: rgba(61, 123, 255, 0.10);
  border: 1px solid rgba(61, 123, 255, 0.30);
  color: var(--ink);
}

.tool-status-success {
  background: rgba(29, 122, 67, 0.10);
  border: 1px solid rgba(29, 122, 67, 0.35);
  color: var(--ink);
}

.tool-result {
  margin-top: 18px;
  padding: 18px;
  border-radius: 14px;
  background: var(--bg-tint);
  border: 1px solid var(--border-subtle);
}

.tool-result-meta {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ink);
}

/* Privacy note, How it works, Invite */
.tool-privacy-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--bg-tint);
  border: 1px solid var(--border-subtle);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 28px;
}

.tool-steps {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 28px;
}

.tool-steps h2 {
  font-size: 20px;
  font-weight: 750;
  margin-bottom: 14px;
}

.tool-steps ol {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-steps li {
  font-size: 15px;
  color: var(--ink-legal);
}

.tool-invite {
  background: var(--bg-tint);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tool-invite p {
  font-size: 15px;
  color: var(--ink);
  max-width: 58ch;
}

.tool-disclaimer {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 14px;
}

/* Warranty table preview */
.tool-table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.tool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.tool-table th,
.tool-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.tool-table th {
  background: var(--bg-tint);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.tool-table tr:last-child td {
  border-bottom: none;
}

/* Print layout (print.html) */
.print-body {
  background: #ffffff;
  color: #14183c;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 20px;
}

.print-sheet {
  max-width: 1080px;
  margin: 0 auto;
}

.print-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  background: #f2f5fc;
  border: 1px solid rgba(20, 24, 60, 0.14);
  border-radius: 10px;
  font-size: 14px;
}

.print-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.print-header h1 {
  font-size: 20px;
}

.print-disclaimer {
  font-size: 12.5px;
  color: #4a5072;
  margin-bottom: 12px;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.print-table th,
.print-table td {
  border: 1px solid #333955;
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
}

.print-table th {
  background: #f2f5fc;
  font-weight: 700;
}

.print-table td {
  height: 30px;
}

@page {
  size: A4 landscape;
  margin: 10mm;
}

@media print {
  .no-print {
    display: none !important;
  }
  .print-body {
    padding: 0;
  }
  .print-header {
    margin-bottom: 4px;
  }
  .print-header h1 {
    font-size: 16px;
  }
  .print-disclaimer {
    font-size: 11px;
    margin-bottom: 8px;
  }
  .print-table {
    font-size: 11px;
  }
  .print-table th,
  .print-table td {
    padding: 4px 5px;
  }
  .print-table td {
    height: 22px;
  }
}

.lang-suggest {
  position: static;
  margin: 16px auto 24px;
  width: fit-content;
  max-width: calc(100vw - 32px);
}

@media (max-width: 600px) {
  .tools-main {
    padding: 28px 16px 64px;
  }
  .tool-panel,
  .tool-steps,
  .tool-invite {
    padding: 20px 16px;
  }
  .tool-item {
    flex-direction: column;
    align-items: stretch;
  }
  .tool-item-main {
    flex: 0 0 auto;
  }
  .tool-item-btns {
    justify-content: flex-start;
  }
}
