@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Open Sans", sans-serif;
}
.main-page {
    height: 100vh;
}
.chatlist-header {
    display: flex;
    justify-content: space-between;
    padding: 0 1em;
    height: 3.5em;
    align-items: center;
    transition: all 0.3s ease;
    background: #fff;
}

.search-bar {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 1em;
    gap: 0.5em;
    animation: fadeIn 0.3s ease forwards;
}

.search-bar input {
    flex: 1;
    padding: 0.5em 1em;
    border-radius: 9999px;
    border: 1px solid #ccc;
    outline: none;
    transition: all 0.3s ease;
    font-size: 1em;
    background: #f8f8f8;
}

.search-bar button {
    background: transparent;
    border: none;
    font-size: 1.2em;
    color: #333;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#triggerSearch {
    border: none;
    background: transparent;
    font-size: 1.1em;
    cursor: pointer;
}
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 3em;
    display: flex;
    padding: 0 1em;
    align-items: center;
    width: 100%;
    justify-content: space-evenly;
    background: #fff;
}
.new-chat {
    background: #000;
    height: 2.5em;
    border: none;
    padding: 0 2em;
    color: #fff;
    border-radius: 9999px;
    gap: .6em;
    display: flex;
    justify-content: center;
    align-items: center;
}


.quick-actions {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  width: 90%;
  position: fixed;
  bottom: 4em;
  left: 5%;
  z-index: 10;
}

.quick-actions.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}


.action-item {
  all: unset; /* Removes default button styling */
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
  width: 100%;
  border-bottom: 1px solid #f0f0f0;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
}
.quick-actions.active .action-item {
  opacity: 1;
  transform: translateY(0);
}
.action-item:last-child {
  border: none;
}


.action-item:hover {
  background: #f7f7f7;
}

.action-item .icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  flex-shrink: 0;
}

.action-item .title {
  font-weight: 600;
  color: #111;
  font-size: 14px;
}

.action-item .subtitle {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}


/* story */
.stories {
    overflow: scroll;
    padding: 0 1em;
}
.stories-carousel {
    display: block;
    gap: 1em;
    padding: 1em 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory; /* Enables horizontal snapping */
    white-space: nowrap; /* Prevents line breaks */
}
.story-item {
    position: relative; /* Makes the container the reference for positioning the "+" */
    width: 65px; /* Set the width */
    height: 65px; /* Set the height */
    display: inline-block; /* Makes the items inline-block for horizontal alignment */
    margin-right: 1em; /* Space between items */
  }
  
  .story-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }
  
  #addStory::before {
    content: "+"; /* The text we want to display */
    position: absolute;
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Fine-tune the centering */
    font-size: 40px; /* Adjust the size of the "+" */
    color: white; /* Color of the "+" */
    font-weight: bold; /* Make the "+" bold */
    z-index: 10; /* Ensure it stays on top of the image */
  }
  
  .story-name {
    text-align: center;
    margin-top: 8px;
    font-size: 0.85em;
    color: #555;
    font-weight: 500;
    line-height: 1.2;
    max-width: 90%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
  
  /* Skeleton loader styles */
.skeleton .story-img,
.skeleton .story-name {
  background: linear-gradient(100deg, #ccc 30%, #ddd 50%, #ccc 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

.skeleton .story-img {
  width: 70px;
  height: 70px;
  margin: auto;
}

.skeleton .story-name {
  width: 50%;
  height: 12px;
  margin: 8px auto 0;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
