/* Auto jin Tools - ZIP tool styles */
.zip-app {
    display: grid;
    gap: 16px;
}

.zip-mode-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.zip-dropzone-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.zip-file-list-wrap {
    margin-top: 14px;
    border: 1px solid var(--tool-border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.zip-file-list-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    background: #f7f8fa;
    border-bottom: 1px solid var(--tool-border);
    font-size: .84rem;
}

.zip-file-list {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 380px;
    overflow-y: auto;
    divide-y: 1px solid var(--tool-border);
}

.zip-file-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid var(--tool-border);
    font-size: .82rem;
}

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

.zip-file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.zip-file-icon {
    flex-shrink: 0;
    color: var(--tool-muted);
    font-size: .95rem;
}

.zip-file-path {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--tool-ink);
    font-weight: 500;
}

.zip-file-size {
    color: var(--tool-muted);
    font-size: .76rem;
    white-space: nowrap;
}

.zip-file-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--tool-muted);
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.zip-file-remove:hover,
.zip-file-remove:focus-visible {
    color: var(--tool-danger);
    background: #fef2f2;
}

.zip-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.zip-entries-table-wrap {
    margin-top: 14px;
    border: 1px solid var(--tool-border);
    border-radius: 8px;
    background: #fff;
    overflow-x: auto;
    max-height: 420px;
}

.zip-entries-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
    text-align: left;
}

.zip-entries-table th,
.zip-entries-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--tool-border);
}

.zip-entries-table th {
    background: #f7f8fa;
    color: var(--tool-muted);
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
}

.zip-entries-table tr:last-child td {
    border-bottom: none;
}

.zip-entry-path {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: var(--tool-ink);
}

.zip-entry-action button {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid var(--tool-border);
    border-radius: 4px;
    background: #fff;
    color: var(--tool-ink);
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
}

.zip-entry-action button:hover {
    border-color: #9da1a8;
    background: #f7f8fa;
}

/* Dark mode */
html[data-theme="dark"] .zip-file-list-wrap,
html[data-theme="dark"] .zip-entries-table-wrap {
    border-color: #303236;
    background: #1a1c20;
}

html[data-theme="dark"] .zip-file-list-header,
html[data-theme="dark"] .zip-entries-table th {
    background: #202226;
    border-color: #303236;
    color: #9ca3af;
}

html[data-theme="dark"] .zip-file-item,
html[data-theme="dark"] .zip-entries-table td {
    border-color: #303236;
}

html[data-theme="dark"] .zip-file-path,
html[data-theme="dark"] .zip-entry-path {
    color: #e5e7eb;
}

html[data-theme="dark"] .zip-file-remove:hover {
    background: #3b1816;
}

html[data-theme="dark"] .zip-entry-action button {
    background: #25272b;
    border-color: #303236;
    color: #f3f4f6;
}

html[data-theme="dark"] .zip-entry-action button:hover {
    background: #2d3036;
    border-color: #4b5563;
}

/* 390px mobile responsiveness */
@media (max-width: 600px) {
    .zip-options-grid {
        grid-template-columns: 1fr;
    }
    .zip-file-item {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px;
    }
    .zip-file-size {
        grid-column: 1 / 2;
        padding-left: 24px;
        font-size: .72rem;
    }
    .zip-entry-path {
        max-width: 140px;
    }
}
