@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/space-grotesk-regular.ec926d5065eaca49.ttf") format("truetype");
}

:root {
    --interactive-accent: rgb(109, 205, 220);
    --interactive-accent-strong: rgb(58, 181, 199);
    --tweet-attachment-gap: 12px;
    --tweet-card-border: hsl(210, 25%, 24%);
    --tweet-card-image-ratio: 1.91 / 1;
}

.timelineStatus {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    padding: 12px;
    background: #253746;
    border-radius: 6px;
    z-index: 2;
    font: 14px system-ui, sans-serif;
}

button.tweetButton {
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    background: transparent;
}

.myTweetOverlay {
    z-index: 0;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    display: flex;
    position: fixed;
    flex-direction: column;
    color: rgb(247, 249, 249);
    background-color: rgb(20, 31, 41);
    transition: opacity 0.3s ease-out 0s;
}

body {
    margin: 0;
    color: rgb(247, 249, 249);
    background-color: rgb(20, 31, 41);
}

.header {
    width: 100%;
    min-height: 58px;
    padding: 8px 16px;
    display: flex;
    flex: 0 0 100%;
    align-items: center;
    box-sizing: border-box;
    justify-content: space-between;
    border-bottom: 1px solid var(--tweet-card-border);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.headerTitle {
    margin: 0 0 0 -10px;
    min-width: 0;
    max-width: calc(100vw - 72px);
    display: flex;
    align-items: center;
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.headerTitleBrand {
    gap: 2px;
    display: flex;
    min-width: 0;
    align-items: center;
}

.headerTitleMark {
    width: 50px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: contain;
}

.headerTitleText {
    min-width: 0;
    overflow: hidden;
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.headerTitleSocial {
    color: rgb(247, 249, 249);
}

.headerTitleTicker {
    color: rgb(181, 190, 203);
}

.liveStatus {
    gap: 7px;
    margin: 0;
    display: inline-flex;
    flex: 0 0 auto;
    color: rgb(109, 205, 220);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.12em;
    align-items: center;
    text-transform: uppercase;
}

.liveStatusDot {
    width: 7px;
    height: 7px;
    display: block;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0 rgba(109, 205, 220, 0.5);
}

.liveStatus[data-state="live"] .liveStatusDot {
    animation: liveStatusPulse 2s ease-out infinite;
}

.liveStatus[data-state="updating"] {
    color: rgb(169, 198, 204);
}

.liveStatus[data-state="updating"] .liveStatusDot {
    animation: liveStatusPulse 1s ease-out infinite;
}

.liveStatus[data-state="offline"] {
    color: rgb(244, 123, 116);
}

.liveStatus[data-state="paused"] {
    color: rgb(151, 167, 178);
}

.liveStatus.socialTickerTooltipBottom::before {
    left: auto;
    right: 12px;
}

.liveStatus.socialTickerTooltipBottom::after {
    left: auto;
    right: 0;
    width: max-content;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
    overflow-wrap: anywhere;
    white-space: normal;
    text-align: right;
}

@keyframes liveStatusPulse {
    70%, 100% {
        box-shadow: 0 0 0 6px rgba(109, 205, 220, 0);
    }
}

.myTweetOverlay:focus {
    outline: none;
}

.hiddenLoadingScreen, .hiddenButton {
    opacity: 0;
    pointer-events: none;
}

.hiddenTweetContainer {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loadingScreen {
    width: 100%;
    z-index: 1;
    height: 100%;
    display: flex;
    position: fixed;
    align-items: center;
    flex-direction: column;
    font-weight: 100;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    justify-content: center;
    color: rgb(247, 249, 249);
    transition: opacity 0.3s ease-out 0s;
    background-color: hsl(210, 34%, 12%);
}

.loadingAppName {
    gap: 2px;
    margin-left: -10px;
    display: flex;
    align-items: center;
}

.loadingMark {
    width: 100px;
    height: 96px;
    flex: 0 0 auto;
    object-fit: contain;
}

.loadingAppNameText {
    font-size: 80px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;
    white-space: nowrap;
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (max-width: 500px) {
    .loadingAppName {
        max-width: calc(100vw - 32px);
    }

    .loadingMark {
        width: clamp(44px, 16vw, 80px);
        height: clamp(42px, 15vw, 76px);
    }

    .loadingAppNameText {
        font-size: clamp(32px, 11vw, 56px);
    }

    .customTweet {
        margin-right: 10px;
    }
}

@media (max-width: 600px) {
    html {
        overflow-y: auto !important;
    }

    .myTweetOverlay {
        height: auto;
        min-height: 100vh;
        position: relative;
    }

}

.loadingText {
    opacity: 0.65;
    font-size: 13px;
    margin-top: 18px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.myTweetContainer {
    width: 100%;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex: 1 1 auto;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    flex-direction: row;
    align-content: start;
    transition: opacity 0.3s ease-out 0s;
}

.scrollToTopButton {
    left: 50%;
    z-index: 5;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(109, 205, 220, 0.38);
    padding: 0;
    bottom: 16px;
    color: var(--interactive-accent);
    display: flex;
    position: fixed;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background-color: rgba(20, 64, 76, 0.9);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.28);
    transform: translateX(-50%);
    transition: background-color 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out, opacity 0.2s ease-out, transform 0.2s ease-out;
}

.scrollToTopButton:hover {
    cursor: pointer;
    color: rgb(20, 31, 41);
    border-color: var(--interactive-accent);
    background-color: var(--interactive-accent);
    transform: translateX(-50%) translateY(-2px);
}

.scrollToTopButton:focus-visible {
    outline: 2px solid rgb(247, 249, 249);
    outline-offset: 3px;
}

.scrollToTopButton:active {
    transform: translateX(-50%);
}

.scrollToTopButton > svg {
    width: 18px;
}

@media (max-width: 600px) {
    .myTweetContainer {
        min-height: 100vh;
        overflow: visible;
        flex: 0 0 auto;
    }

    .scrollToTopButton {
        touch-action: pan-y;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scrollToTopButton,
    .scrollToTopButton:hover,
    .scrollToTopButton:active {
        transform: translateX(-50%);
        transition: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .liveStatusDot,
    .liveStatus[data-state="live"] .liveStatusDot,
    .liveStatus[data-state="updating"] .liveStatusDot {
        animation: none;
    }
}

.socialTickerTooltip {
    position: relative;
}

.socialTickerTooltip::before,
.socialTickerTooltip::after {
    opacity: 0;
    z-index: 10;
    position: absolute;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease-out, transform 0.12s ease-out, visibility 0s linear 0.12s;
}

.socialTickerTooltip::before {
    content: "";
    border: 5px solid transparent;
}

.socialTickerTooltip::after {
    color: rgb(247, 249, 249);
    content: attr(data-tooltip);
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    background-color: hsl(210, 34%, 14%);
}

.socialTickerTooltipRight::before,
.socialTickerTooltipRight::after {
    top: 50%;
    transform: translate(5px, -50%);
}

.socialTickerTooltipRight::before {
    left: calc(100% + 5px);
    border-right-color: hsl(210, 34%, 14%);
}

.socialTickerTooltipRight::after {
    left: calc(100% + 15px);
}

.socialTickerTooltipBottom::before {
    top: calc(100% - 4px);
    left: 12px;
    border-bottom-color: hsl(210, 34%, 14%);
    transform: translateY(-5px);
}

.socialTickerTooltipBottom::after {
    top: calc(100% + 6px);
    left: 0px;
    transform: translateY(-5px);
}

.socialTickerTooltipTop::before {
    bottom: calc(100% - 4px);
    right: 10px;
    border-top-color: hsl(210, 34%, 14%);
    transform: translateY(5px);
}

.socialTickerTooltipTop::after {
    bottom: calc(100% + 6px);
    right: 0px;
    transform: translateY(5px);
}

.socialTickerTooltip:hover::before,
.socialTickerTooltip:hover::after,
.socialTickerTooltip:focus-visible::before,
.socialTickerTooltip:focus-visible::after,
.socialTickerTooltip:focus-within::before,
.socialTickerTooltip:focus-within::after {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.42s;
}

.socialTickerTooltipRight:hover::before,
.socialTickerTooltipRight:hover::after,
.socialTickerTooltipRight:focus-visible::before,
.socialTickerTooltipRight:focus-visible::after,
.socialTickerTooltipRight:focus-within::before,
.socialTickerTooltipRight:focus-within::after {
    transform: translate(0px, -50%);
}

.socialTickerTooltipBottom:hover::before,
.socialTickerTooltipBottom:hover::after,
.socialTickerTooltipBottom:focus-visible::before,
.socialTickerTooltipBottom:focus-visible::after,
.socialTickerTooltipBottom:focus-within::before,
.socialTickerTooltipBottom:focus-within::after,
.socialTickerTooltipTop:hover::before,
.socialTickerTooltipTop:hover::after,
.socialTickerTooltipTop:focus-visible::before,
.socialTickerTooltipTop:focus-visible::after,
.socialTickerTooltipTop:focus-within::before,
.socialTickerTooltipTop:focus-within::after {
    transform: translateY(0px);
}

.customTweet {
    width: 300px;
    height: fit-content;

    margin-top: 10px;
    margin-left: 10px;

    padding: 15px;

    display: flex;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    box-shadow: inset 0px 0px 0px 1px var(--tweet-card-border);
    flex-direction: column;
    background: linear-gradient(135deg, rgba(27,41,54,1) 35%, rgba(47,67,87,1) 100%);
    transition: background-color 0.3s ease-out 0s, box-shadow 0.3s ease-out 0s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.overflowOverlay {
    right: 0px;
    bottom: 0px;
    width: 100%;
    height: 60px;
    position: absolute;
    visibility: hidden;
    background: linear-gradient(to bottom, transparent 0%, rgba(24, 36, 48, 0.5) 50%, rgb(24, 36, 48) 70%);
}

.buttonContainer {
    right: 0px;
    opacity: 0;
    z-index: 3;
    width: 100%;
    bottom: 0px;
    flex-grow: 1;
    padding: 7px;
    display: flex;
    align-items: end;
    position: absolute;
    box-sizing: border-box;
    transition: opacity 0.3s ease-out 0s;
    background-color: hsla(210, 34%, 16%, 0.7);
}

.buttonContainer:hover,
.buttonContainer:focus-within {
    opacity: 1;
}

.buttonSubContainer {
    opacity: 0;
    width: 100%;
    height: 30px;
    display: flex;
    position: relative;
    justify-content: end;
    transition: opacity 0.3s ease-out 0s;
}

.customTweet:hover .buttonSubContainer,
.customTweet:focus-within .buttonSubContainer {
    opacity: 1;
}

.tweetButton {
    z-index: 1;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    transition: color 0.3s ease-out 0s;
}

.tweetButton .tweetButtonLink {
    display: flex;
    justify-content: center;
}

.tweetButton svg {
    width: 50%;
}

.tweetButton:hover {
    cursor: pointer;
    border-radius: 100%;
    color: rgb(247, 249, 249, 1);
    background-color: hsl(210, 34%, 20%);
}

.tweetButton:active {
    background-color: hsl(210, 34%, 18%);
}

.checkIcon {
    z-index: 2;
    right: 30px;
    position: absolute;
    border-radius: 100%;
    color: rgb(247, 249, 249, 1);
    transition: opacity 0.3s ease-out 0s;
    background-color: hsl(210, 34%, 18%);
}

.hideIcon {
    opacity: 0;
    pointer-events: none;
}

.customTweetContainer {
    display: flex;
    overflow: visible;
    flex-direction: column;
}

.customTweet.hasQuotedTweet > .customTweetContainer {
    max-height: min(600px, calc(100vh - 80px));
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
}

.customTweet.hasQuotedTweet > .customTweetContainer::-webkit-scrollbar {
    display: none;
}

.focusedTweet {
    box-shadow: inset 0px 0px 0px 1px rgb(0, 120, 147);
}

.customTweet:hover {
    background-color: hsl(210, 34%, 16%);
}

.retweet {
    margin: 0px;
    width: unset;
    padding: 12px;
    margin-top: var(--tweet-attachment-gap);
    border-radius: 10px;
}

.retweet .contentContainer {
    width: 100%;
}

.retweet .profileContainer,
.retweet .profileImage,
.retweet .profileImageLink {
    width: 28px;
    height: 28px;
}

.retweet .tweetTextContainer {
    font-size: 14px;
    line-height: 20px;
}

.retweetIcon {
    width: 14px;
}

.retweetMessage {
    display: flex;
    font-size: 12px;
    margin-left: 5px;
    margin-bottom: 5px;
    flex-direction: row;
}

.retweetMessageText {
    margin-left: 5px;
    line-height: 14px;
}

.newTweet {
    background-color: hsl(210, 34%, 15%);
}

.profileContainer {
    width: 32px;
    height: 32px;
    display: flex;
    margin-right: 8px;
    flex-shrink: 0;
}

.profileImage {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease-out 0s;
}

.profileImage:hover {
    transform: scale(1.05);
}

.profileImageLink {
    width: 32px;
    height: 32px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.contentContainer {
    width: 100%;
    display: flex;
    overflow: visible;
    flex-direction: column;
}

.profileHeader {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.profileHeaderInfo {
    min-width: 0;
    flex: 1;
}

.profileNameContainer {
    display: flex;
    min-width: 0;
    gap: 5px;
    align-items: baseline;
    flex-direction: row;
}

.profileNameLink {
    all: unset;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.profileHandleLink {
    all: unset;
    display: flex;
    min-width: 10%;
    align-items: center;
}

.profileNameContainer .profileHandleLink {
    flex: 1 1 0;
    min-width: 36px;
}

.profileHandleLink.socialTickerTooltip {
    position: relative;
}

.profileNameLink:hover, .profileHandleLink:hover, .tweetTimestampLink:hover {
    text-decoration: underline;
    cursor: pointer;
}

.profileName {
    font-weight: bold;
    line-height: 21px;
    font-size: 16px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.profileHandle {
    min-width: 0;
    font-size: 12px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
}

.tweetTimestamp {
    font-size: 12px;
}

.tweetTextContainer {
    margin-top: 0px;
}

.emojiImage {
    height: 16px;
    padding-left: 1px;
    padding-right: 1px;
    vertical-align: -19%;
}

.tweetPhotoContainer {
    margin-top: var(--tweet-attachment-gap);
    display: flex;
    border-radius: 10px;
    border-image: initial;
    flex-wrap: wrap;
    flex: 1;
    overflow: hidden;
}

.tweetPhotoSubContainer {
    width: 100%;
    max-height: 100%;
}

.tweetPhoto {
    float: left;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-out 0s;
}

.tweetPhoto:hover, .cardPhoto:hover, .tweetVideo:hover {
    cursor: pointer;
}

.mediaLoading {
    opacity: 0;
}

.halfWidth {
    width: 50%;
}

.halfHeight {
    height: 50%;
}

.tweetVideo {
    margin-top: var(--tweet-attachment-gap);
    max-width: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: opacity 0.3s ease-out 0s;
}

.tweetCard {
    border-radius: 10px;
    overflow: hidden;
    margin-top: var(--tweet-attachment-gap);
    border: 1px solid var(--tweet-card-border);
}

.tweetCard * {
    border-radius: inherit;
}

.cardPhoto {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: opacity 0.3s ease-out 0s;
}

.cardInfoContainer {
    z-index: 1;
    top: 0px;
    padding: 15px;
    padding-top: 15px;
    position: relative;
    border-radius: 0px 0px 10px 10px;
    background-color: hsl(210, 34%, 14%);
    transition: background-color 0.3s ease-out 0s;
}

.cardInfoContainer:hover {
    background-color: hsl(210, 34%, 16%);
}

.cardPhotoContainer {
    z-index: 2;
    width: 100%;
    aspect-ratio: var(--tweet-card-image-ratio);
    overflow: hidden;
    position: relative;
    border-radius: 10px 10px 0px 0px;
}

.tweetCard > a {
    all: unset;
    border-radius: inherit;
}

.tweetCard > a:hover {
    cursor: pointer;
}

.linkDomain {
    font-size: 12px;
}

.linkTitle {
    font-weight: 500;
    padding-bottom: 3px;
}

.linkDescription {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 16px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tweetLink, .hashTagLink, .userMentionLink {
    all: unset;
    color: rgb(29, 155, 240);
}

.tweetLink {
    overflow-wrap: anywhere;
}

.retweetMessageLink, .tweetButtonLink {
    all: unset;
}

.tweetLink:hover, .hashTagLink:hover, .userMentionLink:hover, .retweetMessageLink:hover {
    text-decoration: underline;
    cursor: pointer;
}

.mediaOverlay {
    left: 0px;
    z-index: 3;
    height: 100%;
    position: fixed;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.mediaContainer {
    width: 100%;
    height: 100%;
    display: flex;
}

.leftArrow, .rightArrow {
    height: 100%;
    display: flex;
    flex: 1 1 0px;
    align-items: center;
    justify-content: start;
}

.leftArrowImage, .rightArrowImage {
    width: 24px;
    height: 24px;
    color: gray;
    border-radius: 100%;
    transition: background-color 0.3s, color 0.3s;
}

.enabledArrow > svg {
    color: rgb(247, 249, 249);
}

.enabledArrow > svg:hover {
    cursor: pointer;
    background-color: rgba(0, 120, 147, 255);
}

.leftArrow {
    padding-left: 10px;
}

.rightArrow {
    padding-right: 10px;
    justify-content: end;
}

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

.mediaElement {
    max-height: 95%;
    max-width: 95%;
}

.gallery {
    opacity: 0;
    right: 0px;
    bottom: 0px;
    height: 150px;
    display: flex;
    position: fixed;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: rgba(0, 0, 0, 1);
    transition: opacity 0.3s ease-out 0s;
}

.gallery:hover, .showGallery {
    opacity: 1;
}

.galleryElement {
    height: 90%;
    opacity: 0.5;
    margin-right: 5px;
    transition: opacity 0.3s ease-out 0s;
}

.galleryElement:hover, .currentGalleryElement {
    opacity: 1;
    cursor: pointer;
    border: solid 1px rgba(0,120,147,255);
}

.closeElement {
    top: 10px;
    right: 10px;
    height: 24px;
    position: fixed;
}

.closeElement > svg {
    border-radius: 100%;
    color: rgb(247, 249, 249);
    transition: background-color 0.3s ease-out 0s;
}

.closeElement > svg:hover {
    cursor: pointer;
    background-color: var(--interactive-accent);
}

.myTweetContainer::-webkit-scrollbar {
    width: 7px;
    /* Width of vertical scrollbar */
    height: 7px;
    /* Height of horizontal scrollbar */
}

/* Track */
.myTweetContainer::-webkit-scrollbar-track {
    /* Track color */
    background: rgba(0, 0, 0, 0);
}

.myTweetContainer::-webkit-scrollbar-thumb {
    /* Handle color */
    border-radius: 5px;
    background: var(--interactive-accent);
}

/* Handle on hover */
.myTweetContainer::-webkit-scrollbar-thumb:hover {
    /* Handle color on hover */
    background: var(--interactive-accent-strong);
}
