:root {
  --radius5: 5px;
  --radius10: 10px;
  --radius15: 15px;
  --radius20: 20px;
  --radius100: 100px;
  --blur5px: blur(5px);
  --blur10px: blur(10px);
  --text: #222;
  --button-text: #fff;
  --background: #fff;
  --link: #08f;
  --accent: #00AA8A;
  --accent-hover: #009b7e;
  --accent-neutral: #54545421;
  --accent-transp: #00AA8A22;
  --select: #6D00F5;
  --select-hover: #9627F4;
  --cancel: #c00;
  --cancel-hover: #f33;
  --remove: #f99e;
  --gray: #777;
  --gray-transp: #7777;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ddd;
    --background: #222;
    --remove: #f99b;
    --gray: #999;
    --link: #52aeff;
    --accent: #009b7e;
    --accent-hover: #00AA8A;
    --accent-neutral: #ffffff21;
  }

  input::placeholder {
    color: var(--gray);
  }

  input {
    color: var(--button-text);
  }
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto-Condensed, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serifArial, Helvetica, sans-serif;
  overflow-y: scroll;

  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  margin: 0;
  padding: 8px;
  border-top: var(--accent) 1.5px solid;
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;
  box-shadow: var(--accent) 0px -10px 0px 5px;
  color: var(--text);
  background-color: var(--background);
}

/* body::selection, 
div::selection, 
p::selection, 
span::selection, 
a::selection {
  color: #fff;
  background-color: #009b7e !important;
} */

p {
  padding: 0;
  margin: 0;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button, input[type="submit"] {
  appearance: button;
  border-radius: var(--radius100);
  border: 0px none transparent;
  height: 40px !important;
  color: var(--button-text);
  background-color: var(--accent);
  padding-left: 25px;
  padding-right: 25px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

button:hover, input[type="submit"]:hover {
  background-color: var(--accent-hover);
}

#root {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#root>div {
  margin-top: 10px;
}

#header {
  width: 100%;
}

#header>div {
  height: 64px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

#header h3 {
  text-transform: uppercase;
  color: var(--accent-hover);
  font-weight: 400;
  margin: 0 16px;
}

#header p {
  color: var(--gray);
  font-size: smaller;
  text-align: center;
}

#header div img {
  height: 32px;
  width: 32px;
  margin: 0 16px;
}

.popup {
  z-index: 3;
  position: absolute;
  top: 0;
  left: 0;
  margin-top: 0 !important;
  border: none !important;
  border-radius: 0;
  box-sizing: border-box;
  height: 100%;
  max-height: 100%;
  width: 100%;
  max-width: 100%;
  margin: 0px;
  padding: 0px;
}

.popup#lpus {
  background: var(--background);
}

@media (min-width: 501px) {
  .popup#lpus {
    background: linear-gradient(90deg, #0007, #0003, #0007);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    border-top: var(--accent) 1.5px solid;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    box-shadow: var(--accent) 0px -10px 0px 5px;
  }
}

.popup_container {
  background: var(--background);
  max-width: 500px;
  margin: 0 auto;
}

.popup_header {
  max-width: 500px;
  width: 100%;
  height: 48px;
  position: fixed;
  top: 0px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background-color: var(--background);
}

@media (max-width: 500px) {
  .popup_header {
    border-top: var(--accent) 1.5px solid;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    box-shadow: var(--accent) 0px -10px 0px 5px;
  }
}

.popup_back, .popup_menu {
  width: 48px;
  text-align: center;
  cursor: pointer;
  font-size: 24px;
  transform: rotate(180deg);
}

.popup_back::before {
  content: '➔';
}

.popup_back:hover, .popup_menu:hover {
  color: var(--accent-hover);
}

.popup_title {
  font-weight: 600;
}

.popup_menu {
  font-weight: 900;
  transform: rotate(90deg);
}

.popup_menu.enabled::before {
  content: '⁝';
}

.popup_content {
  margin: 48px 10px 0;
  padding-top: 2px;
  height: calc(100% - 48px);
  overflow-y: scroll;
}

.hidden {
  display: none !important;
}

#newPatient {
  width: 100%;
}

