/* Responsive Styles */

/* Tablet and smaller desktops */
@media (max-width: 1400px) {
  .shapes-grid {
    grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  }
}

@media (max-width: 1100px) {
  .shapes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet specific styles */
@media (max-width: 1024px) {
  .add-button {
    left: calc(288px + 15px + 16px) !important;
    right: auto !important;
  }

  .add-button.slide-left {
    left: calc(288px + 15px + 16px) !important;
    right: auto !important;
  }

  .add-button.slide-right {
    left: calc(89px + 15px + 16px) !important;
    right: auto !important;
  }
}

/* Mobile and tablet */
@media (max-width: 900px) {
  /* Always show 3-dot menu on mobile (no hover on touch) */
  .dots-menu {
    display: flex !important;
  }

  .profile-section {
    flex-direction: column-reverse;
    height: auto;
    overflow: visible;
  }

  .profile-sidebar {
    width: 100%;
    margin-left: 0;
    margin-bottom: 20px;
    position: relative;
    top: 0;
    right: 0;
  }

  .shapes-grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    padding-right: 0;
    height: auto;
    width: 100%;
    margin-right: 0;
  }

  .shapes-grid.expanded {
    padding-right: 0;
  }

  .add-button {
    left: 40px !important;
    right: auto !important;
  }

  .add-button.slide-left,
  .add-button.slide-right {
    left: 40px !important;
    right: auto !important;
  }

  .profile-sidebar.collapsed ~ .add-button {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .user-list-popup {
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    max-width: 100vw;
    max-height: 100vh;
  }

  .user-list-popup-header,
  .user-list-users {
    padding-left: 10vw;
    padding-right: 10vw;
  }
}

@media (max-width: 768px) {
  .profile-section {
    grid-template-columns: 1fr;
  }

  .header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .logo {
    width: 224px;
    margin: 0 auto;
  }

  .shapes-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Mobile specific - under 600px */
@media (max-width: 600px) {
  /* Full width sidebar - no collapse */
  .profile-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }

  /* Force sidebar to stay expanded (never collapse) */
  .profile-sidebar.collapsed {
    width: 100% !important;
    padding: 16px !important;
    min-height: auto !important;
  }

  .profile-sidebar.collapsed .profile-content {
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    display: block !important;
    pointer-events: auto !important;
  }

  .profile-sidebar.collapsed .profile-compact {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  .profile-sidebar.collapsed .profile-avatar-container {
    width: 92px !important;
    height: 92px !important;
    padding: 2.6px !important;
    margin: 12px auto 12px !important;
  }

  .profile-sidebar.collapsed .profile-avatar {
    width: 100% !important;
    height: 100% !important;
  }

  .profile-sidebar.collapsed .avatar-stroke {
    display: block !important;
  }

  /* Hide toggle arrow on mobile */
  .toggle-arrow {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    top: -9999px !important;
  }

  .profile-sidebar .toggle-arrow,
  .profile-sidebar.collapsed .toggle-arrow {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    top: -9999px !important;
  }

  /* Move create button to bottom right corner */
  .add-glubler-circle-btn {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    top: auto !important;
    left: auto !important;
    z-index: 1000 !important;
  }

  /* Override collapsed state positioning */
  .profile-sidebar.collapsed ~ .add-glubler-circle-btn {
    right: 20px !important;
    bottom: 20px !important;
    top: auto !important;
    left: auto !important;
  }

  /* 2-column layout for glublers, centered */
  .shapes-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    justify-content: center !important;
    justify-items: center !important;
    display: grid !important;
    width: 100% !important;
  }

  .profile-section {
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
  }

  .module-box {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Adjust dots menu for small screens */
  .dots-menu {
    display: flex !important;
    font-size: 18px !important;
    right: 8px !important;
    top: 5px !important;
    padding: 2px !important;
  }
}

/* Hide scrollbars */
.container::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

.container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
