/* ============================================
   Common Tool Styles
   Shared across all tool pages
   Extracted from inline <style> blocks
   ============================================ */

/* Layout density */
.tool-workspace { padding: 16px !important; }
.options-row { gap: 10px !important; }
.option-item { padding: 10px 12px !important; }

/* Premium Accordion how-to-use */
details.how-to-use {
  margin-top: 24px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  overflow: hidden;
  transition: all 0.3s ease;
}
details.how-to-use[open] {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
details.how-to-use summary {
  list-style: none;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--text-heading);
  font-size: 1rem;
  user-select: none;
  transition: background 0.2s;
}
details.how-to-use summary::-webkit-details-marker { display: none; }
details.how-to-use summary:hover { background: rgba(255, 255, 255, 0.02); }
details.how-to-use summary .htu-icon { color: var(--accent-1); font-size: 1.2rem; }
details.how-to-use summary .htu-chevron {
  margin-left: auto;
  transition: transform 0.3s ease;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: normal;
  display: inline-flex;
  align-items: center;
}
/* The literal ▼ glyph renders inconsistently across fonts (can look doubled).
   For text-glyph chevrons, hide the glyph and draw a crisp CSS triangle.
   Chevrons that already contain an <svg> (e.g. image-compressor) are left as-is. */
details.how-to-use summary .htu-chevron:not(:has(svg)) { font-size: 0; line-height: 0; }
details.how-to-use summary .htu-chevron:not(:has(svg))::after {
  content: ''; width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
}
details.how-to-use[open] summary .htu-chevron { transform: rotate(180deg); }

/* Slot dedup (global): ToolPage wraps the how-to-use slot in a card with an
   injected <h2>How to Use</h2>. When a tool supplies its OWN accordion into
   that slot, the heading + card are redundant → duplicate title + card-in-card
   + two stacked arrows. Detect that case via :has() and flatten it. Tools that
   put plain content in the slot (no child <details>) keep the heading/card. */
.how-to-use:has(details.how-to-use) > h2 { display: none; }
.how-to-use:has(details.how-to-use) {
  background: transparent; border: none; padding: 0; box-shadow: none; margin-top: 8px;
}
details.how-to-use .htu-content {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
}
details.how-to-use ol {
  margin: 0;
  padding-left: 24px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}
details.how-to-use li { margin-bottom: 12px; }
details.how-to-use li:last-child { margin-bottom: 0; }
/* Optional pull-quote tip below the steps. */
details.how-to-use .tip {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent-1);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
details.how-to-use .tip strong { color: var(--text-heading); }

/* Z-index: sidebar must be below header/lang-dropdown */
.tool-sidebar { z-index: 1 !important; }

/* Compact layout */
.tool-layout { gap: 18px !important; padding: 12px 20px !important; }
.tool-header { padding-bottom: 4px !important; margin-bottom: 0 !important; }
.tool-header .tool-title { font-size: 1.5rem !important; margin-bottom: 2px !important; }
.tool-header .tool-subtitle { margin-top: 0 !important; font-size: .82rem !important; }
.ad-container#ad-top { min-height: 0 !important; padding: 0 !important; display: none; }
.tool-workspace { padding: 0 !important; }
.stats-bar { margin-bottom: 10px !important; padding: 8px 12px !important; gap: 10px !important; }
.options-row { gap: 8px !important; }
.option-item { padding: 9px 11px !important; }
#options .stats-bar { margin-bottom: 8px !important; }

/* Dropzone: hide default content in preview mode */
.dropzone.dz-preview-mode .dropzone-icon,
.dropzone.dz-preview-mode .dropzone-text,
.dropzone.dz-preview-mode .dropzone-hint { display: none !important; }
.dropzone.dz-preview-mode input[type="file"] { pointer-events: none; }

