:root {
    --c-line: #EAEAEA;
    --c-text: #000000;
    --c-muted: #9DA9B5;
    --c-surface: #F5F7FB;
    --c-cell-head: #F5F6FB;
    --c-btn: #F1F2F7;
    --c-btn-hover: #E3E7ED;
    --c-btn-dark: #000000;
    --c-btn-dark-hover: #363942;
    --ease: all ease-in .15s;
}

h2,
h2 *,
h3,
h3 * {
    font-weight: bold;
}

h2,
h2 * {
    font-size: 1.4em;
}

h3,
h3 * {
    font-size: 1.2rem;
}

.tool {
    box-shadow: 0px 20px 20px -12px #0000000A, 0px 1px 2px 1px #0000000A;

}

.left-preview-inner,
.convert-btn,
.images-clear .clear-all-btn,
.result-text-download-all div button,
.status-wrapper,
.table-nav,
.page-btn,
:is(.file-download-btn, .file-preview-btn, .file-copy-btn) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-waiting,
.result-waiting .header,
.result-waiting .img-title-text,
.parent-response-div,
.result-waiting-card,
.result-waiting-card .card-row,
.status-wrapper,
.action_wrapper,
.table-container {
    min-width: 0;
    max-width: 100%;
}

.js-single-img-preview .img-preview-name,
.result-waiting .img-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-section {
    background-color: var(--color-skyblue);
}

.tool-area {
    display: flex;
    width: 100%;
    gap: 16px;
    min-width: 0;
    overflow: visible;
}

.drag-n-drop-text small {
    display: none;
}

.drop-file-text {
    display: none;
    color: #9DA2B5;
    font-weight: 500;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
}

.tool-area .upload-section.is-dragging {
    background-color: #F1F2F7;
}

.tool-area .upload-section.is-dragging> :not(.drop-file-text) {
    display: none;
}

.tool-area .upload-section.is-dragging .drop-file-text {
    display: block;
}

.flex-basis-50-per {
    flex-basis: 50% !important;
}

