/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:opsz,wght@6..12,200..1000&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 2rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: hsl(228, 85%, 63%);
  --title-color: hsl(228, 18%, 16%);
  --text-color: hsl(228, 8%, 56%);
  --body-color: hsl(228, 100%, 99%);
  --shadow-color: hsla(228, 80%, 4%, .1);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Nunito Sans", system-ui;
  --normal-font-size: .938rem;
  --smaller-font-size: .75rem;
  --tiny-font-size: .75rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --normal-font-size: 1rem;
    --smaller-font-size: .813rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: background-color .4s;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  all: unset;
}

/*=============== VARIABLES DARK THEME ===============*/
body.dark-theme {
  --first-color: hsl(228, 70%, 63%);
  --title-color: hsl(228, 18%, 96%);
  --text-color: hsl(228, 12%, 61%);
  --body-color: hsl(228, 24%, 16%);
  --shadow-color: hsla(227, 82%, 2%, 0.3);
}

/*========== 
	Color changes in some parts of 
	the website, in dark theme
==========*/
.dark-theme .sidebar__content::-webkit-scrollbar {
  background-color: hsl(228, 16%, 30%);
}

.dark-theme .sidebar__content::-webkit-scrollbar-thumb {
  background-color: hsl(228, 16%, 40%);
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  /* margin-inline: 1.5rem; */
  margin-inline: "100%";
}

.main {
  padding-top: 5rem;
  /* padding-left: 160px; */

}

/*=============== HEADER ===============*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  /* margin: .75rem; */
}

