/* ════════════════════════════════════════════════════════════════════════════
   RECATOOLS — Image Compressor — style.css
   Tool-specific overrides only.
   Base styles live in /assets/css/tool-page.css.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Drop zone ───────────────────────────────────────────────────────────────── */
.drop-zone {
    border:          2px dashed var(--border);
    border-radius:   14px;
    padding:         2.5rem 1.5rem;
    text-align:      center;
    cursor:          pointer;
    transition:      border-color 0.18s, background 0.18s;
    background:      var(--bg);
    outline:         none;
    user-select:     none;
}
.drop-zone:hover,
.drop-zone:focus {
    border-color: var(--accent);
    background:   #FFF5F2;
}
.drop-zone.drag-over {
    border-color: var(--accent);
    background:   #fff3ed;
}
.drop-zone-icon {
    font-size:   2.75rem;
    line-height: 1;
    margin-bottom: 0.6rem;
    display:     block;
}
.drop-zone-label {
    font-size:   1rem;
    font-weight: 600;
    color:       var(--text);
    margin:      0 0 0.3rem;
}
.drop-zone-sub {
    font-size:  0.8125rem;
    color:      var(--muted);
    margin:     0;
}

/* ── Global quality bar ──────────────────────────────────────────────────────── */
.global-quality-bar {
    background:    var(--bg);
    border:        1px solid var(--border);
    border-radius: 10px;
    padding:       0.875rem 1rem;
    margin-bottom: 1.25rem;
    display:       flex;
    align-items:   center;
    gap:           1rem;
    flex-wrap:     wrap;
}
.global-quality-label {
    font-size:   0.8125rem;
    font-weight: 600;
    color:       var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}
