﻿:root {
  --reddit-bg: #dae0e6;
  --reddit-card: #ffffff;
  --reddit-nav: #ffffff;
  --sidebar-width: 280px;
}

body {
  background-color: var(--reddit-bg);
  min-height: 100vh;
}

.search-bar {
  max-width: 600px;
  width: 100%;
}

.main-container {
  display: flex;
  padding-top: 90px;
  position: relative;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.left-sidebar,
.right-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

/*.left-sidebar {
    width: 250px;*/
/* height: 100vh;*/
/*position: fixed;*/
/* top: 0;*/
/*left: 0; 
}*/

.main-content {
  flex-grow: 1;
  min-width: 0;
}

.sidebar-section {
  background-color: var(--reddit-card);
  border-radius: 4px;
  margin-bottom: 16px;
  padding: 12px;
}

.topic-group {
  margin-bottom: 16px;
}

.topic-group h6 {
  color: #1c1c1c;
  font-weight: 500;
  padding: 0 8px;
}

.topic-item {
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.topic-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.ad-container {
  aspect-ratio: 1;
  background-color: #f8f9fa;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

@media (max-width: 991px) {
  .left-sidebar {
    display: none;
  }

  .right-sidebar {
    display: none;
  }

  .main-content {
    width: 100%;
  }
}

/* SECTION: sidebar styles. 3.28.2025 */
/*.sidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    position: fixed;
    overflow-y: auto;
}*/

.nav-link {
  color: #333;
  transition: background-color 0.2s ease;
}

.nav-link:hover {
  background-color: #f8f9fa;
  color: #007bff;
}

.nav-link i {
  color: #6c757d;
  width: 20px;
  text-align: center;
}

.nav-link:hover i {
  color: #007bff;
}
/* End section Sidebar*/

/* Post Styles */
.post-card {
  display: flex;
  gap: 8px;
  padding: 8px;
  cursor: pointer;
}

.post-card:hover {
  border: 1px solid #898989;
}

.vote-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
  padding-top: 8px;
}

.vote-btn {
  border: none;
  background: none;
  color: #898989;
  padding: 4px;
  cursor: pointer;
}

.vote-btn:hover {
  color: #ff4500;
  background-color: #f8f9fa;
  border-radius: 2px;
}

.vote-btn.downvote:hover {
  color: #7193ff;
}

/* When active*/
.vote-btn.active.upvote {
  color: #ff4500;
}

.vote-btn.active.downvote {
  color: #7193ff;
}

.vote-count {
  font-size: 12px;
  font-weight: 600;
  margin: 4px 0;
}

.post-content {
  flex-grow: 1;
  min-width: 0;
}

.post-header {
  font-size: 12px;
  color: #787c7e;
  margin-bottom: 8px;
}

.subreddit-link {
  color: #1c1c1c;
  font-weight: 500;
  text-decoration: none;
}

.subreddit-link:hover {
  text-decoration: underline;
}

.post-metadata {
  margin-left: 4px;
}

.user-link {
  color: #787c7e;
  text-decoration: none;
}

.user-link:hover {
  text-decoration: underline;
}

.post-time {
  margin-left: 4px;
}

.post-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

.post-title a {
  color: #1c1c1c;
  text-decoration: none;
}

.post-title a:hover {
  color: #1a1a1b;
}

.post-media {
  margin: 8px 0;
  max-width: 100%;
}

.post-thumbnail {
  max-width: 100%;
  border-radius: 4px;
}

.post-text {
  font-size: 14px;
  color: #1c1c1c;
  margin: 8px 0;
}

.post-footer {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: none;
  background: none;
  color: #878a8c;
  font-size: 12px;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
}

.post-action-btn:hover {
  background-color: #f8f9fa;
}

/* Restricting post card height and width */
.post-media img,
.carousel-item img {
  max-height: 300px; /* adjust this value as needed */
  width: 100%;
  object-fit: contain; /* maintains aspect ratio */
}

/* For the carousel specifically */
.carousel {
  max-height: 800px; /* same as image max-height */
  background-color: #f8f9fa; /* light background for partially filled space */
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .post-card {
    padding: 8px 4px;
  }

  .vote-column {
    min-width: 32px;
  }

  .post-title {
    font-size: 16px;
  }

  .post-action-btn span {
  }

  .navbar {
    padding: 0;
  }
  .container-fluid {
    padding-left: 0.3rem;
  }
  .me-2 {
    margin-right: 0.3rem !important;
  }

  /*.post-action-btn {
        padding: 6px;
        gap: 4px;
    }*/

  /* Hide only certain spans, but keep counts visible */
  /*.post-action-btn span.action-text {
        display: none;
    }*/

  /* Keep count spans visible */
  /*.post-action-btn span.count {
        display: inline;
        font-size: 11px;
    }*/
}

/*navbar {
    background-color: var(--reddit-nav);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 0.5rem 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}*/

/*.navbar-brand img {
    height: 32px;
}*/

.navbar {
  background-color: var(--reddit-nav);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

/* Mobile sidebar styles */
.offcanvas {
  width: 60% !important;
}

.navbar .btn-link {
  color: #1c1c1c;
  padding: 0.5rem;
}

/* Mobile search collapse */
#mobileSearch {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 991px) {
  .navbar-brand img {
    height: 24px;
  }

  .container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/*video rendering on timelines */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}

.post-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*SECTION User options tiles*/

/* Mobile Icons Positioning */
@media (max-width: 991px) {
  .mobile-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto; /* Push icons to the right */
  }

  .mobile-icons .search-btn {
    margin-right: 8px; /* Add some space between search and user icon */
  }
}

/* User Icon Styles */
.user-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

.user-icon.large {
  width: 64px;
  height: 64px;
}

.user-icon-btn {
  background: none;
  border: none;
  padding: 0;
}

/* User Options Tile - Mobile */
.mobile-user-options {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: white;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-user-options.show {
  transform: translateY(0);
}

/* User Options Tile - Desktop */
.desktop-user-options {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 16px;
  width: 240px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1050;
}

/* User Profile Header */
.user-profile-header {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.user-profile-details {
  margin-left: 12px;
}

.view-profile-link {
  font-weight: 600;
  color: #1c1c1c;
  text-decoration: none;
  display: block;
}

.username {
  color: #787c7e;
  font-size: 14px;
}

/* User Option List */
.user-option-list {
  padding: 8px 0;
}

.user-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
}

.user-option:hover {
  background-color: #f0f0f0;
}

.user-option i {
  margin-right: 12px;
  color: #787c7e;
  width: 20px;
  text-align: center;
}

.user-option span {
  color: #1c1c1c;
  font-size: 14px;
}

/* JavaScript will toggle these classes */
.mobile-user-options.show,
.desktop-user-options.show {
  display: block;
}

@media (max-width: 435px) {
  .d-lg-none.mobile-icons {
    gap: 0.5rem !important;
  }

  .mobile-icons .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  .mobile-icons .search-btn,
  .mobile-icons .user-options-toggle {
    padding: 0.5rem 0.25rem;
    margin-right: 0;
  }

  .mobile-icons .fa-search,
  .mobile-icons .fa-bell {
    font-size: 1.2em;
  }

  .user-icon {
    width: 28px;
    height: 28px;
  }
  .navbar {
    padding: 0.5rem 1rem;
  }
  .container-fluid {
    padding-left: 0.3rem;
  }
  .me-2 {
    margin-right: 0.3rem !important;
  }
  /* .btn{
      --bs-btn-padding-x: 0 !important;
    } */
}
.form-group.position-relative {
  position: relative;
}
.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6c757d;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0;
}
.toggle-password i {
  pointer-events: none;
}
.toggle-password:hover {
  color: #000;
}
input[type="password"]::-ms-reveal,
input[type="password"]::-webkit-reveal {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}

.notification-dot {
    position: absolute;
    top: 0;
    right: 0;
    height: 8px;
    width: 8px;
    border-radius: 50%;
    background-color: #ef4444; 
}