/* Tools Visual Components CSS - Premium Black & White Theme */

.tool-interface-wrapper {
    margin-bottom: 40px;
}

.tool-interface {
    padding: 32px;
    margin-bottom: 48px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.tool-interface::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, transparent 100%);
    pointer-events: none;
}

/* File Upload Zone */
.upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05) inset;
}

.upload-icon {
    font-size: 3rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.upload-zone:hover .upload-icon {
    color: var(--white);
    transform: translateY(-4px);
}

.upload-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
}

.upload-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.file-input {
    display: none;
}

/* Tool Layout Options (Split Panel) */
.tool-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 24px;
}

@media (min-width: 992px) {
    .tool-workspace.split {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

/* Options / Configuration Panels */
.options-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.options-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.param-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.param-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.param-value {
    color: var(--white);
}

/* Input Fields & Sliders */
.form-input {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--white);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--white);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    outline: none;
    transition: background 0.3s;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-secondary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--white);
}

/* Preview / Results Area */
.preview-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}

.preview-box {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-box img, .preview-box canvas {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    object-fit: contain;
}

.preview-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* File info cards */
.file-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.file-name {
    color: var(--white);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.file-size {
    color: var(--text-secondary);
}

/* Active Status Indicators */
.tool-progress-container {
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 8px;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tool-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.tool-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--text-secondary), var(--white));
    border-radius: 4px;
    transition: width 0.2s ease;
}

/* Download Results Box */
.download-box {
    display: none;
    padding: 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    text-align: center;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.download-box.active {
    display: flex;
}

.download-icon-success {
    font-size: 2.5rem;
    color: var(--white);
}

.download-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--white);
}

.download-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    margin-bottom: 8px;
}

.download-stat {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.01);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

.download-stat span:first-child {
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.download-stat span:last-child {
    color: var(--white);
    font-weight: 700;
}

/* Dropdown selections & buttons */
.btn-action {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

/* Multiple file list for PDF mergers/splitters */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 12px;
}

.file-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
}

.file-list-item .remove-btn {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-weight: bold;
}

/* Grid Image splitter visualizer */
.grid-preview {
    display: grid;
    gap: 4px;
    border: 2px solid var(--border-color);
    background: rgba(0,0,0,0.4);
    padding: 4px;
    border-radius: 8px;
}

.grid-cell {
    background: var(--white);
    opacity: 0.15;
    border: 1px dashed var(--text-secondary);
    aspect-ratio: 1;
}

/* Exif metadata display table */
.meta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 12px;
}

.meta-table th, .meta-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.meta-table th {
    color: var(--white);
    font-weight: 600;
}

.meta-table td {
    color: var(--text-secondary);
}

.meta-table tr:hover td {
    color: var(--white);
}

/* Compare Image overlay slider */
.comparison-slider-wrapper {
    position: relative;
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: 8px;
}

.comparison-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.comparison-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    border-right: 2px solid var(--white);
}

.comparison-overlay img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.comparison-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--white);
    cursor: ew-resize;
}

/* Text editors for converters */
.text-editor-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.text-editor {
    min-height: 250px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    color: var(--white);
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
    width: 100%;
}

.text-editor:focus {
    outline: none;
    border-color: var(--white);
}
