/* =================================================================
   ROTATE IMAGE BATCH TOOL STYLES
   ================================================================= */

#rotate-editor {
    position: relative;
    margin-bottom: 1rem;
}

.rotate-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);
}

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

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

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

.rotate-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;
}

.rotate-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;
}

#rotate-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);
}

.rotate-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;
}

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

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

.rotate-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);
}

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

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

.rotate-action-btn.primary:hover {
    color: #fff;
    opacity: 0.92;
}

.file-list-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    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);
    transition: var(--transition);
}

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

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

.file-thumb-frame {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
}

.file-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.2s ease;
}

.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;
}

.rotation-state {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.rotate-state-icon {
    display: inline-block;
    transform: rotate(var(--icon-rotation, 0deg));
    transition: transform 0.2s ease;
}

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

.file-dl-btn,
.file-rotate-btn,
.file-remove-btn {
    border-radius: 8px !important;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.file-rotate-btn {
    flex-shrink: 0;
}

.file-rotate-btn i {
    font-size: 0.92rem;
}

.file-remove-btn {
    border: none;
    background: transparent;
    color: var(--light-text);
    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) {
    .rotate-preview-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .rotate-action-bar,
    .file-list-header,
    .file-list-footer {
        flex-direction: column;
        align-items: stretch;
    }

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

@media (max-width: 560px) {
    .rotate-action-btn,
    .download-actions .btn,
    .file-list-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .download-actions,
    .file-list-actions {
        width: 100%;
    }

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

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

    .file-rotate-btn,
    .file-dl-btn,
    .file-remove-btn {
        width: 36px;
        height: 36px;
    }
}