/* Image Merge Tool Styles */

/* Control Panel */
.control-panel {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.control-panel h5 {
    color: #333;
    border-bottom: 2px solid #fb983a;
    padding-bottom: 10px;
}

/* Preview Panel */
.preview-panel {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    min-height: 600px;
}

.preview-panel h5 {
    color: #333;
}

.canvas-container {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border-radius: 10px;
    padding: 20px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

#mergeCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Download Panel */
.download-panel {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 80px;
}

.download-panel h5 {
    color: #333;
    border-bottom: 2px solid #fb983a;
    padding-bottom: 10px;
}

.merged-preview {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border-radius: 10px;
    padding: 10px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.merged-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Image List */
.image-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.image-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: move;
}

.image-list-item.dragging {
    opacity: 0.5;
}

.image-list-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.image-list-item .image-info {
    flex: 1;
    min-width: 0;
}

.image-list-item .image-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-list-item .image-size {
    font-size: 0.75rem;
    color: #6c757d;
}

.image-list-item .remove-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #dc3545;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-list-item .remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Info Boxes */
.info-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.info-box:hover {
    box-shadow: 0 5px 20px rgba(251, 152, 58, 0.2);
    transform: translateY(-5px);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #fb983a 0%, #ff6b6b 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 24px;
}

.info-box h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

/* Accordion */
.accordion-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 10px;
}

.accordion-button {
    background: white;
    color: #333;
    font-weight: 500;
    padding: 15px 20px;
    border-radius: 10px !important;
}

.accordion-button:not(.collapsed) {
    background: #fff5ed;
    color: #fb983a;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: #fb983a;
}

.accordion-button::after {
    filter: brightness(0) saturate(100%) invert(58%) sepia(50%) saturate(2000%) hue-rotate(340deg);
}

.accordion-body {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

/* Custom Scrollbar */
.control-panel::-webkit-scrollbar,
.image-list::-webkit-scrollbar {
    width: 8px;
}

.control-panel::-webkit-scrollbar-track,
.image-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.control-panel::-webkit-scrollbar-thumb,
.image-list::-webkit-scrollbar-thumb {
    background: #fb983a;
    border-radius: 10px;
}

.control-panel::-webkit-scrollbar-thumb:hover,
.image-list::-webkit-scrollbar-thumb:hover {
    background: #e68a30;
}

/* Responsive */
@media (max-width: 991px) {
    .control-panel,
    .download-panel {
        position: static;
        margin-bottom: 20px;
    }
    
    .preview-panel {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .canvas-container {
        padding: 10px;
        min-height: 300px;
    }
    
    .control-panel,
    .preview-panel,
    .download-panel {
        padding: 15px;
    }
}
