:root {
    --purple: #7d1ae8;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #8b8c8f;
    --bg-soft: #f5f5f5;
}

.export-modal {
    position: fixed;
    top: 0;
    left: 0;
    background: #0000004d;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    width: 100%;
    height: 100%;
}

.modal-box {
    max-width: 900px;
    width: 95%;
    height: 100vh;
    max-height: 700px;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-shadow: 0px 0px 60px 0px #00000012;
}

.export-left {
    width: 67.6%;
    height: 100%;
    background: #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.paper-template.excel {
    max-height: fit-content;
}

.paper-template {
    display: flex;
    flex-direction: column;
    max-width: 440px;
    width: 90%;
    max-height: 620px;
    height: 100%;
    box-shadow:
        0px 2px 4px -1px #0000000f,
        0px 4px 6px -1px #0000001a;
}

.paper-template .head {
    min-height: 28px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 6px 8px;
}

.paper-template .head.pdf {
    background-color: #ffffff;
    justify-content: space-between;
}

.paper-template .head.word {
    justify-content: center;
    background-color: #2b569a;
    position: relative;
    flex-direction: column;
}

.paper-template .head.word img {
    position: absolute;
    top: 28px;
    left: 0px;
}

.paper-template .head.excel {
    justify-content: start;
    background-color: #18964c;
    gap: 4px;
}

.paper-template .head.pdf span {
    font-size: 10px;
    line-height: 16px;
    color: #888a92;
}

.paper-template .head.word span,
.paper-template .head.excel span {
    font-size: 10px;
    line-height: 16px;
    color: #ffffff;
}

.paper-template .head.excel span {
    font-weight: 600;
}

