/* Image Editor Styles */
.app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #747d8c;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.upload-area:hover {
    border-color: #007cba;
}

.upload-area.dragover {
    border-color: #007cba;
}

.upload-content i {
    font-size: 3rem;
    color: #999;
    margin-bottom: 1rem;
    display: block;
}

.upload-content p {
    margin: 0.5rem 0;
    color: #747d8c;
}

.upload-hint {
    font-size: 0.9rem;
    color: #999;
}

/* Preview Section */
.preview-container {
    position: relative;
    border: 1px solid #747d8c;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#image-canvas {
    max-width: 100%;
    max-height: 400px;
    display: block;
}

.image-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}

.image-info p {
    margin: 0.25rem 0;
    color: #747d8c;
}

/* Resize Controls */
.resize-mode {
    margin-bottom: 1rem;
}

.resize-mode label {
    display: block;
    margin: 0.5rem 0;
    cursor: pointer;
}

.resize-controls {
    margin: 1rem 0;
}

.control-group {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group label {
    min-width: 80px;
    font-weight: 500;
}

.control-group input[type="number"] {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid #747d8c;
    border-radius: 4px;
}

.control-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.control-group span {
    color: #666;
    font-size: 0.9rem;
}

/* Export Controls */
.export-controls {
    margin: 1rem 0;
}

.export-controls input[type="range"] {
    width: 150px;
    margin: 0 0.5rem;
}

/* Percentage slider specific styling */
#percentage-slider {
    width: 250px;
    height: 8px;
    border-radius: 4px;
    background: #747d8c;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

#percentage-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
}

#percentage-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    border: none;
}

/* Buttons */
.button {
    background: #f5f5f5;
    border: 1px solid #747d8c;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.button:hover {
    background: #e9e9e9;
    border-color: #ccc;
}

.button.primary {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.button.primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.button.secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.button.secondary:hover {
    background: #545b62;
    border-color: #545b62;
}

/* Batch Processing */
.batch-info {
    margin: 1rem 0;
}

.batch-controls {
    margin: 1rem 0;
    display: flex;
    gap: 1rem;
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

.image-thumbnail {
    position: relative;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-thumbnail:hover {
    border-color: #007cba;
    transform: translateY(-2px);
}

.image-thumbnail.selected {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.image-thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.image-thumbnail-info {
    padding: 0.5rem;
    font-size: 0.8rem;
    color: #747d8c;
    text-align: center;
}

.image-thumbnail-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-thumbnail-dimensions {
    color: #999;
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
}

.image-thumbnail-desired {
    color: #007cba;
    font-size: 0.7rem;
    font-weight: 500;
}

.batch-progress {
    margin: 1rem 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: #007cba;
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    text-align: center;
    margin: 0.5rem 0;
    color: #747d8c;
}

/* Responsive */
@media (max-width: 768px) {
    .app-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .control-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .control-group label {
        min-width: auto;
    }

    .batch-controls {
        flex-direction: column;
    }
}
