/* Cross-tool layout overrides — mobile (≤767px) */

.ic-page,
.ico-page,
.tool-page {
  max-width: 100%;
  min-width: 0;
}

/* Image converter / compressor shared (cp-*) — action grids overridden in image-tools.mobile.css */
.cp-layout-top,
.cp-layout,
.cp-settings-row,
.cp-format-row {
  gap: 10px;
}

.cp-upload-box {
  min-height: 200px;
  padding: 16px 12px;
  border-radius: 10px;
}

.cp-upload-box__title {
  font-size: 0.92rem;
}

.cp-upload-box__hint {
  font-size: 0.78rem;
}

.cp-btn-row,
.cp-actions,
.cp-footer-actions {
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.cp-btn-row .cp-btn,
.cp-btn-row .cp-btn-outline,
.cp-btn-row .btn,
.cp-actions .cp-btn,
.cp-actions .cp-btn-outline,
.cp-actions .btn,
.cp-footer-actions .cp-btn,
.cp-footer-actions .cp-btn-outline {
  min-height: 38px;
  font-size: 0.74rem;
  padding: 0 8px;
}

.cp-btn-row .cp-btn--primary,
.cp-actions .cp-btn--primary,
.cp-footer-actions .cp-btn--primary {
  grid-column: unset;
}

.cp-seo-links {
  gap: 6px;
}

.cp-seo-links a,
.ic-seo-link {
  font-size: 0.72rem;
  padding: 8px 10px;
}

/* Data converter */
.dc-layout {
  gap: 10px;
}

.dc-card {
  border-radius: 10px;
}

.dc-textarea,
.dc-drop {
  min-height: 180px;
  font-size: 0.82rem;
}

.dc-toolbar,
.dc-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.dc-toolbar .btn,
.dc-actions .btn {
  width: 100%;
  min-height: 38px;
  font-size: 0.74rem;
}

.dc-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

/* YouTube / Hotstar / metadata */
.yt-form__row,
.hs-form__row,
.ym-form__row {
  gap: 8px;
}

.yt-input,
.hs-input,
.ym-input {
  min-height: 42px;
  font-size: 16px;
  border-radius: 10px;
  padding: 0 12px;
}

.yt-extract-btn,
.hs-extract-btn,
.ym-extract-btn {
  width: 100%;
  min-height: 42px;
  min-width: 0;
}

.yt-overview,
.hs-overview,
.ym-overview {
  padding: 10px;
  gap: 10px;
  border-radius: 10px;
}

.yt-download__grid,
.hs-download__grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.yt-dl-row,
.hs-dl-row {
  grid-template-columns: 1fr;
  gap: 8px;
}

.yt-dl-btn,
.hs-dl-btn {
  width: 100%;
  min-height: 40px;
  justify-content: center;
}

.yt-overview__actions,
.hs-overview__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.yt-overview__actions .btn,
.hs-overview__actions .btn {
  width: 100%;
  min-height: 38px;
  font-size: 0.74rem;
}

/* PDF maker / PDF to image */
.pm-workspace,
.pti-workspace {
  gap: 10px;
}

.pm-grid,
.pti-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pm-filebar,
.pti-filebar {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.pm-filebar__actions,
.pti-filebar__actions,
.pm-grid-footer__actions,
.pti-grid-footer__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.pm-filebar__actions .cp-btn-outline,
.pti-filebar__actions .cp-btn-outline,
.pm-grid-footer__actions .btn,
.pti-grid-footer__actions .btn {
  width: 100%;
  min-height: 38px;
  font-size: 0.72rem;
}

.pti-toolbar {
  flex-wrap: wrap;
  gap: 6px;
}

.pti-toolbar__btn {
  flex: 1 1 calc(50% - 6px);
  min-height: 36px;
  font-size: 0.72rem;
}

/* PDF editor */
.pe-workspace {
  gap: 10px;
}

.pe-mode-tabs {
  grid-template-columns: 1fr;
  gap: 6px;
}

.pe-mode-tabs .pe-mode-tab {
  min-height: 40px;
  font-size: 0.8rem;
}

.pe-direction-grid,
.pe-method-grid,
.pe-features {
  grid-template-columns: 1fr;
  gap: 8px;
}

.pe-file-card {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
}

.pe-file-card__handle {
  display: none;
}

.pe-sidebar {
  padding: 12px;
}

/* OCR / background remover / resizer — see image-tools.mobile.css for upload action rows */

.ocr-result__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.ocr-result__actions .btn {
  width: 100%;
}

.irs-toolbar {
  flex-wrap: wrap;
  gap: 6px;
}

.irs-toolbar__btn {
  flex: 1 1 calc(33% - 6px);
  min-height: 36px;
  font-size: 0.72rem;
  padding: 0 6px;
}

/* UI select dropdowns */
.ui-select__trigger {
  min-height: 42px;
  font-size: 0.84rem;
}

.ui-select__menu {
  max-height: min(50vh, 280px);
}
