/* Base styles */
:root {
  --color-text-primary: #ebecf3;
  --color-text-secondary: #b9bac0;
  --color-text-placeholder: #787878;
  --color-text-placeholder2: #c25f67;
  --color-bg-primary: #151719;
  --color-bg-secondary: #24272a;
  --color-bg-tertiary: #3a3c41;
  --color-accent: #2360f7;
  --color-accent2: #ed4856;
  --color-accent3: #10a341;
  --border-color: #3a3c41;
  --font-family: "Inter", sans-serif;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 0.875rem;
  --spacing-lg: 1.25rem;
  --spacing-xl: 1.5rem;
  --spacing-2xl: 2.25rem;
  --border-radius-sm: 15px;
  --border-radius-md: 30px;
  --border-radius-lg: 1rem;
  --border-radius-full: 999px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #b9bac0 #9bac0000;
}

/* Chrome, Edge, Safari, and Brave */
*::-webkit-scrollbar {
  width: 16px;
  display: block; /* Ensure scrollbar is displayed */
}

*::-webkit-scrollbar-track {
  background: #9bac0000;
  visibility: visible; /* Ensure track is visible */
}

*::-webkit-scrollbar-thumb {
  background-color: #b9bac0;
  border-radius: 10px;
  border: 0px solid #ffffff;
  min-height: 40px; /* Ensure thumb has minimum height */
}

/* Hide scrollbar arrows/buttons */
*::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}

/* Reset styles */
body,
a,
h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--color-text-primary);
  font-family: var(--font-family);
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  font-size: 0.8125rem;
}

hr {
  width: 100%;
  box-shadow: none;
  border-color: var(--border-color);
  cursor: auto;
}

form {
  display: inherit;
  width: 100%;
  cursor: auto;
}

body {
  overflow-y: hidden;
  background-color: var(--color-bg-primary);
}

/* Typography */
.text {
  color: var(--color-text-primary);
  font-size: 13px;
  transform: scale(1.25);
}

html {
  font-size: 110% !important;
}

.text-dark {
  color: var(--color-text-secondary);
}

.text-dark:hover,
.menu-item:hover .text-dark,
.item-selectable:hover .text-dark {
  color: var(--color-text-primary);
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.form-label-text {
  font-size: 0.8rem;
  color: var(--color-text-placeholder);
}

.form-label {
  margin-top: 0.5rem;
}

button {
  color: var(--color-text-primary);
  cursor: pointer;
  font-weight: 500;
}

h1 {
  font-size: 1.25rem;
}

h1,
h2,
h3,
h4,
h5 {
  display: inherit;
  margin-block-start: inherit;
  margin-block-end: inherit;
  margin-inline-start: inherit;
  margin-inline-end: inherit;
}

/* Form elements */
input,
textarea,
button {
  background-color: inherit;
  font-family: inherit;
  line-height: inherit;
  border: none;
  padding: 0;
  resize: none;
  width: 100%;
  color: inherit;
  font-size: inherit;
}

input[data-autocompleted] {
  background-color: transparent !important;
}

input:-webkit-autofill,
input:-webkit-autofill:focus {
  transition: background-color 0s 0s, color var(--color-text-primary);
  transition-delay: calc(infinity * 1s);
}

.round {
  border-radius: var(--border-radius-lg);
}

.announcements {
  padding: var(--spacing-lg) 0;
  height: calc(100vh - 9.5rem);
}

textarea {
  field-sizing: content;
}

input:focus-visible,
textarea:focus-visible {
  outline: none;
}

/* Background colors */
.bg-primary {
  background-color: var(--color-bg-primary);
}

.bg-secondary {
  background-color: var(--color-bg-secondary);
}

.bg-tertiary {
  background-color: var(--color-bg-tertiary);
  transition-delay: 0s;
}

.bg-blue {
  background-color: var(--color-accent) !important;
}

.bg-blue:hover {
  background-color: hsl(from var(--color-accent) h s 45%) !important;
}

.profile-logout:hover {
  background-color: hsl(355 82.1% 41%) !important;
}

.dropdown-logout:hover {
  background-color: #bd3641 !important;
}

/* Layout utilities */
.flex {
  display: flex;
}

.layout-std {
  height: calc(100vh - 5rem);
}

.flex-row {
  flex-direction: row;
  flex-wrap: nowrap;
}

.flex-col {
  flex-direction: column;
}

.gap-5 {
  gap: 10px;
}

.gap-10 {
  gap: var(--spacing-lg);
}

.pad {
  padding: 5px;
}

.border {
  border: 1px solid var(--border-color);
  box-sizing: border-box;
  box-shadow: 0 10px 20px 0 hsl(none 0% 0%/0.2);
}

.posting.btn-sm.not-followed,
.posting.btn-sm.not-followed button {
  background-color: #2360f7;
  transition-duration: 75ms;
  transition-delay: 0.05s;
}

.posting.btn-sm.not-followed:hover,
.posting.btn-sm.not-followed:hover button {
  background-color: hsl(from var(--color-accent) h s 45%) !important;
  transition-delay: 0s;
}

.posting.btn-sm.followed,
.posting.btn-sm.followed button {
  background-color: var(--color-bg-tertiary);
  transition-duration: 75ms;
  transition-delay: 0.05s;
}

.posting.btn-sm.followed:hover,
.posting.btn-sm.followed:hover button {
  background-color: var(--color-bg-seconary);
  transition-delay: 0s;
}

.border.posting,
.border.posting-wrapper {
  box-shadow: 0 5px 10px 0 hsl(none 0% 0%/0.1);
}

/* Navigation */
.navbar {
  position: sticky;
  height: 5rem;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  top: 0;
}

.wrapper {
  padding-left: var(--spacing-2xl);
  padding-right: var(--spacing-2xl);
}

.login-wrapper,
.registration-wrapper {
  width: 100%;
  max-width: 42rem;
}

/* Menu related styles */
.menu-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  z-index: 10;
  left: 0;
}

