/* ==========================================================================
   RESPONSIVE BREAKPOINTS 

   ALL @media rules for every stylesheet live in this file. Do not add new
   @media blocks to other CSS files - add them here instead, in the
   matching bucket below (create a new bucket only if one of these four
   standard breakpoints doesn't already cover it).

   Standard breakpoints (aligned with Bootstrap 5's grid):
     SM  575px / 576px   - small phones
     MD  767px / 768px   - phones / tablets
     LG  991px / 992px   - tablets / small desktops
     XL  1200px          - large desktops

  

   ========================================================================== */
/* --------------------------------------------------------------------------
   LG bucket (max-width: 991px) - phones and tablets
   Sources: style.css (nav), user-pages.css, Login.css
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  /* style.css: mobile navigation (Tablet + phone) */
  body {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /* Dashboard header action-button rows (e.g. contractor dashboard's Find
     New Jobs / Overdue Jobs) - cancel the desktop "push right" margin so
     the wrapper (and its full-width .user-action children) can stretch */
  .d-flex.flex-column.flex-lg-row {
    margin-left: 0 !important;
    flex-direction: column !important;
  }

  .d-flex.flex-column.flex-lg-row .user-action {
    width: 100%;
  }

  /* Hide the desktop navbar on mobile devices */
  .desktop-nav {
    display: none;
  }

  /* Mobile Top Navbar: Logo + Bell */
  .mobile-navbar-top {
      display: flex !important;
      position: relative;
      z-index: 1050 !important;
  }

  .mobile-navbar-top .container-fluid {
      display: flex;
      align-items: center;
      justify-content: space-between;
  }

  /* Logo */
  .navbar-logo-text {
      height: 40px;
      width: auto;
  }

  .mobile-navbar-logo img {
      height: 32px;
      width: auto;
      display: block;
  }

  /* Force language + notification into a row */
  .mobile-navbar-top .navbar-nav {
      display: flex !important;
      flex-direction: row !important;
      align-items: center;
      justify-content: flex-end;
      margin-left: auto;
      gap: 0.25rem;
  }

  /* Keep each item compact and vertically aligned */
  .mobile-navbar-top .navbar-nav > .nav-item {
      display: flex;
      align-items: center;
      position: relative;
  }


  /* Language dropdown */

  /* Dropdown is positioned relative to the language item */
  .mobile-navbar-top .dropdown {
      position: relative;
  }

  /* IMPORTANT:
    This prevents the dropdown from increasing
    the height of the navbar */
  .mobile-navbar-top .dropdown-menu {
      position: absolute !important;
      top: 100%;
      right: 0;
      left: auto;
      z-index: 1100;
      margin-top: 0.25rem;
  }

  /* Keep nav links/buttons aligned */
  .mobile-navbar-top .nav-link {
      display: flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
  }

  /* Mobile Bottom Nav styling */
  .mobile-nav {
    display: flex;
    position: fixed;
    justify-content: space-between;

    bottom: 0;
    left: 0;
    right: 0;

    /* Keep on top */
    z-index: 1050;

    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.35);
  }

  .mobile-nav-item {
    width: 19%;
    text-align: center;
    text-decoration: none;
    color: var(--bs-secondary);
  }

  .mobile-nav-item.active {
    color: white;
  }

  .mobile-nav-item i {
    font-size: 1.7rem;
    margin-top: 2px;
  }

  .mobile-nav-item small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.7rem;
    margin-top: 2px;
  }

  /* wrapper handles toggling settings panel & backdrop visibility */
  #mobile-settings-wrapper {
    position: fixed;
    inset: 0;

    /* keep on top (but below nav) */
    z-index: 1040;

    /* Hidden off screen */
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  /* When visible */
  #mobile-settings-wrapper.open {
    transform: translateX(0);
  }

  #mobile-settings-panel {
    position: absolute;
    top: 0;
    right: 0;

    width: 80vw;
    height: 100%;

    background-color: var(--bs-body-bg);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);

    padding: 1rem;

    /* prevent content being hidden behind mobile navbar */
    padding-bottom: 80px;

    display: flex;
    flex-direction: column;
  }

  #mobile-settings-backdrop {
    position: absolute;
    inset: 0;
  }

  #mobile-settings-panel .btn {
    text-align: left !important;
  }

  #mobile-settings-panel .settings-btn {
    width: 100%;
    font-size: 1.2rem;
    padding: 0.65rem 1rem;

    display: flex;
    align-items: center;
    gap: 0.75rem;

    text-align: left !important;

    border-radius: 12px;
    border: none;
  }

  /* Push account section to the bottom */
  .settings-spacer {
    flex-grow: 1;
  }

  .settings-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
  }

  .settings-account {
    margin-bottom: 0;
  }

  main {
    /* prevent content being hidden behind mobile navbar */
    padding-bottom: 60px;
  }

  /* user-pages.css: dashboard / help sidebar / steps */
  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-action {
    justify-content: center;
  }

  .card-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .ticket-item {
    gap: 1rem;
  }

  .help-sidebar {
    width: 100%;
    left: -100%;
  }

  .help-sidebar.open {
    left: 0;
  }

  .user-action {
    width: 100%;
    justify-content: center;
  }

  .steps-row {
    gap: 0.5rem;
  }

  .step-item::after {
    display: none;
  }

  /* Show only the arrow icon (not the checkmark) inside step circles on
     mobile/tablet, since the leading "between step" arrows are hidden here */
  .step-circle .fa-check {
    display: none;
  }

  /* Login logo is oversized relative to the shrunk tablet-width login card */
  .login-logo {
    height: 45px;
    left: -10px;
  }

  .step-content h4 {
    font-size: 0.75rem;
    margin-bottom: 0.1rem;
  }

  .step-content p {
    font-size: 0.65rem;
    margin-bottom: 0;
  }

  .stat-value {
    font-size: 1rem;
  }

  /* Login.css: two-column layout narrows on tablets */
  .login-form-container {
    width: 50%;
    padding: 30px;
  }

  .welcome-container {
    width: 50%;
    padding: 30px;
  }

  .welcome-content h1 {
    font-size: 3rem;
  }

  .welcome-content p {
    font-size: 1rem;
  }
}