form {
  margin: 0;
}

.error {
  color: var(--cancel);
}

#newPatient_form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#newPatient_form>div {
  width: 100%;
  display: flex;
  flex-direction: row;
  margin-bottom: 10px;
  align-items: center;
}

#newPatient_form>div>label {
  min-width: 40%;
}

#newPatient_form>div>input {
  min-width: 150px;
  width: 100%;
  height: 32px;
}

#newPatient_form>div>input:not([type=submit]) {
  border: 1px solid #7770;
  border-radius: var(--radius15);
  padding-left: 7px;
  background-color: var(--accent-transp);
}

#newPatient_form>div>input[type=submit] {
  margin-top: 10px;
}

#patients {
  width: 100%;
}

/* #selectedPatient {
  position: sticky;
  top: 0px;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(10px);
  padding: 10px 0;
  margin-bottom: 0;
  background: linear-gradient(90deg, #fff, #fffa, #fff);
} */

.patient {
  display: flex;
  border: 1px solid transparent;
  border-radius: var(--radius15);
  overflow: hidden;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 10px;
  cursor: pointer;
}

.patient:hover {
  border-color: var(--accent-neutral);
}

.patient_info {
  padding: 0;
  margin: 0;
  background-color: var(--accent-transp);
  width: 85%;
  padding: 10px;
}

.patient_info:hover {
  background-color: var(--accent-neutral);
}

.patient_name {
  margin-bottom: 5px;
}

.patient_birthday, .patient_insurance {
  color: var(--gray);
  font-size: 14px;
}

.patient_remove {
  width: 15%;
  background-color: var(--remove);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
}

.patient_remove:hover {
  background-color: var(--cancel-hover);
}

.lpu,
.specialty, 
.doctor,
.appointment,
.lpu_appointment {
  padding: 10px;
  border-radius: var(--radius15);
  border: 1px solid transparent;
  background-color: var(--accent-transp, #f6f6f6);
  margin-bottom: 10px;
}

.lpu_address, .lpu_contacts,
.specialty_tickets,
.doctor_tickets,
.doctor_comment,
.doctor_aria,
.appointment_room {
  font-size: small;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
}

.lpu_name, .lpu_address, .lpu_contacts,
.specialty_name, .specialty_tickets,
.doctor_name, .doctor_tickets,
.appointment_room {
  margin-bottom: 10px;
}

.lpu_name {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between
}

.lpu_name>div.removeLpu {
  cursor: pointer;
  font-size: 18px;
  color: var(--gray);
}

.lpu_select_button,
.specialty_select_button,
.doctor_select_button,
.appointment_select_button,
.lpu_appointment_cancel_button {
  width: 100%;
}

.appointment_select_button {
  background-color: var(--select);
}

.appointment_select_button:hover  {
  background-color: var(--select-hover);
}

.lpu_appointment_cancel_button {
  background-color: var(--cancel);
}

.lpu_appointment_cancel_button:hover {
  background-color: var(--cancel-hover);
}

.lpu_appointment {
  padding: 0;
  overflow: hidden;
}

.lpu_appointment_visit {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  font-size: 24px;
  font-weight: 700;
  background-color: var(--accent);
  color: var(--button-text);
  padding: 10px;
}

.lpu_appointment_data {
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.lpu_appointment_data>div, 
.lpu_appointment_patient>div {
  line-height: 1.75em;
}

.lpu_appointment_specialty, .lpu_appointment_patient_name {
  font-size: 18px;
  font-weight: 700;
}

.lpu_appointment_doctor, .lpu_appointment_patient_birthday {
  font-size: 12px;
  color: var(--gray);
}

.lpu_appointment_patient {
  padding: 10px;
}

.lpu_appointment_lpu {
  margin-top: 5px;
  font-size: 14px;
}

.lpu_appointment_address, .lpu_appointment_phone {
  font-size: 12px;
  color: var(--gray);
}

.lpu_appointment_address::before {
  content: '📍 '
}

.lpu_appointment_phone::before {
  content: '📞 '
}

button:disabled, button:hover:disabled {
  background-color: var(--gray);
  cursor: not-allowed;
}