.linkover-tooltip {
    position: fixed !important;
    background-color: white !important;
    color: black !important;
    z-index: 999999999999 !important;
    outline: 1px solid lightgray;
    min-width: 300px !important;
    max-width: 300px !important;
    border-radius: 4px !important;
    pointer-events: none !important;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2) !important;
    padding: 4px !important;
    opacity: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    transition: transform var(--linkover-transition-duration, 300ms) ease, opacity var(--linkover-transition-duration, 300ms) ease !important;
    transform-origin: 50% 100% !important;
}

.linkover-tooltip.opaque{
    opacity: 1 !important;
}

.linkover-tooltip.initial-tooltip {
    transform: translate(-50%, -90%) scale(1, 0.1) !important;
}

.linkover-tooltip.revealed-tooltip {
    transform: translate(-50%, -100%) scale(1.0) !important;
}

.linkover-tooltip.initial-tooltip-bottom {
    transform-origin: 50% 90% !important;
    transform: translate(-50%, -10%) scale(1, 0.1) !important;
}

.linkover-tooltip.revealed-tooltip-bottom {
    transform-origin: 50% 90% !important;
    transform: translate(-50%, 0%) scale(1.0) !important;
}

.linkover-tooltip .tooltip-header {
    padding: 4px !important;
    margin: 0px !important;
    line-height: normal !important;
    overflow: auto !important;
    transition: all 300ms ease !important;
}

/* Title */
.linkover-tooltip .title {
    all: revert;
    font-size: 18px !important;
    margin: 0px 0px 6px !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    line-height: normal !important;
    font-family: Arial, Helvetica, sans-serif !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
}

/* URL line */
.linkover-tooltip .page-favicon {
    all: revert;
    height: 14px !important;
    width: 14px !important;
    display: inline !important;
    margin-right: 4px !important;
    float: left !important;
    border: none !important;
    outline: none !important;
}
.linkover-tooltip .page-favicon img {
    /* opacity: 0 !important; */
    width: 100% !important; height: 100% !important; object-fit: cover !important;
}

