/* =================================================================
   RESIZE IMAGE BATCH TOOL STYLES
   ================================================================= */

#resize-editor {
    position: relative;
}

.resize-preview-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 12px 32px var(--overlay-black-12);
}

.resize-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.resize-preview-title {
    margin: 0 0 0.35rem;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 700;
}

.resize-preview-note {
    margin: 0;
    color: var(--light-text);
    font-size: 0.92rem;
}

.resize-preview-current {
    background: var(--primary-10);
    color: var(--primary-color);
    border: 1px solid var(--primary-20);
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.1;
}

.preview-stage {
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: repeating-conic-gradient(var(--editor-checker-light) 0% 25%, transparent 0% 50%) 50% / 20px 20px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: auto;
}

#preview-canvas {
    display: block;
    max-width: 100%;
    max-height: 420px;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 28px var(--overlay-black-20);
    background: var(--card-bg);
}

.resize-preview-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.preview-stat-card {
    background: var(--card-hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.95rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.preview-stat-label {
    color: var(--light-text);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-stat-value {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 700;
}

.preview-stat-subvalue {
    color: var(--light-text);
    font-size: 0.82rem;
}

.resize-batch-controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.resize-settings-card,
.file-list-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.resize-settings-card {
    padding: 1.25rem;
}

.resize-tabs {
    display: inline-flex;
    gap: 0.5rem;
    padding: 0.35rem;
    background: var(--card-hover-bg);
    border-radius: 999px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.resize-tab {
    border: none;
    background: transparent;
    color: var(--light-text);
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    transition: var(--transition);
}

.resize-tab:hover {
    color: var(--text-color);
}

.resize-tab.active {
    background: var(--primary-color);
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.resize-option-card {
    background: var(--card-hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem;
}

.slider-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.slider-header label {
    margin: 0;
    color: var(--text-color);
    font-size: 0.92rem;
    font-weight: 700;
}

.slider-input {
    width: 112px;
    min-width: 112px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-color);
    padding: 0 0.85rem;
    font-size: 0.92rem;
    font-weight: 600;
}

.slider-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.dimension-slider {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.dimension-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 0 4px var(--primary-20);
}

.dimension-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 0 4px var(--primary-20);
}

.resize-help-note {
    margin: 0.9rem 0 0;
    color: var(--light-text);
    font-size: 0.88rem;
}

.percent-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.percent-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.percent-btn {
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.55rem 0.95rem;
    border-radius: 10px;
    transition: var(--transition);
}

.percent-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.percent-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.percent-custom-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.percent-custom-group label {
    color: var(--text-color);
    font-weight: 700;
    margin: 0;
}

.resize-action-bar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.resize-action-btn {
    border: 1px solid var(--border-color);
    background: var(--card-hover-bg);
    color: var(--text-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: var(--transition);
}

.resize-action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.resize-action-btn.active,
.resize-action-btn.primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.resize-action-btn.primary:hover,
.resize-action-btn.active:hover {
    color: #fff;
    opacity: 0.92;
}

.file-list-card {
    overflow: hidden;
}

.file-list-header,
.file-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
}

.file-list-header {
    border-bottom: 1px solid var(--border-color);
}

.file-list-footer {
    border-top: 1px solid var(--border-color);
}

.file-list-header h5 {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.file-list-actions,
.download-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.file-list-body {
    max-height: 430px;
    overflow-y: auto;
}

.empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--light-text);
}

.file-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.file-row:last-child {
    border-bottom: none;
}

.file-row:hover {
    background: var(--card-hover-bg);
}

.file-row.is-active {
    background: var(--primary-10);
}

.file-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    color: var(--text-color);
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta,
.file-submeta {
    color: var(--light-text);
    font-size: 0.82rem;
}

.file-meta {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}

.meta-arrow {
    opacity: 0.7;
}

.file-submeta {
    margin-top: 0.2rem;
}

.file-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.file-dl-btn {
    border-radius: 8px !important;
}

.file-remove-btn {
    border: none;
    background: transparent;
    color: var(--light-text);
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    transition: var(--transition);
}

.file-remove-btn:hover {
    color: #ef5350;
    background: rgba(239, 83, 80, 0.08);
}

.file-summary {
    color: var(--light-text);
    font-size: 0.88rem;
}

@media (max-width: 992px) {
    .slider-grid {
        grid-template-columns: 1fr;
    }

    .resize-preview-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .resize-preview-card,
    .resize-settings-card {
        padding: 1rem;
    }

    .preview-stage {
        min-height: 240px;
        padding: 0.75rem;
    }

    .slider-header,
    .percent-custom-group,
    .resize-action-bar,
    .file-list-header,
    .file-list-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .slider-input {
        width: 100%;
        min-width: 0;
    }

    .file-row {
        gap: 0.75rem;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .resize-tabs,
    .percent-presets,
    .download-actions,
    .file-list-actions {
        width: 100%;
    }

    .resize-tab,
    .percent-btn,
    .resize-action-btn,
    .download-actions .btn,
    .file-list-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .file-row {
        flex-wrap: wrap;
    }

    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
}