/*
    Merge Page Styles
    -----------------------------------------------------------------------------
*/

/* The main container for the content */
.container {
    margin: 12px;
}

h2.fw-bold {
    color: var(--text-dark);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* --- Dropzone styling --- */
.dropzone {
    position: relative;
    border: 2px dashed #a0b2c1;
    border-radius: 1.5rem;
    padding: 4rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-light);
    max-width: 900px;
    margin: auto;
}

.dropzone:hover,
.dropzone.active {
    border-color: var(--primary-color);
    background-color: #e9f2ff;
}

.dropzone .dz-message {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dropzone .drop-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.dropzone h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.dropzone p {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
}

.dropzone input[type="file"] {
    display: none;
}

/* --- File List and items (Adjusted) --- */
#fileList {
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* Increased gap between files */
    text-align: left;
    max-width: 900px;
    margin: 2rem auto;
}

.file-item {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: var(--shadow-light);
    transition: all 0.2s ease;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.drag-handle {
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: grab;
    transition: color 0.2s ease;
}

.drag-handle:hover {
    color: var(--primary-color);
}

.file-preview-container {
    position: relative;
    width: 80px; /* Increased width */
    height: 100px; /* Increased height */
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.file-preview canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rotation-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.2rem;
    font-weight: 700;
    border-radius: 0.25rem;
    padding: 0.15rem 0.4rem;
}

.file-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-grow: 1;
    padding-left: 1.5rem; /* Increased left padding */
}

.file-name {
    font-weight: 600;
    white-space: nowrap;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.65rem;
}

/* --- Action Buttons --- */
.btn {
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    color: #e9f2ff;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-primary:hover {
    background-color: #138496;
    border-color: #138496;
    transform: translateY(-2px);
    
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
}