.linkover-tooltip .url {
    all: revert;
    display: block !important;
    margin: 6px 0 2px !important;
    -webkit-line-clamp: 1 !important;
    line-clamp: 1 !important;
    font-size: 13px !important;
    line-height: normal !important;
    font-family: Arial, Helvetica, sans-serif !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.linkover-tooltip .url.description-below-url {
    margin: 0 0 6px !important;
}

.linkover-tooltip .url .domain {
    color: #2889d4;
}

.linkover-tooltip .url .sub-url {
    color: black;
    opacity: 0.5 !important;
}

/* Description */
.linkover-tooltip .description {
    opacity: 0.5 !important;
    font-size: 12px !important;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    line-height: normal !important;
    font-family: Arial, Helvetica, sans-serif !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Thumbnail */
.linkover-tooltip .thumbnail {
    all: revert;
    max-width: 300px !important;
    max-height: 180px !important;
    min-height: 150px !important;
    overflow: hidden !important;
    padding: 0px !important;
    margin: 0px !important;
    margin: 2px !important;
    border: 1px solid lightgray !important;
    background: rgba(123,123,123,0.075);
    position: relative !important;
}

.linkover-tooltip .thumbnail img {
    object-fit: contain !important;
    position: absolute;
    width: 100%; 
    height: 100%; 
    opacity: 0 !important;
    transition: opacity 150ms ease !important;
}

.linkover-tooltip .stretched-thumbnail img {
    object-fit: cover !important;
}

.linkover-tooltip .top-thumbnail {
    border-radius: 4px !important;
}

.linkover-tooltip .bottom-thumbnail {
    vertical-align: bottom !important;
    border-radius: 4px !important;
}

.linkover-tooltip.thumbnail-on-side {
    display: flex !important;
    max-width: 400px !important;
    min-width: 400px !important;
    flex-direction: row !important;
}

.linkover-tooltip.thumbnail-on-side .thumbnail {
    border-radius: 4px !important;
    margin-right: 8px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    border: none;
    min-height: unset !important;
    padding: 0 !important;
    margin: 0px !important;
}
.linkover-tooltip.thumbnail-on-side .thumbnail img {
    object-fit: cover !important;
}

.limited-lines-text {
    overflow: hidden;
    white-space: unset;
    text-overflow: ellipsis;
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
}

.loading-cursor {
    cursor: progress !important;
}

/* Highlight processing link */
.linkover-link-processing {
    position: relative;
}
.linkover-link-processing:before {
    content: " ";
    z-index: 98989898989;
    display: block;
    position: absolute;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(123, 123, 123, 0.25);
    outline: 1px solid rgba(123, 123, 123, 0.5);
    border-radius: 2px;
    pointer-events: none !important;
}

/* Popup arrow */
.linkover-tooltip .tooltip-arrow {
    content: "";
    position: absolute;
    z-index: 99999999999999 !important;
    left: calc(50% - 8px) !important;
    bottom: 50% !important;
    width: 14px !important;
    height: 14px !important;
    transform: rotate(45deg);
    border-bottom: 1px solid lightgray;
    border-right: 1px solid lightgray;
    background: inherit !important;
    border-radius: 0px 0px 2px 0 !important;
}

.linkover-tooltip .tooltip-arrow.arrow-on-top {
    top: calc(100% - 6.5px) !important;
}

.linkover-tooltip .tooltip-arrow.arrow-on-bottom {
    bottom: calc(100% - 6.5px) !important;
    transform: rotate(-135deg);
}

.linkover-tooltip.detached {
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3) !important;
}


/* Different tooltip appearances (not used yet) */
/* Gradient */
.linkover-tooltip.add-gradient {
    background: linear-gradient(145deg, #ffffff, #e6e6e6) !important;
}
.linkover-tooltip.add-gradient .tooltip-arrow{
    background: #efefef !important;
    /* clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%) !important; */
}
.linkover-tooltip.add-gradient .tooltip-arrow.arrow-on-bottom{
    background: #f7f7f7 !important;
}
/* Background blur */
.linkover-tooltip.add-blur {
    background-color: rgba(256,256,256,0.65) !important;
    backdrop-filter: blur(20px) !important;
}
.linkover-tooltip.add-blur::before {
    /* background-image: url(./assets/noise_acrylic.png) !important; */
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    opacity:0.0;
    pointer-events:none;
    content: "";
    transition: none !important;
}


/* For shimmer loading animation */
.linkover-tooltip .title, .linkover-tooltip .description, .linkover-tooltip .page-favicon{
    /* min-height: fit-content; min-width: fit-content; */
    background: transparent;
    transition: all 150ms ease !important;
}
.linkover-tooltip .thumbnail:not(.loaded){
    min-width: 150px !important;
    min-height: 150px !important;
}
.linkover-tooltip.thumbnail-on-side .thumbnail:not(.loaded) {
    min-height: 120px !important;
}
.linkover-tooltip .title:not(.loaded){
    min-width: 200px !important;
    min-height: 30px !important;
}
.linkover-tooltip .description:not(.loaded){
    min-width: 200px !important;
    min-height: 60px !important;
}
.linkover-tooltip .description:not(.loaded),
.linkover-tooltip .title:not(.loaded),
.linkover-tooltip .thumbnail:not(.loaded),
.linkover-tooltip .page-favicon:not(.loaded) {
    background: linear-gradient(-45deg, #eee 40%, #fafafa 50%, #eee 60%);
    background-size: 300%;
    background-position-x: 100%;
    animation: shimmer 1s infinite linear;
    border-radius: 2px;
    opacity: 0.75;
}
.linkover-tooltip .page-favicon:not(.loaded) {
    border-radius: 50%;
    border: 1px solid lightgray !important;
}
.linkover-tooltip .not-loaded{
    min-height: 0 !important; min-width: 0 !important;
    max-height: 0 !important; max-width: 0 !important;
}

.linkover-tooltip img {
    filter: none !important;
    opacity: 0 !important;
    transition: opacity 150ms ease !important;
}
.linkover-tooltip img.opaque{
    opacity: 1 !important;
}

@keyframes shimmer {
    to {
       background-position-x: 0%
    }
 }

 /* Dark theme */
@media (prefers-color-scheme: dark) {
    .linkover-tooltip {
        background-color: #2b2a33 !important;
        color: white !important;
        outline: 1px solid gray;
    }
    
    .linkover-tooltip .tooltip-arrow {
        background-color: #2b2a33 !important;
        border-bottom: 1px solid gray;
        border-right: 1px solid gray;
    }
    
    .linkover-tooltip .top-thumbnail {
        border-bottom: 1px solid gray !important;
    }
    
    .linkover-tooltip .bottom-thumbnail {
        border-top: 1px solid gray !important;
    }
    
    .linkover-tooltip .domain {
        color: #54a2dd !important;
    }
    
    .linkover-tooltip .sub-url {
        color: white !important;
    }

    .linkover-tooltip .thumbnail {
        border: 1px solid gray !important;
    }

    .linkover-tooltip .description:not(.loaded),
    .linkover-tooltip .title:not(.loaded),
    .linkover-tooltip .thumbnail:not(.loaded),
    .linkover-tooltip .page-favicon:not(.loaded) {
        opacity: 0.5;
    }
}