.menu-item {
  transition: all 0.3s ease;
  padding: 0.5rem var(--spacing-md);
  border-radius: var(--border-radius-md);
}

.pfp {
  box-shadow: 0 5px 10px 0 hsl(none 0% 0%/0.1);
}

.sidebar button {
  border-radius: 10px;
}

.shadow-sm {
  box-shadow: 0 5px 10px 0 hsl(none 0% 0%/0.1);
}

.shadow-md {
  box-shadow: 0 6px 12px 0 hsl(none 0% 0%/0.24);
}

.menu-item:hover,
.menu-item[active],
.dropdown-wrapper:hover .menu-item {
  background-color: var(--color-bg-tertiary);
  transition-delay: 0s;
  border-color: var(--border-color);
  box-shadow: 0 5px 10px 0 hsl(none 0% 0%/0.1);
}

.item-selectable[active] .menu-item:hover {
  background-color: transparent;
}

.ico.menu-item {
  padding: 10px;
  border-radius: var(--border-radius-sm);
  height: 20px;
  width: 20px;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.ico.offset-2 svg {
  margin-bottom: -2px;
}

.ico.offset-3 svg {
  margin-bottom: -3px;
}

.offset-2 {
  margin-bottom: -2px;
}

.offset-3 {
  margin-bottom: -3px;
}

.ico2.menu-item {
  padding: 0;
  border-radius: var(--border-radius-sm);
  margin-right: var(--spacing-sm);
}

.ico2.menu-item.right {
  margin-left: var(--spacing-xs);
  margin-right: 0;
}

/* Dropdown */
.dropdown {
  display: none;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
  width: 16.25rem;
  border: 1px solid var(--border-color);
}

.dropdown .item-selectable {
  border-radius: 10px;
}

button:disabled,
button:disabled a,
button:disabled svg {
  color: var(--color-text-placeholder) !important;
}

.dropdown.show form {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dropdown.show {
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 10;
  transition: all 0.3s ease;
}

.dropdown-wrapper,
.ico-wrapper {
  align-items: center;
  position: absolute;
  width: auto;
  height: 100%;
  z-index: 11;
}

.dropdown-wrapper {
  justify-content: flex-start;
}

.ico-wrapper {
  gap: var(--spacing-lg);
  justify-content: flex-end;
  padding-right: var(--spacing-2xl);
  right: 0;
}

/* Selectable items */
.item-selectable {
  align-items: center;
  padding: 0.438rem 1rem;
  cursor: pointer;
  transition-duration: 75ms;
  border-radius: var(--border-radius-sm);
}

.item-selectable:hover {
  background-color: var(--color-bg-tertiary);
  transition-delay: 0s;
}

.item-selectable {
  transition-delay: 0.05s;
}

form.item-selectable:hover {
  background-color: hsl(from var(--color-bg-tertiary) h s 45%) !important;
}

.ico-button:hover {
  background-color: hsl(from var(--color-bg-tertiary) h s 45%);
}

.ico-button {
  background-color: var(--color-bg-tertiary);
  transition-delay: 0s;
}

.item-selectable a {
  cursor: pointer;
}

.item-selectable[active] {
  background-color: var(--color-accent);
  cursor: default;
}

div.active.btn {
  background-color: var(--color-accent);
}

div.active.btn:hover,
div.posting:hover.btn-sm {
  background-color: hsl(from var(--color-accent) h s 45%) !important;
}

div.posting.btn:hover {
  background-color: hsl(from var(--color-bg-tertiary) h s 45%);
}

.item-selectable[active] a {
  cursor: default;
}

.btn-round {
  width: fit-content;
  border-radius: var(--border-radius-full);
}

.btn-link {
  color: hsl(from var(--color-accent) 220 100% 65%);
  margin: 0 0 0 0.5rem;
  text-decoration-line: underline;
  width: fit-content;
}

.content-bar .item-selectable {
  transition: all 0.3s ease;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius-md);
}

/* Content layout */
.content-wrapper {
  flex: 1;
  align-items: center;
  height: calc(100vh - 5rem);
}

.content-main {
  margin-top: -1.8rem;
  width: 100%;
  height: calc(100vh - 10rem);
  overflow-y: auto;
}

.community-wrapper {
  padding: var(--spacing-xl) var(--spacing-2xl);
  width: fit-content;
  gap: var(--spacing-xl);
  box-sizing: border-box;
  width: 100%;
}

.community-main {
  max-width: 50rem;
  width: 100%;
  min-width: 20rem;
}

#profile-dropdown {
  transition: none !important;
}