.after-img-upload {
    flex-basis: 50%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.after-img-upload .images-clear {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.cloudflare_container {
    position: absolute;
    right: 0;
    bottom: 35px;
}

.uploaded-file,
.uploaded-file * {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    line-height: 24px;
    color: var(--c-muted);
}

.selected-img-preview {
    padding: 0 6px 0 0;
    overflow: auto;
    height: auto;
    min-height: 294px;
    max-height: 294px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-img-preview::-webkit-scrollbar {
    background: transparent;
}

.selected-img-preview::-webkit-scrollbar-thumb {
    background: var(--c-line);
}

.js-single-img-preview {
    box-shadow: inset 0 0 0 1px var(--c-line);
    padding: 12px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.js-single-img-preview:hover {
    background: #f5f7fb49;
}

.js-single-img-preview .left-preview {
    display: flex;
    align-items: center;
    gap: 16px;
}

.left-preview-inner {
    width: 64px;
    height: 64px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: var(--c-surface);
}

.detail-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.js-single-img-preview .img-preview-name {
    font-size: var(--font-size-small);
    font-weight: 400;
    line-height: 24px;
    color: var(--c-text);
    max-width: 20ch;
}

.js-single-img-preview .img-preview-size {
    font-size: var(--font-size-x-small);
    font-weight: 400;
    line-height: 20px;
    color: var(--c-muted);
    position: relative;
}

.right-preview .delete-action {
    font-size: 30px;
    font-weight: 500;
    color: #909399;
    cursor: pointer;
    max-height: max-content;
}

.images-clear .clear-all-btn {
    padding: 8px 24px;
    min-width: 106px;
    margin: unset;
    border: none;
    border-radius: 8px;
    background: var(--c-btn);
    font-size: var(--font-size-small);
    line-height: 24px;
    font-weight: 400;
    cursor: pointer;
    transition: var(--ease);
}

.images-clear .clear-all-btn:hover {
    background: var(--c-btn-hover);
}

.convert-btn {
    padding: 8px 24px;
    gap: 8px;
    border-radius: 8px;
    background: var(--c-text);
    color: #fff;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--ease);
}

.convert-btn:hover {
    background: #262626;
}

.result-waiting {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-basis: 100%;
}

.result-text-download-all {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.result-text-download-all div {
    display: flex;
    gap: 8px;
}

.result-text-download-all div button {
    padding: 6px 12px;
    gap: 6px;
    border: none;
    border-radius: 6px;
    transition: var(--ease);
}

.result-text-download-all div button span {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    text-align: center;
    color: var(--c-text);
}

.result-text-download-all div button:first-child {
    background: var(--c-btn);
}

.result-text-download-all div button:first-child:hover {
    background: var(--c-btn-hover);
}

.result-text-download-all div button:not(:first-child) {
    background: var(--c-btn-dark);
}

.result-text-download-all div button:not(:first-child):hover {
    background: var(--c-btn-dark-hover);
}

.result-text-download-all div button:not(:first-child) span {
    color: #fff;
}

.parent-response-div {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.result-waiting .result-waiting-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: inset 0 0 0 1px var(--color-EAEAEA);
    border-radius: 12px;
    position: relative;
    transition: all 0.5s;
    overflow: clip;
    width: 100%;
}

.result-waiting-card .card-row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 12px;
}

.result-waiting .img-title-text {
    display: flex;
    align-items: center;
    flex: 1;
}

.result-waiting .img-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: sticky;
    top: 0;
    gap: 10px;
    min-height: 38px;
}

.result-waiting .img-title span {
    display: block;
    font-size: 14px;
    line-height: 24px;
    max-width: 12ch;
}

.result-waiting figure figcaption span:last-child {
    display: none;
    font-size: 12px;
    line-height: 18px;
}

.status-wrapper,
.action_wrapper {
    flex: 1;
}

.action_wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.finshed__span {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: max-content;
    padding: 2px 8px;
    border-radius: 5px;
    background: #F1F6FF;
    color: #017BFF;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    text-align: center;
}

.finished-err {
    display: flex !important;
}

:is(.file-download-btn, .file-preview-btn, .file-copy-btn) {
    padding: 8px 16px;
    border-radius: 8px;
    background: #ffffff;
    color: var(--c-text);
    text-align: center;
    cursor: pointer;
    border: 1px solid #EAEAEB;
    transition: var(--ease);
}

:is(.file-download-btn, .file-preview-btn, .file-copy-btn):hover {
    background: #F4F5F5;
}

:is(.file-download-btn, .file-preview-btn, .file-copy-btn) span {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}

.btn-icon {
    display: none;
}

.table-container {
    overflow: auto;
    max-height: 364px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.table-container::-webkit-scrollbar {
    background: transparent;
    height: 3px;
    width: 3px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #EAEAEA;
}

.table-container.table-active {
    border-top: 1px solid var(--c-line);
}

.responsive-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    border-spacing: 0;
    text-align: center;
    border-left: 1px solid var(--c-line);
    border-right: 1px solid var(--c-line);
}

.responsive-table th,
.responsive-table td {
    box-sizing: border-box;
    padding: 6px 12px;
    border: 1px solid var(--c-line);
    border-bottom: none;
    white-space: pre;
    word-break: break-word;
    text-align: center;
    font-weight: 400;
    color: var(--c-text);
    font-size: 12px;
    line-height: 16px;
    min-width: 50px;
}

.responsive-table th:first-child,
.responsive-table td:first-child {
    border-left: none;
}

.responsive-table th:last-child,
.responsive-table td:last-child {
    border-right: none;
}

.responsive-table tr:hover {
    background-color: #fcfcfc;
}

.responsive-table thead th,
.responsive-table tbody th.row-number {
    position: sticky;
    background-color: var(--c-cell-head);
}

.responsive-table thead th {
    top: 0;
    z-index: 2;
    border-top: none;
}

.responsive-table tbody th.row-number {
    left: -1;
    z-index: 1;
}

.responsive-table thead th.corner-cell,
.responsive-table tbody th.row-number {
    width: 1%;
    padding: 6px;
    min-width: 28px;
}

.responsive-table thead th.corner-cell {
    left: 0;
    z-index: 3;
    background-color: #ffffff;
}

.responsive-table tbody td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-nav {
    position: sticky;
    bottom: 0;
    z-index: 3;
    flex-wrap: nowrap;
    box-sizing: border-box;
    width: 100%;
    background-color: #ffffff;
    justify-content: space-between;
    gap: 8px;
    box-shadow: inset 0px 0px 0px 1px var(--c-line);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 1px;
}

.rows-info {
    padding: 6px;
    font-size: 12px;
    line-height: 18px;
    font-weight: 400;
    color: var(--c-muted);
    white-space: nowrap;
}

.page-list,
.page-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.page-btn,
.page-gap {
    padding: 6px;
    font-size: 12px;
    line-height: 16px;
    min-width: 28px;
}

.page-btn {
    flex-shrink: 0;
    border: none;
    font-weight: 400;
    color: var(--c-text);
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease-out;
}

.page-btn img {
    display: block;
}

.page-btn:not(:disabled):hover {
    background-color: #F5F6FB;
}

.page-btn:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

.page-btn:disabled img {
    opacity: 0.35;
}

.page-btn.active {
    background-color: #E7ECFA;
}

.page-gap {
    color: #363942;
}

.imagetotext-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    overflow: hidden;
    border-radius: 0 0 5px 5px;
    background: var(--color-EAEAEA);
}

.imagetotext-progress::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            #fff0 2.85%,
            rgb(169 149 253/0.909375) 53.25%,
            #a28cff 100%);
    border-radius: 3px;
    animation: progress 2s linear infinite;
}

.file-preview-btn {
    min-width: 82.5px;
}

@keyframes progress {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@media (width <=1200px) {
    .after-img-upload .images-clear {
        gap: 10px;
    }
}

@media (width <=768px) {
    .tool-area {
        flex-direction: column;
    }

    .result-waiting figure figcaption span:last-child {
        display: block !important;
        color: #606060 !important;
    }

    .finshed__span {
        display: none;
    }

    .result-waiting-card .status-wrapper {
        flex: 0 1 auto;
    }

    .btn-label {
        display: none;
    }

    .btn-icon {
        display: inline-block;
        vertical-align: middle;
    }

    :is(.file-download-btn, .file-preview-btn, .file-copy-btn) {
        padding: 8px;
        line-height: 0;
        border: none;
    }

    .file-preview-btn {
        min-width: unset;
    }

    .responsive-table th,
    .responsive-table td {
        padding: 0 8px;
        font-size: 13px;
    }
}

@media (width <=600px) {
    .result-text-download-all div button {
        padding: 6px;
    }

    .result-text-download-all div button span {
        display: none;
    }

    .selected-img-preview {
        min-height: auto;
    }
}