/* Compatibility layer for the legacy global sidebar used by Avakin, Mod and IMVU. */

#globalOverlay,
.overlay {
  backdrop-filter: blur(2px);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

#globalSidebar,
.user-sidebar {
  top: 0;
  right: -450px;
  left: auto;
  bottom: auto;
  width: min(400px, 100vw);
  height: 100vh;
  padding: 24px;
  background: #18181b;
  color: #ffffff;
  border-left: 1px solid #333;
  border-radius: 0;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
  transition:
    right 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: "Roboto", sans-serif;
  overflow: hidden;
}

#globalSidebar.active,
.user-sidebar.active {
  right: 0;
  transform: none;
}

#globalSidebar > .sidebar-header,
.user-sidebar > .sidebar-header,
#sidebarHeaderDrag {
  position: relative;
  width: 100%;
  height: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-shrink: 0;
  cursor: grab;
}

#globalSidebar > .sidebar-header h3,
.user-sidebar > .sidebar-header h3,
#sidebarTitle {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
  text-transform: uppercase;
}

#sidebarHeaderDrag::after {
  content: none;
}

#sidebarContent,
.sidebar-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 10px;
}

#sidebarContent::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar {
  width: 6px;
}
#sidebarContent::-webkit-scrollbar-track,
.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}
#sidebarContent::-webkit-scrollbar-thumb,
.sidebar-content::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: 10px;
}
#sidebarContent::-webkit-scrollbar-thumb:hover,
.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: #52525b;
}

.close-btn {
  background: none;
  border: none;
  color: #b0b0b0;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #ffffff;
}

.sidebar-label {
  display: block;
  font-size: 14px;
  color: #e0e0e0;
  margin-bottom: 8px;
  font-weight: 500;
}

.sidebar-input {
  box-sizing: border-box;
  width: 100%;
  height: 45px;
  padding: 0 12px;
  line-height: 43px;
  background-color: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  font-size: 15px;
  margin-bottom: 1px;
  outline: none;
  color: #ffffff;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.sidebar-input::placeholder {
  color: #71717a;
}

.sidebar-input:focus {
  border-color: #0099ff;
  background-color: #27272a;
}

.sidebar-input#SenhaAvakinUser {
  padding-right: 40px;
}

.sidebar-action-btn {
  width: 100%;
  padding: 12px;
  margin-top: 18px;
  background-color: #0084ff;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    opacity 0.2s ease;
}

.sidebar-action-btn:hover {
  background-color: #006bcf;
}

.sidebar-link {
  display: block;
  text-align: right;
  margin-top: 15px;
  font-size: 13px;
  color: #0084ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sidebar-link:hover {
  color: #339dff;
  text-decoration: underline;
}

#containerResultado {
  display: flex;
  flex-flow: row wrap;
  gap: 15px;
  padding: 10px 0 0;
}

.card-wrapper {
  cursor: pointer;
}

.user-info-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-left: 5px;
  margin-top: 12px;
}

.avatar-wrapper {
  position: relative;
  width: 70px;
  height: 70px;
}

.avatar-img {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #3f3f46;
}

.level-badge {
  position: absolute;
  top: 2px;
  right: -2px;
  width: 32px;
  height: 32px;
  background-image: url("https://avknstore.com/assets/avakin-badge-D2LfIE6o.webp");
  background-size: contain;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  font-family: "Roboto", sans-serif;
  padding-top: 2px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

.user-name {
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  max-width: 80px;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin: 0;
}

.avatar-texto-pequeno {
  color: #888;
  margin: 0;
  margin-top: -4px;
  font-size: 1.2rem;
  letter-spacing: 1px;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#messageFriendError,
#messageUserError,
#messageError {
  color: #d32f2f;
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
  margin-bottom: 4px;
}

button.is-loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.5);
}

@media (max-width: 550px) {
  #globalSidebar,
  .user-sidebar {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75vh;
    max-height: 95vh;
    padding: 22px 20px 20px;
    border-left: none;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  }

  #globalSidebar.active,
  .user-sidebar.active {
    transform: translateY(0);
  }

  #sidebarHeaderDrag {
    padding-top: 18px;
  }

  #sidebarHeaderDrag::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 5px;
    background-color: #3f3f46;
    border-radius: 10px;
    opacity: 0.8;
    pointer-events: none;
  }
}
