/* File: assets/css/tools/merge-pdf.css */

/* --- Step 2: Arrange Files & Merge --- */

/* File Order List Container */
.file-order-list {
    margin-top: 20px;
    border: 2px solid var(--primary-light); /* Subtle border matching theme */
    border-radius: 10px;
    min-height: 200px; /* Ensure visible area for drag and drop */
    padding: 10px;
   /* background-color: var(--light-bg); /* Use light background variable */
    overflow: hidden; /* For smooth transitions during drag */
   /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* Soft shadow */
}

/* Individual File Item in Order List */
.file-order-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0; /* Spacing between items */
    background-color: var(--benefit-card-bg); /* Lightest background for items */
    border: var(--benefit-card-border); /* Item border */
    border-radius: 8px;
    cursor: grab; /* Indicates draggable */
    transition: transform 0.2s ease-in-out, background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Item shadow */
    color: var(--dark-text); /* Ensure text is readable in both modes */
    gap:15px;
}

.file-order-item:hover {
    background-color: var(--mobile-dropdown-hover); /* Hover feedback */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Style for item being dragged */
.file-order-item.dragging {
    opacity: 0.7;
    transform: scale(1.01); /* Slightly enlarge to show active drag */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    cursor: grabbing;
    border-color: var(--primary-medium); /* Highlight border when dragging */
}

/* Drag Handle Icon */
.drag-handle {
    margin-right: 15px;
    font-size: 1.6em; /* Slightly larger icon */
    color: var(--primary-medium); /* Theme color for handle */
    cursor: grab;
    /* Font Awesome 6 bars icon for drag handle */
    font-family: 'Font Awesome 6 Free'; /* Make sure Font Awesome is loaded */
    font-weight: 900; /* For solid icons */
}

/* File Name within the ordered list */
.file-order-name {
    flex-grow: 1; /* Allows name to take available space */
    font-weight: 600; /* Slightly bolder */
    color: var(--heading-color); /* Main text color */
    font-size: 1.05em;
}

/* Processing Animation (Step 2 - during merge) */
.processing-animation {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--light-bg); /* Matches other tool card elements */
    border: 1px solid var(--home-tool-card-border);
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Spinner for processing */
.spinner {
    border: 8px solid var(--background-light); /* Light border for spinner track */
    border-top: 8px solid var(--primary-medium); /* Theme colored spinner */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite; /* Standard spin animation */
    margin: 0 auto 20px; /* Center and space from text */
}

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

.processing-animation p {
    color: var(--text-color);
    font-size: 1.1em;
    line-height: 1.5;
}

/* --- Step 3: Download Your Merged PDF --- */


/* Success Message Styling */



/* Download Options Container */

.download-area p {
    font-size: 1.2em;
    color: var(--text-color);
    margin-bottom: 25px; /* More space before button */
    font-weight: 500;
}

/* Download Button (Success style) */
.btn-success {
    background-color: #28a745; /* Green for success */
    color: white;
    border: none;
    padding: 14px 30px; /* Larger button */
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.15em; /* Slightly larger text */
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none; /* For the <a> tag */
    display: inline-flex;
    align-items: center;
    gap: 10px; /* Space for icon */
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3); /* Green shadow */
}

.btn-success:hover {
    background-color: #218838; /* Darker green on hover */
    transform: translateY(-2px); /* Slight lift effect */
}


/* General button wrapper for consistent spacing */
.btn-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* Alert styles (general but used in these steps) */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px; /* Adjust spacing as needed */
    font-size: 0.95em;
    line-height: 1.5;
}

.alert-danger {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1; /* Light blue */
    color: #0c5460; /* Dark blue text */
    border: 1px solid #bee5eb;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .file-order-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .drag-handle {
        margin-right: 0;
        margin-bottom: 5px; /* Space between handle and name on small screens */
    }

    .file-order-name {
        font-size: 1em;
    }

    .btn-success, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}