.header__container {
  width: 100%;
  height: calc(var(--header-height) + 2.5rem);
  background-color: var(--body-color);
  box-shadow: 0 2px 24px var(--shadow-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 1.5rem;
  /* border-radius: 1rem; */
  transition: background-color .4s;
}


.header__logo {
  display: inline-flex;
  align-items: center;
  column-gap: .25rem;
}

.header__logo i {
  font-size: 1.5rem;
  color: var(--first-color);
}

.header__logo span {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

.header__toggle {
  font-size: 1.5rem;
  color: var(--title-color);
  cursor: pointer;
}

/*=============== SIDEBAR ===============*/
.sidebar {
  position: fixed;
  left: -120%;
  top: 0;
  bottom: 0;
  z-index: var(--z-fixed);
  width: 180px;
  background-color: var(--body-color);
  /* border: 1px solid red; */
  box-shadow: 0 0 24px var(--shadow-color);
  /* box-shadow: 10px 0 10px -5px rgba(0, 0, 0, 0.5); */
  padding-block: 1.5rem;
  /* margin: .25rem; */
  /* border-radius: 1rem; */
  transition: left .4s, background-color .4s, width .4s;
}

.sidebar__container,
.sidebar__content {
  display: flex;
  flex-direction: column;
  row-gap: 2rem;
}

.sidebar__container {
  height: 100%;
  overflow: hidden;
}

.sidebar__user {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.sidebar__img {
  position: relative;
  width: 50px;
  height: 50px;
  background-color: var(--first-color);
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  align-items: center;
  justify-items: center;
}

.sidebar__img img {
  position: absolute;
  width: 36px;
  bottom: -1px;

}

.sidebar__info h3 {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: var(--smaller-font-size);
  color: var(--title-color);
  transition: color .4s;
}

.sidebar__info span {
  margin-top: -10;
  padding-top: -10;
  font-size: var(--smaller-font-size);
}

.sidebar__content {
  overflow: hidden auto;
}

.sidebar__content::-webkit-scrollbar {
  width: .4rem;
  background-color: hsl(228, 8%, 85%);
}

.sidebar__content::-webkit-scrollbar-thumb {
  background-color: hsl(228, 8%, 75%);
}

.sidebar__title {
  width: max-content;
  font-size: var(--tiny-font-size);
  font-weight: var(--font-semi-bold);
  /* padding-left: 2rem;
  margin-bottom: 1rem; */
}

.sidebar__list,
.sidebar__actions {
  display: grid;
  row-gap: 1rem;
}

.sidebar__link {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  align-items: center;
  column-gap: 1rem;
  color: var(--text-color);
  padding-left: 2rem;
  transition: color .4s, opacity .4s;
}

.sidebar__link i {
  font-size: 1.25rem;
}

.sidebar__link span {
  font-weight: var(--font-semi-bold);
}


.sidebar__link:hover {
  color: var(--first-color);
}

.sidebar__actions {
  margin-top: auto;
}

.sidebar__actions button {
  cursor: pointer;
}

.sidebar__theme {
  width: 100%;
  font-size: 1.25rem;
}

.sidebar__theme span {
  font-size: var(--normal-font-size);
  font-family: var(--body-font);
}

/* Show sidebar */
.show-sidebar {
  left: 0;
}

/* Active link */
.active-link {
  color: var(--first-color);
}

.active-link::after {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 20px;
  background-color: var(--first-color);
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 360px) {
  .header__container {
    padding-inline: 1rem;
  }

  .sidebar {
    width: max-content;
  }

  .sidebar__info,
  .sidebar__link span {
    display: none;
  }

  .sidebar__user,
  .sidebar__list,
  .sidebar__actions {
    justify-content: center;
  }

  .sidebar__user,
  .sidebar__link {
    grid-template-columns: max-content;
  }

  .sidebar__user {
    padding: 0;
  }

  .sidebar__link {
    padding-inline: 2rem;
  }

  .sidebar__title {
    padding-inline: .5rem;
    margin-inline: auto;
  }

}

/* For large devices */
@media screen and (min-width: 1150px) {
  .header {
    /* margin: 1rem; */
    padding-left: 185px;
    transition: padding .4s;
  }

  .header__container {
    height: calc(var(--header-height) + 2rem);
    padding-inline: 2rem;
  }

  .header__logo {
    order: 2;
  }

  .header__nome_empresa {
    order: 1;
  }


  .sidebar {
    left: 0;
    /* width: 316px; */
    /* margin: 1rem; */
  }

  .sidebar__info,
  .sidebar__link span {
    transition: opacity .4s;
  }

  .sidebar__user,
  .sidebar__title {
    transition: padding .4s;
  }

  /* Reduce sidebar */
  .show-sidebar {
    width: 90px;
  }

  .show-sidebar .sidebar__user {
    /* padding-left: 1.25rem; */
  }

  .show-sidebar .sidebar__title {
    padding-left: 0;
    margin-inline: auto;
  }

  .show-sidebar .sidebar__info,
  .show-sidebar .sidebar__link span {
    opacity: 0;
  }

  .main {
    padding-left: 105px;

    /*padding-top: 8rem; */
    transition: padding .4s;
  }

  /* Add padding left */
  .left-pd {
    padding-left: 90px;
  }

}

.app-footer {
  font-size: .75rem;
  padding: .6rem 1.5rem;
  border-top: 1px solid #dbe3ea;
  background: white;
}

.patient-info-card {
  /* background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); */
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 25px;
  border-left: 4px solid var(--first-color);
  box-shadow: 0 2px 10px var(--shadow-color);

}


.exames-container {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 40%;
  max-width: 400px;
  height: 100%;
  z-index: 1050;
  background: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

/* Quando for visível */
.exames-container.visible {
  display: block;
  transform: translateX(0);
}

/* Botão de toggle com posição fixa */
.btn-toggle-exames {
  position: fixed;
  top: 120px;
  right: 20px;
  z-index: 101;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}


/* Ajuste para mobile */
@media (max-width: 992px) {
  .exames-container {
    width: 85%;
    z-index: 1000;
  }

  .btn-toggle-exames {
    top: 100px;
    right: 15px;
  }

  .exames-visible .col-md-7 {
    width: 100%;
  }


}

.exames-container:not(.visible) {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.exames-container.visible {
  opacity: 1;
  visibility: visible;
}



/* Camada de overlay quando os exames estão abertos em mobile */
.exames-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  display: none;
}

.toggle-btn {
  position: fixed;
  left: 195px;
  top: 10px;
  z-index: 1000;
  transition: left 0.3s;
}

.toggle-btn.collapsed {
  left: 105px;
}

@media (max-width: 1149px) {
  .toggle-btn {
    left: 20px;
  }
}


/******* TELA DE LOADING */
:root {
  --loader-size: 50px;
  --loader-color: #3498db;
  --loader-background-color: rgba(0, 0, 0, 0.493);
  --loader-text-color: #000000;
}

#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--loader-background-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  /* Garante que fique acima de outros conteúdos */
  overflow: hidden;
  /* Evita rolagem */
}

.loader {
  width: var(--loader-size);
  height: var(--loader-size);
  border: 5px solid rgba(0, 111, 185, 0.1);
  /* Borda principal */
  border-top: 5px solid var(--loader-color);
  /* Borda que será animada */
  border-radius: 50%;
  /* Forma circular */
  animation: spin 1s linear infinite;
  /* Aplica a animação */
}

.loader p {
  margin-top: 20px;
  font-size: 1.5em;
  color: var(--loader-text-color);
}



@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/******* //TELA DE LOADING */

.form-label {
  font-weight: 700 !important;
}