.history-floating-icon {
    position: fixed;
    top: 72px;
    right: 16px;
    z-index: 9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px;
    border-radius: 2rem;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    background-color: #FFFFFF;
    color: #6F6F6F;
    box-shadow: 0px 4px 4px 0px #00000014;
    user-select: none;
}

.history-floating-icon:hover img,
.history-floating-icon:hover span {
    filter: brightness(0.5);
}

.history-no-more-data {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #101010;
}

/* Base shimmer animation */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: 200px 0;
    }
}

/* Container spacing */
.history-item.shimmer {
    padding: 16px;
}


/* Shimmer line */
.shimmer-line {
    height: 10px;
    width: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg,
            #eeeeee 25%,
            #f5f5f5 37%,
            #eeeeee 63%);
    background-size: 400px 100%;
    animation: shimmer 1.4s ease infinite;
    margin-bottom: 8px;
}

/* Header widths */
.history-id.shimmer-line {
    width: 90px;
}

.history-time.shimmer-line {
    width: 60px;
}

/* Short last line */
.shimmer-line.short {
    width: 70%;
}



@media screen and (min-width:769px) {
    body:has(.history-sidebar.active) .history-floating-icon::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        /* backdrop-filter: blur(7px); */
        background: linear-gradient(180deg, rgba(89, 91, 99, 0.15) 0%, rgba(89, 91, 99, 0.15) 100%);
        width: 100%;
        height: 100%;
        z-index: 9;
    }
}

.history-sidebar {
    background-color: #FFFFFF;
    padding-bottom: 20px;
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 10000000000;
    height: 100vh;
    overflow-y: auto;
    width: 100%;
    max-width: 400px;
    display: none;
}

.history-list-premium-preview {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.6) 100%);
    backdrop-filter: blur(5px);
    z-index: 10000000002;
    width: 100%;
    height: 100%;
}

.history-list-premium-preview-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px;
    gap: 8px;
    max-width: 242px;
}

.upgrade-to-premium-for-history-btn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    gap: 6px;
    min-width: 108px;
    min-height: 40px;
    background: #333333;
    border-radius: 99px;
    border: none;
    outline: none;
    font-weight: 500;
    font-size: 18px;
    line-height: 20px;
    text-align: center;
    color: #FFFFFF !important;
    cursor: pointer;
}

.history-list-premium-preview-head {
    font-weight: 500;
    font-size: 18px;
    line-height: 22px;
    color: #101010;
}

.history-list-premium-preview-desc {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    color: #333333;
}


.history-sidebar.active {
    display: block;
}

.history-sidebar-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-sidebar-header-h3 {
    color: #101010;
    font-weight: 500;
    font-size: 20px;
    line-height: 24px;
}

.history-sidebar-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.close-history-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.close-history-sidebar:hover img {
    filter: brightness(10%);
}

.history-date-filter-inline {
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-date-filter-inline {
    color: #333333;
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
}

.history-date-filter-inline label {
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: #333333;
}

.history-section-title {
    padding: 8px 24px;
    border-top: 0.5px solid #E5E5E5;
    background-color: #F9F9F9;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #8D8F94;
}

.history-item {
    padding: 12px 24px;
    border-top: 0.5px solid #E5E5E5;
    background: #FFFFFF;
    cursor: pointer;
}

.history-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: #333333;
    margin-bottom: 8px;
}

.history-time {
    color: #8D8F94;
}

.history-item-preview {
    color: #101010;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    position: relative;
    padding-right: 20px;
}

.history-arrow {
    opacity: 0;
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease-in-out;
}

.history-item-preview:hover .history-arrow {
    opacity: 1;
}

.load-more-history-btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 0;
}

.load-more-history-btn {
    background-color: #FFFFFF;
    border: 1px solid #E5E5E5;
    padding: 6px 12px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #101010;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
}

.load-more-history-btn .spinner-icon {
    width: 16px;
    height: 16px;
    border: 2.5px solid #E5E5E5;
    border-top-color: #101010;
    border-left-color: #101010;
    border-radius: 100%;
    animation: rotate 1s linear infinite;
    display: block;
}
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.history-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-loader img {
    width: 100px;
    height: 100px;
}

