:root {
  font-size: 1rem;
  --color-primary: #430b7a;
  --color-white: #ffffff;
  --header-height: 4.5rem;
  --navbar-height: 4.5rem;
  --desktop-padding: 5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  font-weight: 500;
  text-decoration: none;
}

body {
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  padding: 1rem;
}



.app-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 1rem;
  background-color: var(--color-white);
  box-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.05); 
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hamburger-menu {
  display: none;
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  line-height: 0;
}

.hamburger-menu img {
  width: 1.50rem;
  height: 1.50rem;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  visibility: hidden;
  transition: 0.25s ease, visibility 0.25s;
  z-index: 150;
}

.overlay-show {
  background: rgba(0,0,0,0.35);
  visibility: visible;
}

/* SIDEBAR */
.sidebar-desktop {
  position: fixed;
  top: 0;
  right: -22rem;
  width: 22rem;
  max-width: 90%;
  height: 100vh;
  background: var(--color-white);
  box-shadow: -0.25rem 0 0.75rem rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  transition: left 0.28s cubic-bezier(.2,.9,.2,1);
  z-index: 200;
  padding: 1.25rem;
  will-change: left;
  padding: 0 1.25rem 1.25rem 1.25rem;
}

.sidebar-open {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-primary);
  width: calc(100% + 2.5rem);
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  background-color: #9f64da57;
  padding: 0.75rem 1.25rem 1rem 1.25rem;
  margin-top: 0;
}

.sidebar-close {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 0;
}

.sidebar-close img {
  width: 1.25rem;
  height: 1.25rem;
}

.sidebar-list {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
}

.sidebar-item {
  border-radius: 0.5rem;
  overflow: hidden;
}

.sidebar-item a {
  display: block;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-primary);
  text-decoration: none;
}

.sidebar-item--active {
  background: var(--color-primary);
}

.sidebar-item--active a {
  font-weight: 600;
  color: var(--color-white);
}

.main-content {
  flex-grow: 1;
  padding-top: var(--header-height);
  padding-bottom: var(--navbar-height);
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
  margin-top: 2rem;
}

.app-navbar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--navbar-height);
  background-color: var(--color-white);
  box-shadow: 0 -0.25rem 0.25rem rgba(0, 0, 0, 0.05);
  z-index: 100;
}

/* HEADER */

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.3125rem;
}

.logo-icon {
  font-size: 1.75rem;
  line-height: 0;
  color: var(--color-primary);
}

.logo-name {
  font-family: "Gruppo", Helvetica;
  font-weight: 500;
  color: var(--color-primary);
  font-size: 0.9rem;
}

.header-location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
}

.location-text {
  font-family: "Poppins", Helvetica;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.8rem;
}

.location-icon-wrapper {
  font-size: 0.6rem;
  line-height: 0;
  color: var(--color-primary);
}

/* NAVBAR FOOTER */

.app-navbar nav {
  width: 100%;
}

.nav-list {
  display: flex;
  justify-content: space-around;
  list-style: none;
  height: 100%;
  width: 100%;
}

.nav-item {
  list-style: none; 
  cursor: pointer; 
  color: #b0b0b0; 
  transition: color 0.2s;
}

.nav-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  height: 100%;
  width: 100%;
  text-decoration: none;
  color: #797979ef;
}

.nav-item--active a {
  color: #430b7a;
}

.nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.nav-text {
  font-size: 0.625rem;
  font-weight: 600;
  white-space: nowrap;
}

/* MODAL DE SELEÇÃO DE CIDADE */
.modal-cidade-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background-color: transparent; 
}

.modal-cidade-content {
  position: absolute;
  top: 3.8rem; 
  right: 1rem;
  width: 320px;
  max-width: 95vw;
  max-height: 80vh;
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
}

.modal-cidade-header {
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  margin-bottom: 1rem;
}

.modal-cidade-title {
  color: #8000ff; 
  font-weight: 700; 
  font-size: 1rem; 
  margin: 0;
}

.btn-fechar-modal {
  background: none; 
  border: none; 
  font-size: 1.5rem; 
  color: #999; 
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.btn-fechar-modal:hover {
  color: #333;
}

.input-busca-cidade {
  width: 100%; 
  padding: 10px;
  border: 1px solid #ddd; 
  border-radius: 6px;
  background-color: #f9f9f9;
  margin-bottom: 1rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
}

.input-busca-cidade:focus {
  outline: 2px solid #8000ff;
  background-color: #fff;
}

.lista-cidades-modal {
  list-style: none; 
  padding: 0; 
  margin: 0;
  overflow-y: auto;
  max-height: 300px;
}

.lista-cidades-modal li {
  border-bottom: 1px solid #f9f9f9;
}

.lista-cidades-modal li:last-child {
  border-bottom: none;  
}

.lista-cidades-modal a {
  display: flex; 
  align-items: center; 
  gap: 10px;
  padding: 10px 5px;
  text-decoration: none; 
  color: #505050;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
  border-radius: 4px;
}

.lista-cidades-modal a:hover {
  background-color: #f8f0ff; 
  color: #8000ff;
}

.cidade-icone-modal { 
  width: 16px; 
  height: 16px;
  opacity: 0.7;
}

.no-results-message {
  padding: 15px;
  text-align: center;
  color: #999;
  font-size: 0.9rem;
  font-style: italic;
  border-bottom: none !important;
}


/* MEDIA WEB */

@media (min-width: 48rem) { 
  .main-content {
    padding-left: var(--desktop-padding);
    padding-right: var(--desktop-padding);
    max-width: 85rem;
    margin-left: auto;
    margin-right: auto;
  }

  .modal-cidade-content {
    right: 2rem;
  }
  
  .app-header {
    padding-left: calc(1rem + var(--desktop-padding));
    padding-right: calc(1rem + var(--desktop-padding));
  }
  
  .app-navbar {
    justify-content: center;
  }
  
  .nav-list {
    max-width: 85rem;
    width: 100%;
    padding: 0 var(--desktop-padding);
  }

  .app-navbar {
    display: none;
  }

  .hamburger-menu {
    display: inline-flex;
  }
}