/* Tool Pages - Small Format Buttons */

.tool-workspace {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 60vh;
}

/* Upload Zone */
.upload-zone {
    background: white;
    border: 3px dashed #d0d0d0;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s;
}

.upload-zone:hover {
    border-color: #FF7657;
    background: #FFF5F3;
}

.upload-zone.dragover {
    border-color: #FF7657;
    background: #FFE5E0;
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: 20px;
}

.upload-zone h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-hint {
    color: #999;
    font-size: 14px;
    margin-bottom: 24px;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #E85D3F 0%, #FF7657 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Work Area */
.work-area {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.preview-panel {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.image-card {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.image-thumbnail {
    width: 100%;
    max-width: 300px;
    height: 200px;
    margin: 0 auto 16px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-info {
    text-align: center;
}

.image-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    word-break: break-word;
}

/* Controls Panel */
.controls-panel {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 80px;
}

.panel-section {
    margin-bottom: 24px;
}

.panel-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.control-item {
    margin-bottom: 24px;
}

.control-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

/* Input Fields */
.input-field, .select-field {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.input-field:focus, .select-field:focus {
    outline: none;
    border-color: #FF7657;
}

/* Slider */
.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
    transition: transform 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: 6px;
}

/* SMALL FORMAT BUTTONS - Like Screenshot */
.format-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.format-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.format-btn:hover {
    background: #FFF5F3;
    border-color: #FFB8A5;
}

.format-btn.active {
    background: #FFF5F3;
    border: 2px solid #FF7657;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.format-btn-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.format-btn-icon svg {
    width: 28px;
    height: 28px;
}

.format-btn-info {
    flex: 1;
}

.format-btn-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.format-btn-desc {
    font-size: 12px;
    color: #FF7657;
    margin-top: 2px;
}

/* Buttons */
.btn-process {
    width: 100%;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-process:hover {
    background: linear-gradient(135deg, #E85D3F 0%, #FF7657 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-process:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ORANGE Download Button */
.btn-download {
    width: 100%;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-download:hover {
    background: linear-gradient(135deg, #E85D3F 0%, #FF7657 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    padding: 10px 20px;
    background: white;
    border: 2px solid #FF7657;
    color: #FF7657;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #FF7657;
    color: white;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #FF7657;
}

.info-box {
    background: #FFF5F3;
    border-left: 4px solid #FF7657;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
}

.info-box p {
    margin: 4px 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-large {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF7657;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: #FF7657;
    font-size: 16px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .tool-workspace {
        padding: 20px 16px;
    }

    .upload-zone {
        padding: 40px 20px;
    }

    .image-thumbnail {
        height: 160px;
    }

    .controls-panel {
        position: static;
    }

    .work-area {
        grid-template-columns: 1fr;
    }

    .button-group {
        grid-template-columns: 1fr;
    }
}
