:root {
    --c-line: #EAEAEA;
    --c-text: #000000;
    --c-muted: #9DA9B5;
    --c-surface: #F5F7FB;
    --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,
.file-download-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 {
    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;
}

.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;
}

.js-single-img-preview .left-preview img {
    width: 32px;
    height: 38px;
    object-fit: contain;
}

.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;
    border: 1px solid var(--color-EAEAEA);
    border-radius: 12px;
    position: relative;
    transition: all 0.5s;
    overflow: hidden;
    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;
    min-height: 40px;
}

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

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

.status-wrapper {
    flex: 1;
}

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

.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;
}

.file-m-details {
    color: #888A92;
    font-size: 12px;
    line-height: 16px;
}

.file-download-btn {
    padding: 8px 16px;
    border-radius: 8px;
    background: #ffffff;
    color: var(--c-text);
    text-align: center;
    cursor: pointer;
    box-shadow: inset 0px 0px 0px 1px #EAEAEB;
    gap: 8px;
    transition: var(--ease);
}

.file-download-btn:hover {
    background: #F4F5F5;
}

.file-download-btn span {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}

.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;
}

@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;
    }

    .status-wrapper {
        display: none;
    }

    .action_wrapper:has(.single_text_download_btn.d-none) {
        display: none;
    }
}

@media (width <=600px) {
    .action_wrapper {
        justify-content: space-between !important;
    }

    .result-waiting .result-waiting-card .card-row {
        flex-direction: column !important;
        align-items: normal !important;
        gap: 12px !important;
    }

    .result-text-download-all div button {
        padding: 6px;
    }

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

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