/* BASCIC PAGE LAYOUT */
.app-container {
  height: 100vh;
  font-family: 'Inter', sans-serif;
}

.sidebar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 232px;
  height: 100%;
  background-color: var(--dark);
}

.main-content {
  margin-left: 232px;
  width: calc(100% - 232px);
  display: flex;
  flex-direction: column;

  header {
    position: sticky;
    top: 0;
    height: 96px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .container {
    display: flex;
    flex-direction: column;
    font-family: "Inter", sans-serif;
    padding-top: 108px;
    padding-left: 96px;
    overflow-y: auto;
    background-color: var(--lightGrey);
  }
}

#landscape-overlay {
  display: none;
}

@media (max-width: 1024px) {
  .app-container {
    display: flex;
    flex-direction: column-reverse;
    height: auto;
  }

  .contacts-main {
    padding-bottom: 64px; 
  }

  .sidebar-container {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 960;
  }

  .main-content {
    margin-left: 0;
    margin-bottom: 80px;
    width: 100%;
    display: flex;
    flex-direction: column;
  }
}

/* landscape orientation on devices up to 768px (e.g. mobile) */
@media screen and (max-width: 768px) and (orientation: landscape) {

  #landscape-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    font-family: sans-serif;
    text-align: center;
    background: linear-gradient(135deg, var(--dark), var(--darkHover), var(--sidebarNoticeGrey));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  #landscape-overlay.show {
    opacity: 1;
    pointer-events: all;
  }

  .landscape-overlay-logo {
    position: absolute;
    inset: 0;
    background: url('./assets/icons/logo/joinLogo.svg') center/contain no-repeat;
    opacity: 0.05;
    filter: blur(2px);
    pointer-events: none;
  }

  .landscape-overlay-message h2 {
    font-size: 24px;
    color: var(--white);
    background: rgba(42, 54, 71, 0.85);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1;
    max-width: 90vw;
    line-height: 1.4;
  }

  #landscape-overlay h2 {
    display: flex !important;
  }
}

/* Chrome, Safari */
.scrollable {
  overflow-y: auto;
  max-height: 100vh;
}

.scrollable::-webkit-scrollbar {
  width: 12px;
}

.scrollable::-webkit-scrollbar-track {
  background: #E7E7E7;
}

.scrollable::-webkit-scrollbar-thumb {
  background: #29ABE2;
  border-radius: 12px;
}

.scrollable::-webkit-scrollbar-thumb:hover {
  background: #42526E;
}

/* Firefox */
@-moz-document url-prefix() {
  .scrollable
  {
    scrollbar-color: #29ABE2 #E7E7E7;
    scrollbar-width: auto;
  }
}

@media (max-width: 2400px) {
  .scrollable:not(.contacts-sidebar) {
    scrollbar-width: none;
  }
  .scrollable:not(.contacts-sidebar)::-webkit-scrollbar {
    display: none;
  }

  .subtasks-style {
    scrollbar-width: auto;
  }

  .scrollable,
  .subtasks-style {
    overflow: auto;
  }
}
  