
/* ========================================
   LAZERTIMES - PDF MERGER
======================================== */

@import url("../jpg-to-pdf/converter.css");

[hidden] {
    display: none !important;
}

/* ========================================
   UPLOAD LIMIT
======================================== */

.upload-limit {
    font-size: 12px;
    color: var(--muted);
    margin-top: 16px;
}

/* ========================================
   SELECTED PDF HEADER
======================================== */

.selected-pdfs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin: 28px 0 20px;
}

.selected-pdfs-header h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

#pdf-count {
    font-size: 13px;
    color: var(--muted);
}

.pdf-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ========================================
   PDF FILE LIST
======================================== */

.pdf-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pdf-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: 0.2s ease;
}

.pdf-card:hover {
    border-color: var(--primary);
}

/* ========================================
   PDF FILE ICON
======================================== */

.pdf-file-icon {
    width: 52px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 10px;
}

.pdf-file-icon svg {
    width: 24px;
    height: 24px;
}

.pdf-file-icon span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ========================================
   PDF FILE INFORMATION
======================================== */

.pdf-file-info {
    flex: 1;
    min-width: 0;
}

.pdf-file-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-file-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.pdf-position {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    background: var(--hero-bg);
    color: var(--primary);
    border-radius: 6px;
    margin-bottom: 7px;
}

/* ========================================
   PDF ORDER CONTROLS
======================================== */

.pdf-file-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-control-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s ease;
}

.pdf-control-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pdf-control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pdf-remove-btn {
    color: #ef4444;
}

.pdf-remove-btn:hover:not(:disabled) {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

/* ========================================
   MERGE INFORMATION
======================================== */

.merge-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    margin-top: 20px;
    background: var(--hero-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.merge-info svg {
    flex-shrink: 0;
    color: var(--primary);
}

.merge-info p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

/* ========================================
   MERGE PROGRESS BAR
======================================== */

#merge-progress {
    display: block;
    width: 100%;
    height: 10px;
    appearance: none;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    background: var(--border);
}

#merge-progress::-webkit-progress-bar {
    background: var(--border);
    border-radius: 20px;
}

#merge-progress::-webkit-progress-value {
    background: linear-gradient(
        90deg,
        #2563eb,
        #60a5fa
    );
    border-radius: 20px;
    transition: width 0.3s ease;
}

#merge-progress::-moz-progress-bar {
    background: #2563eb;
    border-radius: 20px;
}

/* ========================================
   MERGE SUCCESS MESSAGE
======================================== */

#merge-result {
    margin-top: 20px;
    padding: 16px;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

[data-theme="dark"] #merge-result {
    background: #052e16;
    color: #86efac;
    border-color: #166534;
}

/* ========================================
   DISABLED BUTTONS
======================================== */

#merge-btn:disabled,
#download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   FAQ SECTION
======================================== */

.tool-faq {
    margin-top: 48px;
    margin-bottom: 40px;
}

.tool-faq > h2 {
    text-align: center;
    font-size: 26px;
    margin-bottom: 24px;
}

.tool-faq details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.tool-faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.tool-faq summary::-webkit-details-marker {
    display: none;
}

.tool-faq summary::after {
    content: "+";
    font-size: 22px;
    font-weight: 400;
    color: var(--primary);
}

.tool-faq details[open] summary::after {
    content: "−";
}

.tool-faq details[open] {
    border-color: var(--primary);
}

.tool-faq details p {
    padding: 0 20px 20px;
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.8;
}

/* ========================================
   MOBILE RESPONSIVE
======================================== */

@media (max-width: 600px) {

    .selected-pdfs-header {
        align-items: flex-start;
    }

    .pdf-list-actions {
        width: 100%;
    }

    .pdf-list-actions button {
        flex: 1;
        padding: 12px;
    }

    .pdf-card {
        flex-wrap: wrap;
        padding: 14px;
        gap: 12px;
    }

    .pdf-file-icon {
        width: 44px;
        height: 52px;
    }

    .pdf-file-info {
        flex: 1;
        min-width: 0;
    }

    .pdf-file-name {
        font-size: 13px;
    }

    .pdf-file-controls {
        width: 100%;
        justify-content: flex-end;
        padding-top: 10px;
        border-top: 1px solid var(--border);
    }

    .pdf-control-btn {
        flex: 1;
        height: 40px;
    }

    .tool-faq > h2 {
        font-size: 22px;
    }

    .tool-faq summary {
        font-size: 13px;
        padding: 16px;
    }

    .tool-faq details p {
        padding: 0 16px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .pdf-card,
    .pdf-control-btn {
        transition: none;
    }

    #merge-progress::-webkit-progress-value {
        transition: none;
    }
}