.global-quality-slider {
    -webkit-appearance: none;
    appearance:         none;
    flex:               1;
    min-width:          120px;
    height:             5px;
    border-radius:      999px;
    background:         var(--border);
    outline:            none;
    cursor:             pointer;
}
.global-quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance:         none;
    width:              18px;
    height:             18px;
    border-radius:      50%;
    background:         var(--accent);
    cursor:             pointer;
    border:             2px solid #fff;
    box-shadow:         0 1px 4px rgba(0,0,0,0.18);
}
.global-quality-slider::-moz-range-thumb {
    width:        18px;
    height:       18px;
    border-radius: 50%;
    background:   var(--accent);
    cursor:       pointer;
    border:       2px solid #fff;
    box-shadow:   0 1px 4px rgba(0,0,0,0.18);
}
.global-quality-value {
    font-size:   0.9375rem;
    font-weight: 700;
    color:       var(--accent);
    min-width:   3.5rem;
    text-align:  right;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── File list ───────────────────────────────────────────────────────────────── */
.file-list {
    display:        flex;
    flex-direction: column;
    gap:            0.625rem;
    margin-bottom:  1.25rem;
}

/* ── Per-file row ────────────────────────────────────────────────────────────── */
.file-row {
    display:       grid;
    grid-template-columns: auto 1fr auto;
    align-items:   center;
    gap:           0.875rem;
    padding:       0.75rem 0.875rem;
    background:    var(--bg);
    border:        1px solid var(--border);
    border-radius: 10px;
    transition:    border-color 0.15s;
}
.file-row:hover {
    border-color: #d5d4d1;
}

/* Left: thumbnail + file info */
.file-left {
    display:     flex;
    align-items: center;
    gap:         0.625rem;
    min-width:   0;
}
.file-thumb {
    width:         48px;
    height:        48px;
    object-fit:    cover;
    border-radius: 6px;
    border:        1px solid var(--border);
    flex-shrink:   0;
    background:    #eee;
}
.file-info {
    min-width: 0;
}
.file-name {
    font-size:     0.875rem;
    font-weight:   600;
    color:         var(--text);
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
    max-width:     180px;
}
.file-orig-size {
    font-size:   0.75rem;
    color:       var(--muted);
    margin-top:  0.1rem;
}

/* Center: quality slider + format select */
.file-controls {
    display:       flex;
    flex-direction: column;
    gap:           0.5rem;
    min-width:     0;
}
.file-quality-row {
    display:     flex;
    align-items: center;
    gap:         0.5rem;
}
.file-quality-label {
    font-size:   0.75rem;
    color:       var(--muted);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.file-quality-slider {
    -webkit-appearance: none;
    appearance:         none;
    flex:               1;
    min-width:          80px;
    height:             4px;
    border-radius:      999px;
    background:         var(--border);
    outline:            none;
    cursor:             pointer;
}
.file-quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance:         none;
    width:              14px;
    height:             14px;
    border-radius:      50%;
    background:         var(--accent);
    cursor:             pointer;
    border:             2px solid #fff;
    box-shadow:         0 1px 3px rgba(0,0,0,0.18);
}
.file-quality-slider::-moz-range-thumb {
    width:        14px;
    height:       14px;
    border-radius: 50%;
    background:   var(--accent);
    cursor:       pointer;
    border:       2px solid #fff;
    box-shadow:   0 1px 3px rgba(0,0,0,0.18);
}
.file-quality-val {
    font-size:   0.75rem;
    font-weight: 700;
    color:       var(--accent);
    min-width:   2rem;
    text-align:  right;
    flex-shrink: 0;
}
.file-format-row {
    display:     flex;
    align-items: center;
    gap:         0.375rem;
}
.file-format-label {
    font-size:   0.75rem;
    color:       var(--muted);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.file-format-select {
    padding:       0.25rem 0.5rem;
    border:        1px solid var(--border);
    border-radius: 6px;
    font-size:     0.8125rem;
    font-weight:   600;
    color:         var(--text);
    background:    #fff;
    cursor:        pointer;
    outline:       none;
    transition:    border-color 0.15s;
}
.file-format-select:focus {
    border-color: var(--accent);
}

/* Right: size result + savings badge + download */
.file-right {
    display:        flex;
    flex-direction: column;
    align-items:    flex-end;
    gap:            0.375rem;
    flex-shrink:    0;
}
.file-compressed-size {
    font-size:   0.875rem;
    font-weight: 700;
    color:       var(--text);
    white-space: nowrap;
}
.savings-badge {
    display:       inline-block;
    padding:       0.15rem 0.5rem;
    border-radius: 999px;
    font-size:     0.7rem;
    font-weight:   700;
    background:    #e6f9f0;
    color:         #1a7a4a;
    white-space:   nowrap;
    letter-spacing: 0.01em;
}
.savings-badge.negative {
    background: #fef3e2;
    color:      #a05a00;
}
.file-download-btn {
    padding:       0.3rem 0.75rem;
    border-radius: 999px;
    border:        1px solid var(--accent);
    background:    transparent;
    color:         var(--accent);
    font-size:     0.8125rem;
    font-weight:   600;
    cursor:        pointer;
    white-space:   nowrap;
    transition:    background 0.15s, color 0.15s;
}
.file-download-btn:hover {
    background: var(--accent);
    color:      #fff;
}

/* ── Compress-all button ─────────────────────────────────────────────────────── */
.compress-all-btn {
    width:         100%;
    padding:       0.875rem 1rem;
    background:    var(--accent);
    color:         #fff;
    border:        none;
    border-radius: 10px;
    font-size:     1rem;
    font-weight:   700;
    cursor:        pointer;
    transition:    opacity 0.15s, transform 0.1s;
    margin-top:    0.25rem;
    margin-bottom: 0.625rem;
}
.compress-all-btn:hover {
    opacity: 0.9;
}
.compress-all-btn:active {
    transform: scale(0.99);
}
.compress-all-btn:disabled {
    opacity: 0.55;
    cursor:  not-allowed;
}

/* ── Privacy note ────────────────────────────────────────────────────────────── */
.privacy-note {
    font-size:   0.8125rem;
    color:       var(--muted);
    padding:     0.625rem 0.875rem;
    background:  var(--bg);
    border:      1px solid var(--border);
    border-radius: 8px;
    line-height: 1.5;
    margin-top:  0.5rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .file-row {
        grid-template-columns: auto 1fr;
        grid-template-rows:    auto auto;
    }
    .file-right {
        grid-column:  2;
        grid-row:     2;
        flex-direction: row;
        align-items:  center;
        flex-wrap:    wrap;
        justify-content: flex-end;
        gap:          0.375rem 0.625rem;
    }
    .file-name {
        max-width: 140px;
    }
}

@media (max-width: 400px) {
    .file-row {
        grid-template-columns: 1fr;
    }
    .file-left {
        flex-wrap: wrap;
    }
    .file-right {
        grid-column: 1;
        justify-content: flex-start;
    }
    .global-quality-bar {
        flex-direction: column;
        align-items:    stretch;
    }
    .global-quality-value {
        text-align: left;
    }
}

/* cache-buster: 2026-05-24T05:06:05Z */