/* Sidebar */
.sidebar-main {
  min-width: 17.5rem;
  padding: 0 var(--spacing-xl);
  overflow-y: auto;
  height: calc(100vh - 9rem);
  max-height: 100vh;
  border-right: 1px solid var(--border-color);
  box-sizing: border-box;
}

.sidebar-right {
  min-width: 22.5rem;
  padding: 0 var(--spacing-xl);
  overflow-y: auto;
  height: calc(100vh - 4rem);
  max-height: 100vh;
  box-sizing: border-box;
}

.bottom-border {
  height: 2rem;
  width: calc(100% - 16px);
  background: linear-gradient(
    180deg,
    rgba(21, 23, 25, 1) 0%,
    rgba(21, 23, 25, 1) 40%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 2;
}

.sidebar-bottom {
  min-width: 17.5rem;
  padding: 0 var(--spacing-xl);
  overflow-y: auto;
  height: 4rem;
  border-right: 1px solid var(--border-color);
  box-sizing: border-box;
  border-top: 1px solid var(--border-color);
  align-content: center;
  justify-content: center;
}

.sidebar-category {
  margin-bottom: var(--spacing-xs);
}

.sidebar-category a {
  font-size: var(--spacing-md);
  min-height: 20px;
}

.sidebar-category svg {
  display: none;
}

.sidebar-group:hover svg,
button.sidebar-category.active svg {
  display: flex;
}

.option-dropdown {
  display: none;
}

.option-dropdown.show {
  display: flex;
}

.option-category:hover {
  background-color: hsl(from var(--color-bg-tertiary) h s 45%);
  border-radius: var(--border-radius-sm);
}

.sidebar-group:has(> button.active) {
  margin: 0px;
}

.sidebar-dropdown.hide button[active] {
  margin-bottom: var(--spacing-xl);
}

.option-category {
  justify-content: center;
}

.sidebar-group {
  margin-bottom: var(--spacing-xl);
}

.sidebar-category-settings {
  margin-left: auto;
}

.sidebar-category-settings.hide {
  display: none !important;
}

.profile-button {
  width: fit-content;
  max-width: 90%;
}

.profile-logout {
  width: fit-content;
  min-width: 10%;
  align-items: center;
  justify-content: center;
}

/* Content bars */
.content-bar {
  min-height: 5rem;
  max-height: 5rem;
  flex: 1;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
}

.bookmarks-bar {
  min-height: 2.5rem;
  max-height: 2.5rem;
  flex: 1;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  box-sizing: border-box;
  width: 100%;
}

.bar-space {
  margin-top: var(--spacing-2xl);
  align-content: center;
  margin-bottom: var(--spacing-2xl);
}

.bar-space button {
  margin-bottom: 0.25rem;
}

.bar-wrapper,
.bar-wrapper a {
  font-size: var(--spacing-md);
  gap: 5px;
}

.bar-wrapper .item-selectable {
  margin-left: -1rem;
}

.bar-wrapper.right,
.bar-wrapper.right a {
  margin-left: auto;
}

.nohover:hover {
  background-color: transparent !important;
}

/* Search */
.searchbar {
  align-items: center;
  margin-right: 5rem;
  padding: 0.5rem 0 0.5rem 0.8rem;
  border-radius: var(--border-radius-full);
  cursor: pointer;
  width: 30rem;
  height: 2.25rem;
  gap: var(--spacing-sm);
  transition: all 0.3s ease;
}

.searchbar:hover {
  background-color: var(--color-bg-tertiary);
  transition-delay: 0s;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem !important;
}

.btn:hover {
  background-color: hsl(from var(--color-accent) h s 45%);
}

.post-btn {
  width: fit-content;
  min-height: 32px;
  min-width: 32px;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-full);
  cursor: pointer;
}