.history-empty-state {
    height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.history-empty-state span {
    font-weight: 500;
    font-size: 18px;
    line-height: 22px;
    color: #101010;
}

.history-empty-state p {
    font-weight: 400;
    font-size: 14px !important;
    line-height: 20px;
    color: #333333;
}

.history-modal-overlay {
    backdrop-filter: blur(7px);
    background: linear-gradient(180deg, rgba(89, 91, 99, 0.15) 0%, rgba(89, 91, 99, 0.15) 100%);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000000001;
    overflow-y: auto;
}

.history-modal-container {
    background-color: #FFFFFF;
    border-radius: 16px;
    width: 100%;
    /* height: 100%; */
    min-height: 600px;
    max-width: 1200px;
    /* position: relative; */
    /* overflow: hidden; */
}

.history-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-modal-header.desktop {
    background: #F9F9F9;
    border-bottom: 0.5px solid #E5E5E5;
    padding: 12px 16px;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.close-history-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.close-history-modal:hover img {
    filter: brightness(10%);
}

.modal-tags {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-tags>span {
    padding: 2px 6px;
    border-radius: 8px;
    background-color: #FFFFFF;
    box-shadow: 0px 1px 2px 0px #0000001A;
    display: flex;
    align-items: center;
    justify-content: start;
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: #333333;
}

.modal-tags>span>.dot {
    width: 6px;
    height: 6px;
    margin-right: 4px;
    border-radius: 100%;
}

.tag-ai .dot {
    background-color: #75A1FF;
}

.tag-len .dot {
    background-color: #56C27A;
}

.tag-mode .dot {
    background-color: #FFB575;
}

.tag-input-text .dot {
    background-color: #FF7777;
}

.history-modal-body {
    display: flex;
    align-items: start;
    width: 100%;
    height: 100%;
}

.history-col {
    flex: 1;
    border-right: 0.5px solid #E5E5E5;
    padding: 16px 0 16px 16px;
    display: flex;
    flex-direction: column;
}

.history-col label {
    color: #101010;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 8px;
}

.history-text-content {
    height: 466px;
    overflow-y: auto;
    padding-right: 16px;
    color: #101010;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
}

.history-text-content::-webkit-scrollbar,
.history-text-content::-webkit-scrollbar-track {
    background-color: transparent;
}

.history-footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 20px;
    margin-top: 8px;
    padding-right: 16px;
}

.history-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.history-actions .icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#modal-output-words,
#modal-input-words {
    font-weight: 500;
    font-size: 12px;
    line-height: 20px;
    color: #8D8F94;
}

#history-date-input[type="date"]::-webkit-inner-spin-button,
#history-date-input[type="date"]::-webkit-clear-button {
    display: none !important;
}

.mobile-back-btn {
    display: none;
    font-weight: 500;
    font-size: 20px;
    line-height: 24px;
    color: #101010;

}

.history-mobile-tabs {
    display: none;
}

.history-mobile-tabs button {
    border: 1px solid #E5E5E5;
    flex: 1;
    padding: 8px;
    background-color: #FFFFFF;
    min-height: 36px;
}

.history-mobile-tabs button[data-tab="original"] {
    border-top-left-radius: 2rem;
    border-bottom-left-radius: 2rem;
    border-right: none;
}

.history-mobile-tabs button[data-tab="summarized"] {
    border-top-right-radius: 2rem;
    border-bottom-right-radius: 2rem;
}

.history-mobile-tabs button.active {
    background: #F9F9F9;
}

#modal-output-text ul {
    list-style: circle;
}

#modal-output-text ul li {
    background: none;
    margin-bottom: 8px;
}

@media screen and (max-width:768px) {

    .history-floating-icon {
        display: none;
    }

    .history-actions .download-btn.tooltip:hover:before {
        left: 10%;
    }

    .mobile-back-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        background-color: #FFFFFF;
        padding: 16px 24px;
        width: 100%;
    }

    .mobile-back-btn-left {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .history-sidebar {
        max-width: 100%;
    }

    body:has(.history-sidebar.active) {
        overflow: hidden;
    }

    .history-modal-overlay {
        flex-direction: column;
        align-items: start;
        justify-content: start;
        padding: 0;
        background: #FFFFFF;
        backdrop-filter: none;
    }

    .history-modal-container {
        border-radius: 0;
    }

    .history-modal-header.desktop {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        justify-content: center;
        flex-wrap: wrap;
    }

    .history-modal-header.desktop .modal-tags {
        justify-content: center;
        flex-wrap: wrap;
    }

    #close-history-modal {
        display: none;
    }

    .history-mobile-tabs {
        display: flex;
        align-items: center;
        margin: auto;
        padding: 0 20px 16px 20px;
    }
}

@media screen and (max-width:345px) {

    .history-sidebar-header,
    .mobile-back-btn {
        padding: 8px 12px;
        min-height: 48px;
    }
}