/* home.css */
/* hide the app until loader is dismissed */
html {
    /* reserve space for the scrollbar so layout doesnÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â‚¬Å¾Ã‚Â¢t jump */
    scrollbar-gutter: stable;
}

/* RESET & BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* disable all scrolling on the page */
body.no-scroll {
    overflow: hidden;
    /* in case you want to absolutely prevent any shifting: */
    height: 100vh;
}

button:active {
    transform: scale(0.9);
}

button {
    transition: transform 0.1s ease;
}

/* LAYOUT */
.app-container {
    display: flex;
    min-height: 100vh;
    height: auto;
    overflow: visible;
    align-items: flex-start;
}

.page-content {
    display: none;
}

/* ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã‚Â Loader dims & centering ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã‚Â */
.page-loader {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #fff;
    z-index: 9999;
    overflow: hidden;
}

/* absolutely center the img so translate+scale works predictably */
.page-loader > img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: auto;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
}

/* hide loader after animation */
.page-loader.hidden {
    display: none !important;
}

/* nuke any preÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã‹Å“existing transitions */
.page-loader, .page-loader img {
    transition: none !important;
}

/* 1) Scale logo up & fade it out over 0.3s */
@keyframes loaderImgPulseFade {
    to {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

/* 2) Once the logo is done (0.3s), fade the white bg out over 0.2s */
@keyframes loaderBgFade {
    to {
        opacity: 0;
    }
}

/* trigger both animations when the class is added */
.page-loader.animate-logo-bigger img {
    animation: loaderImgPulseFade 0.3s ease-in-out forwards;
}

.page-loader.animate-logo-bigger {
    /* delay the bgÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã‹Å“fade until the img pulse completes */
    animation: loaderBgFade 0.2s ease-in-out forwards;
    animation-delay: 0.3s;
}

.main {
    width: 630px;
    flex: 1;
    padding: 0;
    overflow-y: visible;
    position: absolute;
    /* or fixed, relative to the nearest positioned ancestor */
    left: 50%;
    transform: translateX(-50%);
}

/* FEED WRAPPER */
.feed-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--bg-surface);
    overflow: hidden;
    border-top: none;
    min-height: calc(100vh - 60px);
    position: relative;
}

/* FEED BORDER */
.main-top-border {
    display: block;
    height: 45px;
    width: 100%;
    background: none;
    position: sticky;
    top: 60px;
    margin-top: -45px;
    border-radius: 10px;
    box-shadow: 0 0 0 15px var(--bg-page);
    z-index: 58;
    clip-path: polygon(-1% 0, 101% 0, 100% 50%, 0 50%);
    pointer-events: none;
}

.feed-border {
    border: 1px solid var(--border-default);
    display: block;
    height: calc(100vh - 60px);
    width: 100%;
    background: none;
    position: sticky;
    top: 60px;
    margin-top: calc(-1*(100vh - 60px));
    border-radius: 10px 10px 0px 0px;
    z-index: 59;
    pointer-events: none;
    border-bottom: none;
    box-shadow: 0 0px 10px 0px #e1e1e17d;
}

/* FEED CONTAINER */
.feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    align-items: center;
}

/* MAIN HEADER */
.main-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
    background: var(--bg-page);
    position: sticky;
    top: 0;
    z-index: 56;
    box-shadow: 0 -3px 0 3px var(--bg-page);
}

/* MAIN HEADER BUTTONS */
.main-header-button {
    padding: 5px;
    font-size: 15px;
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transform: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* MAIN HEADER ITEMS */
.main-header-item {
    display: flex;
    width: max-content;
    height: 100%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 0 var(--text-primary);
    padding: 0 25px;
    margin: 0 5px;
}

.main-header-item > button {
    color: var(--text-muted);
}

.main-header-item.active {
    box-shadow: 0 3px 0 -1.5px var(--text-primary);
}

.main-header-item.active > button {
    color: var(--text-primary);
}

/* FULL-COVER OVERLAY: CENTERED SPINNER */
.initial-loading {
    position: absolute;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0 */
    justify-content: center;
    background: var(--bg-surface);
    z-index: 56;
    width: 100%;
    height: max-content;
}

.initial-loading-videos {
    position: absolute;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0 */
    justify-content: center;
    background: var(--bg-surface);
    z-index: 1000;
    width: 100%;
    height: max-content;
}


.initial-loading.hidden {
    display: none;
}

#add-post-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 9998;
}

/* modal container */
#add-post-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 500px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    display: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
}

/* when visible */
#add-post-modal.show {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

span.intro-text__line.intro-text__line--primary {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 17px;
}

.intro-text {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    width: max-content;
    height: max-content;
    padding: 15px 25px;
    box-shadow: 0 0 11px 0px #a4a4a442;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    gap: 4px;
    margin-top: 20px;
}

.initial-loading.home {
    height: max-content;
    top: 74px;
}

.hidden {
    display: none !important;
}

.backdrop {
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 66%);
    z-index: 1000;
    opacity: 0;
    transition: opacity 200ms ease;
    display: none;
}

.backdrop.open {
    opacity: 1;
    display: block;
}

.skeleton-loader {
  position: relative;
  height: 183px;
}

.skeleton-loader:after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0), var(--skeleton-highlight-color) 50%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(circle 20px at 20px 20px, var(--skeleton-base-color) 100%, transparent 0),
    linear-gradient(var(--skeleton-base-color) 15px, transparent 0),
    linear-gradient(var(--skeleton-base-color) 15px, transparent 0),
    linear-gradient(var(--skeleton-base-color) 100px, transparent 0),
    linear-gradient(var(--skeleton-base-color) 15.9954px, transparent 0),
    linear-gradient(var(--skeleton-base-color) 16px, transparent 0),
    linear-gradient(var(--skeleton-base-color) 16px, transparent 0),
    linear-gradient(var(--skeleton-bg-color) 100%, transparent 0);
  background-size: 264px 100%, 40px 40px, 190px 15px, 160px 15px, 526.47px 100px, 0px 15.9954px, 0px 16px, 0px 16px, 100% 100%;
  background-position: 0 0, 25px 16px, 77px 16px, 77px 40px, 77px 67px, 32px 255.9953861px, 16px 192px, 16px 224px, 0 0;
  animation: skeleton-animation 1s cubic-bezier(0, 0.02, 0.64, 0.21) infinite;
}

@keyframes skeleton-animation {
  from {
    background-position: -264px 0, 25px 16px, 77px 16px, 77px 40px, 77px 67px, 32px 255.9953861px, 16px 192px, 16px 224px, 0 0;
  }
  to {
    background-position: 100% 0, 25px 16px, 77px 16px, 77px 40px, 77px 67px, 32px 255.9953861px, 16px 192px, 16px 224px, 0 0;
  }
}

/* Shimmer placeholder for images while loading */
.unloaded {
  display: block;                  /* avoid inline-gap quirks */
  background-color: #c0c0c0;
  background-image: linear-gradient(90deg, transparent, var(--skeleton-highlight-color) 50%, transparent);
  background-repeat: no-repeat;
  background-size: 314.33px 100%;  /* match your sweep width */
  background-position: -314.33px 0;
  animation: skeleton-img 1s cubic-bezier(0, 0.02, 0.64, 0.21) infinite;
  border-radius: inherit;          /* picks up parent rounding if any */
}

@keyframes skeleton-img {
  from { background-position: -314.33px 0; }
  to   {background-position: 500px 0;}
}

/* Optional: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  img.unloaded { animation: none; }
}