/* Posts and community features */
.post-bar {
  align-items: center;
  gap: var(--spacing-lg);
  width: 100%;
  height: fit-content;
}

.post-bar input::placeholder {
  font-weight: 500;
}

input[type="file"] {
  display: none;
  max-width: fit-content;
  max-height: fit-content;
}

.custom-file-upload {
  display: inline-block;
  cursor: pointer;
  font-size: 1rem;
  color: #757575;
  border: 0;
  background-color: inherit;
  padding: 0;
  margin: 0;
}

.custom-file-upload:hover svg,
.custom-file-upload:hover {
  fill: hsl(from #757575 h s 75%);
  color: hsl(from #757575 h s 75%);
}

.custom-file-upload.uploaded {
  color: var(--color-text-primary);
}

input.custom-input {
  font-size: 0.9rem;
  color: var(--color-text-primary);
}

.custom-input {
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.posting-wrapper {
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
  flex-direction: column;
}

.posting-wrapper#posting-trigger {
  overflow: hidden;
}

.posting-wrapper.top {
  min-height: 3rem;
  height: calc(36px + var(--spacing-md) * 2);
  transition: all 0.3s ease;
}

.rotate svg {
  transform: rotate(-90deg);
}

.pointer {
  cursor: pointer;
}

.pointer :hover,
button:hover .pointer,
.pointer:hover {
  color: white !important;
}

.posting-wrapper.top.show {
  height: calc(36px + var(--spacing-md) * 2 + 50px + 9rem);
  transition: all 0.3s ease;
}

.posting-wrapper.show .posting {
  display: inherit !important;
}

.posting-wrapper.show .post-bar .post-btn svg {
  transform: rotate(45deg);
  transition: all 0.3s ease-in-out;
}

.posting-wrapper .post-bar .post-btn svg {
  transform: rotate(0deg);
  transition: all 0.3s ease-in-out;
}

.posting-wrapper.show .post-bar .post-btn:hover,
.post-btn:hover {
  background-color: hsl(from var(--color-bg-tertiary) h s 45%);
}

.flash-message {
  max-height: 3rem;
  min-height: 3rem;
}

.flash-message.alert-success {
  background-color: hsla(140 82.1% 35.1% / 0.5);
}

.flash-message.alert-danger {
  background-color: hsla(355 82.1% 50% / 0.5);
}

.item-selectable.del:hover {
  background-color: hsla(355 82.1% 50% / 0.2);
}

.community-sidebar {
  width: 50%;
  max-width: 24rem;
  padding: var(--spacing-md);
  align-items: center;
  gap: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  max-height: 64px;
}

.post-wrapper {
  margin-top: var(--spacing-xl);
  max-width: 42rem;
  padding: var(--spacing-md);
  align-items: center;
  gap: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  max-height: 64px;
}

/* Visibility helpers */
.hide .item-selectable {
  display: none;
}

.hide .item-selectable[active] {
  display: flex;
}

.link-box.a {
  display: block;
}

.pfp-overlay {
  display: flex;
  position: absolute;
  background-color: transparent;
  height: 48px;
  width: 48px;
  border-radius: 50%;
  border: solid 2px transparent;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}

.pfp-overlay svg {
  opacity: 0;
  z-index: 1231;
}

a.pfp-overlay:hover {
  background-color: hsla(0, 0%, 10%, 0.25);
  cursor: pointer;
  border: solid 2px white;
}

.pfp-overlay:hover svg {
  opacity: 1;
  transition: all 0.1s ease;
}

.close-msg {
  rotate: -45deg;
  cursor: pointer;
}

.close-msg:hover {
  transform: scale(1.1);
}

.flash-message.close {
  transform: scaleY(0);
  position: absolute;
}

.tooltip {
  position: relative;
  width: fit-content;
}

.tooltip .tooltiptext {
  visibility: hidden;
  position: absolute;
  bottom: 150%;
  left: 120%;
  transform: translateX(-50%);
  z-index: 1;
  text-wrap: nowrap;
  padding: 5px 10px;
  border-radius: var(--border-radius-sm);
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  z-index: 10;
  display: absolute;
}