/* Single file big preview */
.dropzone.dz-preview-mode {
    flex-direction: row !important;
    align-items: center !important;
    padding: 12px 14px !important;
    min-height: 88px !important;
    height: auto !important;
    gap: 14px !important;
    cursor: default !important;
    justify-content: flex-start !important;
    text-align: left !important;
}

/* Multi file grid */
.dropzone.dz-preview-mode.dz-multi {
    flex-direction: column !important;
    align-items: flex-start !important;
    min-height: auto !important;
    padding: 10px 12px !important;
}

.dz-previews { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }

/* Big single thumb */
.dz-big-thumb { width: 66px; height: 66px; object-fit: cover; border-radius: 10px; flex-shrink: 0; border: 1px solid var(--border-color); }
.dz-big-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.dz-big-filename { font-size: .875rem; font-weight: 600; color: var(--text-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.dz-big-filesize { font-size: .72rem; color: var(--text-secondary); }
.dz-change-btn { background: none; border: 1px solid var(--border-color); padding: 2px 8px; border-radius: 4px; font-size: .65rem; color: var(--text-muted); cursor: pointer; margin-top: 4px; width: fit-content; transition: all .15s; font-family: inherit; }
.dz-change-btn:hover { border-color: var(--accent-1); color: var(--text-primary); }

/* Multi thumbs */
.dz-preview-item { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 56px !important; max-width: 56px !important; position: relative; transition: transform .15s ease; }
.dz-preview-thumb { width: 50px !important; height: 50px !important; max-width: 50px !important; max-height: 50px !important; object-fit: cover; border-radius: 7px; border: 2px solid var(--border-color); display: block !important; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }

/* Picked (included in processing) — prominent gallery-style selection */
.dz-preview-item.picked .dz-preview-thumb {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 2px var(--accent-1), 0 4px 14px rgba(139, 92, 246, .45);
    transform: scale(1.04);
}
.dz-preview-item.picked { transform: translateY(-1px); }
.dz-pick-check {
    position: absolute;
    top: -4px; left: -4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--accent-1);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
    z-index: 3;
    pointer-events: none;
}

/* Viewing (currently shown in EXIF panel) — subtle accent underline */
.dz-preview-item.viewing .dz-preview-name {
    color: var(--accent-1);
    font-weight: 700;
}

.dz-preview-item:hover .dz-preview-thumb {
    border-color: var(--accent-1);
}
.dz-preview-name { font-size: .55rem; color: var(--text-secondary); text-align: center; word-break: break-all; line-height: 1.2; max-width: 56px; }
.dz-thumb-icon { font-size: 1.5rem; line-height: 50px; }
.dz-preview-more { width: 50px; height: 50px; background: var(--bg-card); border-radius: 7px; border: 1px dashed var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: .82rem; font-weight: 700; }

/* Cloud import row */
.cloud-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; padding: 7px 10px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; }
.cloud-row-label { font-size: .6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px; font-weight: 700; white-space: nowrap; margin-right: 2px; }
.cloud-row-sep { width: 1px; height: 14px; background: var(--border-color); flex-shrink: 0; margin: 0 2px; }
.cloud-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 5px; border: 1px solid var(--border-color); background: rgba(255,255,255,.03); color: var(--text-secondary); font-size: .68rem; font-weight: 600; cursor: pointer; transition: all .18s; white-space: nowrap; font-family: inherit; }
.cloud-btn svg { flex-shrink: 0; }
.cloud-btn:hover { color: var(--text-heading); background: rgba(255,255,255,.06); }
.cloud-btn.gdrive:hover { border-color: #4285f4; }
.cloud-btn.dropbox:hover { border-color: #0061ff; }
.cloud-btn.yadisk:hover { border-color: #fc3f1d; }

/* Cloud export row */
.cloud-export-row { display: none; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; padding: 7px 10px; background: rgba(16,185,129,.05); border: 1px solid rgba(16,185,129,.2); border-radius: 8px; }
.cloud-export-label { font-size: .6rem; color: #10b981; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; white-space: nowrap; margin-right: 2px; }

/* Cloud modal */
#ic-cloud-modal { position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: none; align-items: center; justify-content: center; z-index: 99999; }
#ic-cloud-modal.open { display: flex; }
.cloud-modal-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 16px; padding: 24px; min-width: 300px; max-width: 90vw; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.cloud-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cloud-modal-title { margin: 0; font-size: .95rem; font-weight: 700; color: var(--text-heading); }
.cloud-modal-close { background: none; border: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; padding: 2px 6px; border-radius: 4px; line-height: 1; font-family: inherit; }
.cloud-modal-close:hover { color: var(--text-primary); background: var(--bg-card); }
.cloud-modal-msg { color: var(--text-secondary); font-size: .82rem; line-height: 1.55; margin-bottom: 18px; }
.cloud-modal-cta { width: 100%; padding: 10px; border-radius: 8px; border: none; font-weight: 700; cursor: pointer; font-size: .85rem; color: #fff; transition: opacity .15s; font-family: inherit; }
.cloud-modal-cta:hover { opacity: .85; }

/* SEO details wrapper */
details.seo-details > summary { cursor: pointer; font-size: .78rem; color: var(--text-muted); padding: 10px 0; user-select: none; list-style: none; display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border-color); margin-top: 8px; }
details.seo-details > summary::-webkit-details-marker { display: none; }
details.seo-details > summary::before { content: '▶'; font-size: .55rem; transition: transform .2s; flex-shrink: 0; }
details.seo-details[open] > summary::before { transform: rotate(90deg); }

/* Pulse animation for buttons */
@keyframes ic-pulse { 0%,100% { box-shadow: 0 4px 20px rgba(139,92,246,.3); } 50% { box-shadow: 0 4px 30px rgba(139,92,246,.6); } }
.ic-pulse { animation: ic-pulse 2s ease-in-out infinite; }

/* Spinner */
.pdf-spinner, .spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Transfer banner */
.xfer-received-banner { position: fixed; bottom: 20px; right: 20px; background: var(--bg-secondary); border: 1px solid var(--accent-1); border-radius: 12px; padding: 12px 20px; color: var(--text-primary); font-size: .85rem; z-index: 10000; box-shadow: 0 4px 20px rgba(139,92,246,.3); transition: opacity .4s; }
.xfer-received-banner button { background: none; border: none; color: var(--text-muted); cursor: pointer; margin-left: 12px; font-size: 1rem; }

/* ============================================
   UNIFIED TOOL DROPZONE (.tool-dropzone)
   Use this class on all tool dropzones
   ============================================ */
.tool-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.tool-dropzone:hover,
.tool-dropzone.dragover {
    border-color: var(--accent-1);
    background: rgba(139, 92, 246, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.tool-dropzone input[type="file"] { display: none; }
.tool-dz-icon { font-size: 3rem; margin-bottom: 16px; line-height: 1; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.tool-dropzone:hover .tool-dz-icon { transform: scale(1.1); }
.tool-dz-text { font-size: 1rem; font-weight: 700; color: var(--text-heading); margin-bottom: 6px; }
.tool-dz-hint { font-size: .85rem; color: var(--text-secondary); }

/* Dropzone preview state (single file) */
.tool-dropzone.has-file {
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    min-height: 88px;
    cursor: default;
    gap: 14px;
    justify-content: flex-start;
    text-align: left;
}
.tool-dropzone.has-file .tool-dz-icon,
.tool-dropzone.has-file .tool-dz-text,
.tool-dropzone.has-file .tool-dz-hint { display: none; }

/* ============================================
   UNIFIED TOOL BUTTONS
   ============================================ */

/* Primary action button */
.tool-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    min-width: 140px;
    height: 52px;
    padding: 0 24px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-1) 0%, #6366f1 50%, var(--accent-3) 100%);
    background-size: 200% auto;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    letter-spacing: .5px;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    text-decoration: none;
}
.tool-btn-primary:hover {
    background-position: right center;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}
.tool-btn-primary:active { transform: translateY(0); }
.tool-btn-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secondary button */
.tool-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    font-family: inherit;
    text-decoration: none;
}
.tool-btn-secondary:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.08);
}

/* Reset / danger button */
.tool-btn-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.tool-btn-reset:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

/* Action row container */
.tool-action-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ============================================
   UNIFIED PREVIEW OUTPUT
   ============================================ */
.tool-preview-wrap {
    margin-bottom: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tool-preview-canvas,
.tool-preview-img {
    max-width: 100%;
    max-height: 520px;
    object-fit: contain;
    display: block;
    border-radius: 0;
}
.tool-preview-info {
    width: 100%;
    padding: 8px 14px;
    font-size: .78rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.tool-preview-stat-lbl {
    font-size: .6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 700;
}
.tool-preview-stat-val {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-heading);
}

/* ============================================
   NEXT STEP BANNER (shown after tool output)
   ============================================ */
.next-step-banner {
    margin-top: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(167, 139, 250, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    animation: ns-fadein .4s ease;
}
@keyframes ns-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.next-step-banner.next-step-pulse {
    animation: ns-pulse 0.8s ease 2;
}
@keyframes ns-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); border-color: rgba(99, 102, 241, 0.2); }
    50% { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.35); border-color: rgba(99, 102, 241, 0.7); }
}
.next-step-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
    font-size: .78rem;
    line-height: 1.2;
}
.next-step-check {
    color: #10b981;
    font-size: .9rem;
    font-weight: 700;
    flex-shrink: 0;
}
.next-step-head strong {
    font-size: .8rem;
    color: var(--text-heading);
    font-weight: 700;
}
.next-step-file {
    font-size: .72rem;
    color: var(--text-muted);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}
