/* =================================================================
   ROUND CORNERS BATCH TOOL STYLES
   ================================================================= */

#round-editor {
    position: relative;
}

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

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

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

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

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

.round-preview-stage {
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: auto;
    background-image:
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
        linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-color: #f5f5f5;
}

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

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

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

.round-settings-card {
    background: transparent;
    border: none;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setting-row,
.setting-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.setting-row {
    align-items: center;
}

.setting-row label,
.setting-card label {
    color: var(--text-color);
    font-weight: 700;
    margin: 0;
}

.setting-row-radius {
    justify-content: space-between;
}

.radius-control-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    min-width: 260px;
}

#radius-slider {
    width: 100%;
    accent-color: var(--primary-color);
}

#radius-value {
    color: var(--primary-color);
    font-weight: 700;
    min-width: 48px;
    text-align: right;
}

.preset-list {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.preset-btn {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 0.42rem 0.72rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
}

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

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

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

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

.background-control-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

#bg-color {
    width: 56px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
}

#bg-color:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.transparent-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
    color: var(--text-color);
}

.transparent-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

#format-select {
    height: 42px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0 0.85rem;
}

#format-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

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

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

.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) {
    .setting-grid {
        grid-template-columns: 1fr;
    }
}

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

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

    .setting-row,
    .setting-row-radius,
    .round-action-bar,
    .file-list-header,
    .file-list-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .radius-control-group {
        min-width: 0;
    }

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

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

    .round-action-btn {
        width: 100%;
        justify-content: center;
    }

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

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