/* --------------------------------------------------------------------------
   MD bucket (max-width: 767px) - phones
   Sources: style.css, user-pages.css, Login.css, buildings.css
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  /* style.css: notifications / chat widget / profile page */
  .notification-footer {
    flex-direction: column;
  }

  #chat-toggle {
    bottom: 90px;
  }

  #chat-overlay {
    width: 80vw;
  }

  .profile-avatar,
  .profile-avatar-placeholder {
    width: 140px;
    height: 140px;
    font-size: 2rem;
  }

  .profile-name {
    font-size: 1.75rem;
  }

  .profile-section-title {
    font-size: 1.1rem;
  }

  /* user-pages.css: global mobile styles for user-facing pages */
  .user-page {
    padding: 0 !important;
  }

  .user-page .container,
  .user-page .container-fluid {
    padding: 0 !important;
  }

  .user-page .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .user-page .row > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .user-card {
    padding: 1.5rem !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .jobs-card {
    padding: 20px !important;
  }

  .user-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .user-page > .text-start {
    padding: 1rem;
    margin-left: 0;
    margin-right: 0;
  }

  .d-flex.flex-column.flex-md-row {
    margin-left: 0 !important;
    flex-direction: column !important;
  }

  .d-flex.flex-column.flex-md-row .user-action {
    width: 100%;
  }

  .job-card {
    gap: 1.5rem;
  }

  .jobs-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .jobs-filters > * {
    width: 100%;
    max-width: none !important;
  }

  .table-responsive {
    border: none;
    border-radius: 0;
    font-size: 12px;
  }

  .steps-timeline .fa-check {
    display: none;
  }

  .timeline-circle {
    width: 38px;
    height: 38px;
  }

  .timeline::before {
    top: 19px;
  }

  .timeline::after {
    top: 19px;
  }

  .timeline-circle i {
    font-size: 0.9rem;
  }

  .timeline-step .small {
    font-size: 0.65rem;
  }

  .timeline-step .text-muted {
    font-size: 0.65rem;
  }

  /* Login.css: stacked layout on phones */
  #content-wrapper {
    flex-direction: column-reverse;
  }

  .login-form-container {
    width: 100%;
    padding: 20px;
  }

  .welcome-container {
    width: 100%;
    padding: 10px;
    min-height: 200px;
  }

  .login-header {
    margin-bottom: 10px;
  }

  .login-title {
    font-size: 1.5rem;
  }

  .login-logo {
    height: 38px;
    left: -10px;
  }

  .user-avatar {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    margin-bottom: 20px;
  }

  .input-group-custom {
    max-width: 100%;
  }

  .login-form input[type="text"],
  .login-form input[type="password"],
  .login-form input[type="email"],
  .form-input {
    padding: 10px 10px 10px 40px;
    font-size: 0.9rem;
  }

  .login-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    max-width: 100%;
  }

  .welcome-content h1 {
    font-size: 2rem;
    margin-bottom: 10px;
  }

  .welcome-content p {
    font-size: 0.95rem;
    margin-bottom: 0;
  }

  .login-footer {
    font-size: 0.8rem;
  }

  /* buildings.css: property type buttons */
  .property-type-btn {
    flex-direction: row !important;
    justify-content: flex-start !important;
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   SM bucket (max-width: 575px) - small phones
   Source: Login.css
   -------------------------------------------------------------------------- */
@media (max-width: 575px) {
  /* Login page */
  .login-form-container {
    padding: 15px;
  }

  .welcome-container {
    padding: 5px;
    min-height: 120px;
  }

  .login-title {
    font-size: 1.2rem;
  }

  .login-logo {
    height: 32px;
    left: -8px;
  }

  .user-avatar {
    width: 70px;
    height: 70px;
    font-size: 2rem;
    margin-bottom: 10px;
  }

  .welcome-content h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
  }

  .welcome-content p {
    font-size: 0.85rem;
    margin-bottom: 0;
  }

  .login-form {
    gap: 12px;
  }

  .input-group-custom {
    max-width: 100%;
  }

  .login-footer {
    font-size: 0.75rem;
    gap: 5px;
  }
}

/* --------------------------------------------------------------------------
   MD bucket (min-width: 768px) - tablets and up
   Sources: buildings.css, style.css (team carousel)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  /* buildings.css */
  .property-type-btn {
    text-align: center;
  }

  /* style.css: team carousel - 2 columns on tablets */
  .team-carousel-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* --------------------------------------------------------------------------
   LG bucket (min-width: 992px) - small desktops and up
   Source: style.css (nav, team carousel)
   -------------------------------------------------------------------------- */
@media (min-width: 992px) {
  .desktop-nav {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.35);
  }

  /* Hide the mobile navbars on desktop devices */
  .mobile-nav {
    display: none;
  }

  .mobile-navbar-top {
    display: none !important;
  }

  /* Hide the mobile settings on desktop devices */
  #mobile-settings-wrapper {
    display: none;
  }

  .fa-arrow-right.arrow-icon {
    display: none;
  }

  /* Team carousel - 4 columns on desktop */
  .team-carousel-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 1rem 2rem;
  }
}

/* --------------------------------------------------------------------------
   XL bucket (min-width: 1200px) - large desktops
   Source: style.css
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
  .container {
    max-width: 1320px;
  }
}