.next-step-arrow {
    color: var(--text-muted);
    font-size: .9rem;
    margin: 0 1px;
}
.next-step-label {
    font-size: .65rem;
    font-weight: 700;
    color: var(--accent-1);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.next-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.next-step-btn {
    background: linear-gradient(135deg, rgba(255,255,255,.02), rgba(255,255,255,0));
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 5px 11px 5px 9px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    transition: all .22s ease;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    box-shadow:
        0 0 0 0 var(--cat-color, var(--cat-image, #f472b6)),
        0 1px 4px rgba(0,0,0,.1);
    animation: ns-glow 2.4s ease-in-out infinite;
}
/* Subtle idle glow so the CTA is noticeable without being distracting */
@keyframes ns-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0), 0 2px 8px rgba(0,0,0,.12); }
    50%      { box-shadow: 0 0 18px 2px color-mix(in srgb, var(--cat-color, var(--cat-image, #f472b6)) 35%, transparent), 0 2px 8px rgba(0,0,0,.18); }
}
.next-step-btn:hover {
    border-color: var(--cat-color, var(--cat-image, #f472b6));
    background: var(--bg-card-hover, rgba(255,255,255,.05));
    transform: translateY(-2px);
    animation: none;
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--cat-color, var(--cat-image, #f472b6)) 20%, transparent),
        0 8px 24px color-mix(in srgb, var(--cat-color, var(--cat-image, #f472b6)) 30%, transparent);
}
.nsbtn-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cat-color, var(--cat-image, #f472b6));
    flex-shrink: 0;
    box-shadow: 0 0 8px 1px color-mix(in srgb, var(--cat-color, var(--cat-image, #f472b6)) 60%, transparent);
}
.nsbtn-title {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: .1px;
}
.nsbtn-arrow {
    font-size: .85rem;
    color: var(--cat-color, var(--cat-image, #f472b6));
    transition: transform .2s ease;
    font-weight: 700;
}
.next-step-btn:hover .nsbtn-arrow {
    transform: translateX(3px);
}
/* Fallback for browsers without color-mix support */
@supports not (color: color-mix(in srgb, red, blue)) {
    @keyframes ns-glow {
        0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0), 0 2px 8px rgba(0,0,0,.12); }
        50%      { box-shadow: 0 0 18px 2px rgba(139,92,246,.35), 0 2px 8px rgba(0,0,0,.18); }
    }
    .next-step-btn:hover {
        box-shadow: 0 0 0 3px rgba(139,92,246,.25), 0 8px 24px rgba(139,92,246,.35);
    }
}
/* Legacy selector kept so older markup with description blocks doesn't explode. */
.nsbtn-desc { display: none; }

@media (max-width: 600px) {
    .tool-dropzone { padding: 32px 16px; min-height: 140px; }
}

/* ============================================
   SIMILAR TOOLS (sidebar) — плитки как на главной
   ============================================ */
.similar-tools-section { margin-top: 12px; }
.similar-tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.similar-tool-tile {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 2px solid var(--cat-color, var(--accent-1));
    border-radius: 8px;
    padding: 10px 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    color: var(--text-primary);
}
.similar-tool-tile:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.similar-tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px; height: 22px;
    color: var(--cat-color, var(--accent-1));
}
.similar-tool-icon i[data-lucide],
.similar-tool-icon svg { width: 20px; height: 20px; stroke: currentColor; }
.similar-tool-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-heading);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   UNIFIED FILE INFO ROW
   ============================================ */
.tool-file-info {
    display: flex;
    gap: 16px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.tool-fi-stat { display: flex; flex-direction: column; gap: 2px; }
.tool-fi-lbl {
    font-size: .6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 700;
}
.tool-fi-val {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-heading);
}

/* ============================================
   UNIFIED SLIDER CARD
   ============================================ */
.tool-slider-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
@media (max-width: 600px) { .tool-slider-grid { grid-template-columns: 1fr; } }
.tool-slider-card {
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tool-slider-head { display: flex; justify-content: space-between; align-items: center; }
.tool-slider-label {
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.tool-slider-val {
    font-size: .8rem;
    font-weight: 700;
    color: var(--accent-1);
    min-width: 36px;
    text-align: right;
}
.tool-range { width: 100%; accent-color: var(--accent-1); cursor: pointer; }

/* ============================================
   LEGACY DROPZONE UNIFICATION
   Applies uniform dropzone appearance to all
   tool-specific prefixed classes. Uses higher
   specificity (body prefix) to override inline
   <style> blocks in individual tool pages.
   ============================================ */

/* Catch dropzone *containers* only — not children like .dropzone-hint /
   .dropzone-text / .dropzone-icon. Uses:
     [class~="dropzone"]    → exact class token "dropzone"
     [class*="-dropzone" i] → prefixed variants (.b64-dropzone, .fav-dropzone, …)
     [id*="dropzone" i]     → #dropzone, #dropZone, #b64Dropzone, …
   This skips .dropzone-hint / .dropzone-text / .dropzone-icon because their
   class tokens start with "dropzone-" (no leading dash). */
body [class~="dropzone"],
body [class*="-dropzone" i],
body [id*="dropzone" i],
body #toolWorkspace .dropzone,
body .upload-zone,
body .tool-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body [class~="dropzone"]:hover,
body [class*="-dropzone" i]:hover,
body [id*="dropzone" i]:hover,
body #toolWorkspace .dropzone:hover,
body .upload-zone:hover,
body .tool-dropzone:hover {
    border-color: var(--accent-1);
    background: rgba(139, 92, 246, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Elevate content above blur overlay */
body [class~="dropzone"] > *,
body [class*="-dropzone" i] > *,
body [id*="dropzone" i] > *,
body #toolWorkspace .dropzone > *,
body .upload-zone > *,
body .tool-dropzone > * {
    position: relative;
    z-index: 11;
}

/* Drag-and-drop interactive overlay */
body [class~="dropzone"]::after,
body [class*="-dropzone" i]::after,
body [id*="dropzone" i]::after,
body #toolWorkspace .dropzone::after,
body .upload-zone::after,
body .tool-dropzone::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

/* Active dropzone overlay */
body [class~="dropzone"].dragover::after,
body [class*="-dropzone" i].dragover::after,
body [id*="dropzone" i].dragover::after,
body #toolWorkspace .dropzone.dragover::after,
body .upload-zone.dragover::after,
body .tool-dropzone.dragover::after {
    opacity: 1;
}

/* DZ icon — unified size (any prefix ending -dz-icon, plus generic) */
body [class$="-dz-icon"],
body [class*=" dz-icon"],
body .dropzone-icon {
    margin-bottom: 16px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.15));
    transition: transform 0.3s ease;
}
body [class~="dropzone"]:hover .dropzone-icon,
body [class*="-dropzone" i]:hover .dropzone-icon,
body [id*="dropzone" i]:hover .dropzone-icon,
body #toolWorkspace .dropzone:hover .dropzone-icon,
body .upload-zone:hover .dropzone-icon,
body .tool-dropzone:hover .dropzone-icon {
    transform: scale(1.08);
}
/* Ensure all SVG icons in dropzone have consistent size */
body .dropzone-icon svg,
body [class$="-dz-icon"] svg,
body [class*=" dz-icon"] svg {
    width: 48px;
    height: 48px;
    stroke-width: 2;
}
/* Legacy emoji/text icons fallback */
body .dropzone-icon:not(:has(svg)),
body [class$="-dz-icon"]:not(:has(svg)),
body [class*=" dz-icon"]:not(:has(svg)) {
    font-size: 3rem;
}
/* DZ text — unified */
body [class$="-dz-text"],
body [class*=" dz-text"],
body .dropzone-text {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
/* DZ hint — unified */
body [class$="-dz-hint"],
body [class*=" dz-hint"],
body .dropzone-hint {
    font-size: .78rem;
    color: var(--text-muted);
}

/* ============================================
   LEGACY BUTTON UNIFICATION
   Primary action buttons — unified gradient style
   ============================================ */
body .h2j-convert-btn,
body .iconv-convert-btn,
body .icrop-crop-btn,
body .ir-resize-btn,
body .gif-generate-btn,
body .fav-generate-btn,
body .og-generate-btn,
body .wm-apply-btn,
body .cmp-compare-btn,
body .b64-convert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    min-width: 140px;
    height: 52px;
    padding: 0 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-1), #6366f1);
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    font-family: inherit;
    letter-spacing: .3px;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}
body .h2j-convert-btn:hover,
body .iconv-convert-btn:hover,
body .icrop-crop-btn:hover,
body .ir-resize-btn:hover,
body .gif-generate-btn:hover,
body .fav-generate-btn:hover,
body .og-generate-btn:hover,
body .wm-apply-btn:hover,
body .cmp-compare-btn:hover,
body .b64-convert-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(139, 92, 246, 0.45);
}

/* Download buttons in action rows — match primary button height */
body .rot-download-btn,
body .wm-download-btn,
body .wm-dl-jpg-btn,
body .icrop-secondary-btn,
body .icrop-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    min-width: 120px;
    height: 52px;
    padding: 0 18px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    font-family: inherit;
}
body .rot-download-btn:hover,
body .wm-download-btn:hover,
body .wm-dl-jpg-btn:hover,
body .icrop-secondary-btn:hover,
body .icrop-reset-btn:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.08);
}

/* "Download All" and standalone download links */
body .h2j-dl-all-btn,
body .iconv-dl-all-btn,
body .fav-dl-all-btn,
body .gif-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 18px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    font-family: inherit;
    text-decoration: none;
}
body .h2j-dl-all-btn:hover,
body .iconv-dl-all-btn:hover,
body .fav-dl-all-btn:hover,
body .gif-dl-btn:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.08);
}

/* Reset buttons — unified reset style */
body .h2j-reset-btn,
body .iconv-reset-btn,
body .ir-reset-btn,
body .gif-reset-btn,
body .cmp-reset-btn,
body .rot-reset-btn,
body .wm-reset-btn,
body .b64-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: .875rem;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
body .h2j-reset-btn:hover,
body .iconv-reset-btn:hover,
body .ir-reset-btn:hover,
body .gif-reset-btn:hover,
body .cmp-reset-btn:hover,
body .rot-reset-btn:hover,
body .wm-reset-btn:hover,
body .b64-reset-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

/* OG image download buttons — height match */
body .og-dl-btn {
    height: 48px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   CANVAS PREVIEW UNIFICATION
   All canvas elements inside tool pages
   ============================================ */
body .rot-canvas-wrap canvas,
body .wm-canvas-wrap canvas,
body .gif-canvas-wrap canvas,
body #peCanvas,
body #mgCanvas {
    max-width: 100%;
    max-height: 520px;
    object-fit: contain;
    display: block;
}

/* ===== Legal / static pages (privacy, terms, cookies, disclaimer, contact) ===== */
.legal-container{max-width:820px;margin:0 auto;padding:32px 24px 64px}
.legal-container h1{font-size:2rem;font-weight:800;color:var(--text-heading);margin-bottom:8px}
.legal-body{color:var(--text-secondary);line-height:1.7;font-size:.98rem}
.legal-body h2{font-size:1.2rem;font-weight:700;color:var(--text-heading);margin:28px 0 10px}
.legal-body p{margin:0 0 12px}
.legal-body ul{margin:0 0 12px;padding-left:22px}
.legal-body li{margin-bottom:6px}
.legal-body a{color:var(--accent-1)}
@media (max-width:600px){.legal-container{padding:24px 16px 48px}}

/* ===== Programmatic SEO landing pages (/convert/*, /to-pdf/*) ===== */
.lp-container{max-width:820px;margin:0 auto;padding:32px 24px 64px}
.lp-container h1{font-size:2rem;font-weight:800;color:var(--text-heading);margin-bottom:14px}
.lp-container h2{font-size:1.3rem;font-weight:700;color:var(--text-heading);margin:32px 0 12px}
.lp-intro{color:var(--text-secondary);line-height:1.7;margin-bottom:12px}
.lp-cta{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:24px 0;padding:20px 24px;border-radius:14px;text-decoration:none;background:linear-gradient(135deg,rgba(139,92,246,.12),rgba(99,102,241,.12));border:1px solid rgba(139,92,246,.35)}
.lp-cta-text{font-weight:700;color:var(--text-heading);font-size:1.05rem}
.lp-cta-btn{font-weight:800;color:#fff;background:linear-gradient(135deg,#8b5cf6,#6366f1);padding:12px 20px;border-radius:10px;white-space:nowrap}
.lp-cta:hover .lp-cta-btn{filter:brightness(1.08)}
.lp-steps{color:var(--text-secondary);line-height:1.7;padding-left:22px}
.lp-steps li{margin-bottom:8px}
.lp-faq details{border:1px solid var(--border-color);border-radius:10px;padding:12px 16px;margin-bottom:10px}
.lp-faq summary{font-weight:600;color:var(--text-heading);cursor:pointer}
.lp-faq p{color:var(--text-secondary);line-height:1.6;margin:10px 0 0}
@media (max-width:600px){.lp-container{padding:24px 16px 48px}}

/* ===== Trust badge (USP) on tool pages ===== */
.tool-header .tool-trust-badge{margin:10px auto 0;font-size:.8rem;font-weight:600;color:var(--text-muted);display:inline-block;max-width:100%;padding:5px 14px;border:1px solid var(--border-color);border-radius:999px;background:rgba(139,92,246,.05);white-space:normal;overflow:visible;text-overflow:clip;line-height:1.5}
@media (max-width:600px){.tool-header .tool-trust-badge{font-size:.72rem;padding:6px 12px;border-radius:14px}}
