.pdfm-container {
    max-width: 750px;
    margin: 0 auto;
    padding: 20px;
    margin-bottom: 30px;
}

.pdfm-wrapper {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pdfm-title {
    color: #2a73d9;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 0;
}

/* Drop Area */
.pdfm-drop-area {
    border: 2px dashed #adb5bd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    background: #f8f9fa;
    transition: all 0.3s;
    cursor: pointer;
}

.pdfm-drop-area:hover {
    border-color: #2a73d9;
    background: #f1f3ff;
}

.pdfm-drop-area.dragover {
    border-color: #2a73d9;
    background: #e9ecef;
}

.pdfm-drop-text {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 500;
    text-align: center;
}

.pdfm-drop-or {
    color: #495057;
    margin-bottom: 15px;
    text-align: center;
}

/* File List */
.pdfm-file-list {
    margin: 0 0 20px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px 0;
}

.pdfm-empty-msg {
    text-align: center;
    color: #6c757d;
    padding: 40px 0;
    margin: 0;
}

.pdfm-file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    position: relative;
    background: #fff;
    margin-bottom: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: grab;
}

.pdfm-file-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.pdfm-file-item.dragging {
    opacity: 0.5;
    background: #f8f9fa;
    cursor: move;
}

.pdfm-file-item.pdfm-merged-item {
    flex-direction: column;
    justify-content: center;
    cursor: default;
}

.pdfm-file-item.pdfm-merged-item .pdfm-file-icon {
    display: block;
    width: 80px;
    height: 80px;
}

.pdfm-reorder-control {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.pdfm-reorder-input {
    width: 40px;
}

.pdfm-container .pdfm-reorder-input {
    padding: 6px;
    text-align: center;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background-color: #fff;
    border-radius: 4px;
    -moz-appearance: textfield;
    appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pdfm-container .pdfm-reorder-input:focus,
.pdfm-container .pdfm-reorder-input:active {
    outline: none;
    border-color: #2a73d9;
    background-color: #fff;
    box-shadow: 0 0 0 1px rgba(42, 115, 217, 0.2);
}

.pdfm-reorder-input::-webkit-outer-spin-button,
.pdfm-reorder-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pdfm-file-icon {
    display: none;
}

.pdfm-file-info {
    flex-grow: 1;
    min-width: 0;
}

.pdfm-file-name {
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdfm-file-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdfm-file-size {
    color: #6c757d;
    font-size: 0.85em;
}

.pdfm-file-actions {
    display: flex;
    gap: 8px;
    margin-left: 10px;
}

.pdfm-move-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
}

.pdfm-move-btn:hover {
    background: none;
}

.pdfm-move-btn svg {
    fill: #495057;
}

.pdfm-remove-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    background: none;
    border: none;
    padding: 0;
}

.pdfm-remove-icon:hover {
    background: #fce8e6;
    /* Light red background for hover/click */
}

.pdfm-remove-icon svg {
    fill: #dc3545;
}

/* Progress Bar */
.pdfm-progress-container {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
}

.pdfm-progress-bar {
    height: 100%;
    width: 0%;
    background: #2a73d9;
    border-radius: 10px;
    transition: width 0.3s;
}

.pdfm-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

/* Buttons */
.pdfm-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.pdfm-btn {
    border: none;
    padding: 8px 13px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pdfm-btn:active {
    transform: scale(0.98);
}

.pdfm-btn-primary {
    background-color: #2a73d9;
    color: white;
}

.pdfm-btn-primary:hover,
.pdfm-btn-primary:active,
.pdfm-btn-primary:focus {
    background-color: #2a73d9;
    color: white;
}

.pdfm-btn-merge {
    background-color: #28a745;
    color: white;
}

.pdfm-btn-merge:hover,
.pdfm-btn-merge:active,
.pdfm-btn-merge:focus {
    background-color: #28a745;
    color: white;
}

.pdfm-btn-merge:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
    color: white;
}

.pdfm-btn-clear {
    background-color: #dc3545;
    color: white;
}

.pdfm-btn-clear:hover,
.pdfm-btn-clear:active,
.pdfm-btn-clear:focus {
    background-color: #dc3545;
    color: white;
}

.pdfm-btn-download {
    background-color: #2a73d9;
    color: white;
}

.pdfm-btn-download:hover,
.pdfm-btn-download:active,
.pdfm-btn-download:focus {
    background-color: #2a73d9;
    color: white;
}

.pdfm-btn-download:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
}

.pdfm-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.pdfm-btn-secondary:hover,
.pdfm-btn-secondary:active,
.pdfm-btn-secondary:focus {
    background-color: #6c757d;
    color: white;
}



/* Spinner */
.pdfm-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    margin-left: 10px;
}

.pdfm-spinner.active {
    display: inline-block;
    animation: pdfm-spin 1s linear infinite;
}

.pdfm-spinner.pdfm-spinner-dark {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: #2a73d9;
}

@keyframes pdfm-spin {
    to {
        transform: rotate(360deg);
    }
}

.pdfm-hidden {
    display: none !important;
}

.pdfm-sort-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.pdfm-sort-label {
    font-weight: 500;
    color: #495057;
    font-size: 17px;
}

.pdfm-container .pdfm-sort-select {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #ced4da;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
    /* Custom arrow for select dropdown */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8L10 12L14 8' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px 18px;
    padding-right: 40px;
    /* Make space for icon */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pdfm-container .pdfm-sort-select:hover,
.pdfm-container .pdfm-sort-select:focus,
.pdfm-container .pdfm-sort-select:active {
    outline: none;
    border-color: #2a73d9;
    background-color: #fff;
}

.faq-list {
    margin-top: 1rem;
}

.faq-list dt {
    font-weight: 500;
    font-size: 1.1em;
}

.faq-list dd {
    margin-left: 0;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ddd;
}

@media (max-width: 768px) {
    .pdfm-container {
        padding: 0;
    }

    .pdfm-wrapper {
        border-radius: 0;
        padding: 20px 0;
        box-shadow: none;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
    }

    .pdfm-drop-area {
        padding: 25px;
    }

    .pdfm-controls {
        align-items: center;
    }

    .pdfm-btn {
        padding: 8px 13px;
    }

    .pdfm-file-list {
        margin-left: -10px;
        margin-right: -20px;
        padding-left: 0;
        padding-right: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .pdfm-file-item {
        padding: 12px 12px 12px 5px;
    }
}