.document-preview {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.inner-paper {
    width: 100%;
    max-width: 360px;
    max-height: 480px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scrollbar-color: var(--purple) transparent;
    scrollbar-width: thin;
}

.paper-page {
    background: white;
    padding: 16px;
    min-height: 480px;
    flex-shrink: 0;
    box-shadow: 0px 1px 2px 0px #0000001f;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.inner-paper::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.inner-paper::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: 3px;
}

.inner-paper::-webkit-scrollbar-track {
    background: transparent;
}

.paper-page .paper-loader {
    margin: auto;
}

.paper-page .paper-loader img {
    animation: spin 1s linear infinite;
}

.export-right::-webkit-scrollbar {
    display: none;
}

.paper-page .previewImage {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}
.previewImage {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}
.previewImage.loading-shimmer {
    background-color: #ececec;
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.7) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    background-repeat: no-repeat;
    background-position: 200% 0;
    animation: shimmer 1.2s infinite linear;
    color: transparent;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

.inner-paper.word .paper-page .previewImage {
    width: 100%;
    object-fit: contain;
}

.inner-paper.excel {
    max-width: unset;
    overflow-x: auto;
    overflow-y: auto;
    background: white;
    box-shadow: 0px 1px 2px 0px #0000001f;
}

.inner-paper.excel table {
    border-collapse: collapse;
}

.inner-paper.excel table .previewImage {
    min-height: 60px;
    min-width: 60px;
}

.inner-paper.excel th,
.inner-paper.excel td {
    min-width: 24px;
    min-height: 24px;
    font-size: 9px;
    line-height: 14px;
    color: #363942;
    padding: 8px;
    border: 1px solid #eaeaeb;
    white-space: nowrap;
}

.inner-paper.excel thead td,
.inner-paper.excel thead th {
    background: #f4f5f5;
    color: #888a92;
}

.inner-paper.excel thead tr:last-child th {
    color: #363942;
    font-weight: 600;
}

.inner-paper p,
.inner-paper .fileName {
    font-size: 9px;
    line-height: 14px;
    color: #363942;
}

.inner-paper .fileName {
    color: #9da2b5;
}

.export-right {
    height: 100%;
    flex-grow: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid #eaeaeb;
    gap: 16px;
    overflow-y: auto;
}

.mode-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mode-title {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}

.export-batch-no {
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-batch-no span {
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    color: #000000;
}

.export-extractMode {
    background: #e7ecfa;
    color: #000000;
    border-radius: 4px;
    padding: 0px 4px;
    font-size: 10px;
    line-height: 15px;
    text-transform: uppercase;
}

.tag-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-line span {
    font-size: 12px;
    line-height: 16px;
    color: #888a92;
}

.mode-label {
    box-shadow: inset 0px 0px 0px 1px #eaeaeb;
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    transition: all 0.2s ease-in-out;
}

.mode-label input[type="radio"] {
    accent-color: #eaeaeb;
    width: 12px;
    height: 12px;
    cursor: pointer;
}

.mode-label input[type="radio"]:checked {
    accent-color: var(--purple);
}

.mode-label-checkbox {
    cursor: pointer;
}

.mode-label-checkbox input[type="checkbox"] {
    accent-color: var(--purple);
    width: 14px;
    height: 14px;
    margin-top: 3px;
    cursor: pointer;
}

.mode-label:has(input:checked),
.mode-label:hover {
    box-shadow: inset 0px 0px 0px 1px var(--purple);
    background: #f5f3ff;
}

.mode-label:has(input:disabled) {
    box-shadow: inset 0px 0px 0px 1px #ddd;
    background: #f8f8f8;
    cursor: not-allowed;
}

.mode-label:has(input:disabled):hover {
    box-shadow: inset 0px 0px 0px 1px #ddd !important;
}

.layout-text span:first-child,
.option-text span:first-child {
    font-size: 14px;
    line-height: 20px;
    color: #000000;
}

.layout-text span:last-child,
.option-text span:last-child {
    font-size: 12px;
    line-height: 16px;
    color: #888a92;
}

.mode-label.layout {
    position: relative;
}

.mode-label.layout input[type="radio"] {
    position: absolute;
    right: 8px;
    top: 8px;
}

.checkbox {
    width: 15px;
    height: 15px;
    border: 2px solid #ccc;
    border-radius: 4px;
    position: relative;
}

input:checked + .checkbox {
    background: var(--purple);
    border-color: var(--purple);
}

input:checked + .checkbox::after {
    content: "✓";
    color: white;
    font-size: 12px;
    position: absolute;
    top: -2px;
    left: 2px;
}

.right-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.right-footer button {
    border-radius: 8px;
    padding: 8px 16px;
    border: none;
    font-size: 14px;
    line-height: 20px;
    transition: all 0.2s ease-in-out;
}

.right-footer button:first-child {
    background-color: #f1f2f7;
    color: #000000;
}

.right-footer button:first-child:hover {
    background-color: #e3e7ed;
}

.right-footer button:last-child:hover {
    background-color: #5500c0;
}

.right-footer button:last-child {
    background-color: #7d1ae8;
    color: #ffffff;
}

@media (width <=768px) {
    .export-left {
        width: 62.6%;
    }

    .inner-paper {
        width: 88%;
        height: 88%;
    }
}

@media (width <=650px) {
    .modal-box {
        flex-direction: column;
        max-height: 100vh;
        width: 100%;
        border-radius: 0px;
    }

    .export-left {
        width: 100%;
        max-height: 374px;
    }

    .paper-template {
        max-width: 231px;
        max-height: 326px;
    }

    .paper-template .head {
        padding: 3px 4px;
        min-height: 14.4px;
    }

    .head.pdf img {
        max-width: 8px;
        max-height: 8px;
    }

    .paper-template .head.pdf span {
        font-size: 5px;
        line-height: 8px;
    }

    .inner-paper {
        width: 191px;
        height: 284px;
        gap: 8px;
    }

    .paper-page {
        min-height: 284px;
        padding: 8px;
        gap: 8px;
    }

    .document-preview {
        min-height: 311px;
    }

    .export-right {
        width: 100%;
    }

    .mob-row {
        flex-direction: row !important;
    }

    .mode-label {
        flex-grow: 1;
    }

    .right-footer {
        justify-content: space-between;
    }

    .right-footer button {
        flex-grow: 1;
    }
}
