@import url('font-inter.css');
:root {
  --primarycolor: #1984bc;
  --primarycolorhover: #094361;
  --btnice:#D8EBFA;
  --btnnicetext:#21475b;
}

body{
    margin: 0;
    padding: 0;
    border-spacing: 0;
    font-family: 'Inter', sans-serif;
    
}

*, ::after, ::before{
    box-sizing: border-box;
}


/*------custom-scroll-bar - from w3schools.com------------------*/
/* width */
::-webkit-scrollbar {
    width: 5px;
  }
  
  /* Track */
  ::-webkit-scrollbar-track {
    background: #fd7d1c; 
  }
   
  /* Handle */
  ::-webkit-scrollbar-thumb {
    background: #888; 
    border-radius: 12px;
  }
  
  /* Handle on hover */
  ::-webkit-scrollbar-thumb:hover {
    background: #555; 
  }





.input-text{
    border-radius: 4px;
    border: 0.5px solid rgb(226, 226, 226);
    padding: 10px;
    width: 92%;
    transition: 0.2s;
    outline: none;
}

.input-text{
    border: 1px solid #e9ecef;
    font-size: 14px;
    line-height: 26px;
    background-color: #fff;
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font-weight: 300;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: .25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.input-text:hover{
    background-color: rgb(250, 250, 250);
    transition: 0.2s;
    outline: none;
}

.input-text:focus{
    border: 1px solid rgb(10,118,216);
    transition: 0.2s;
}

.input-text::placeholder{
    font-family: 'Inter', sans-serif;
}



/* -----------Buttons---------------*/
.btn{
    cursor: pointer;
    padding: 8px 20px;
    outline: none;
    text-decoration: none;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
}


.btn:hover{
    background-color: var(--primarycolorhover);
    box-shadow: none;
    transition: all 0.5s;
    font-family: 'Inter', sans-serif;

}


.btn-primary{
    background-color: var(--primarycolor) ;
    border: 1px solid var(--primarycolor) ;
    color: #fff ;
    box-shadow: 0 3px 5px 0 rgba(57,108,240,0.3);
}

.btn-primary-soft{
    background-color: #D8EBFA ;
    /*border: 1px solid rgba(57,108,240,0.1) ;*/    color: #1969AA;
    font-weight: 500;
    font-size: 16px;
    border: none;
    /*box-shadow: 0 3px 5px 0 rgba(57,108,240,0.3)*/
}


.btn-primary-soft:hover{
    background-color: var(--primarycolor) ;
    /*border: 1px solid rgba(57,108,240,0.1) ;*/
    color: #fff ;
    box-shadow: 0 3px 5px 0 rgba(57,108,240,0.3);
}


.btn-in-text{
    font-size: 15px;
    letter-spacing: 0.5px;
}

.non-style-link:link, .non-style-link:visited, .non-style-link:hover, .non-style-link:active{
    text-decoration: none;
    color: rgb(43, 43, 43);
}




.btn-label{
    margin-left: 10px;
    padding: 12px 12px;
    outline: none;
    text-decoration: none;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    border-radius: 5px;
    background-color: #f0f0f073;
    border: 1px solid rgba(57,108,240,0.1) ;
    font-family: 'Inter', sans-serif;
}


.sub-table{
    border: 1px solid #ebebeb;
    border-radius: 8px;
    
}

.filter-container{
  width: 92.5%;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  margin-bottom: 20px;
  border-spacing: 0;
  padding: 0;
}

.filter-container-items{
  margin-top: 7.5px;
  margin-left: 20px;


}
.table-headin{
    font-size: 16px;
    font-weight: 500;
    padding: 10px;
    border-bottom: 3px solid var(--primarycolor);
}

.abc{
  width: 100%;
  height: 550px;
  overflow: auto;
}





        
.overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    transition: opacity 500ms;
    opacity: 1;
  }
  .overlay:target {
    visibility: visible;
    opacity: 1;
    
  }
  
  .popup {
    margin: 70px auto;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    width: 50%;
    position: relative;
    transition: all 5s ease-in-out;
  }
  
  .popup h2 {
    margin-top: 0;
    color: #333;
  }
  .popup .close {
    position: absolute;
    top: 20px;
    right: 30px;
    transition: all 200ms;
    font-size: 30px;
    font-weight: bold;
    text-decoration: none;
    color: #333;
  }
  .popup .close:hover {
    color: var(--primarycolorhover);
  }
  .popup .content {
    max-height: 30%;
    overflow: auto;
  }
  
  @media screen and (max-width: 700px){
    .box{
      width: 70%;
    }
    .popup{
      width: 70%;
    }
  }


input[type=search] {
    background-image: url('../img/search.svg');
    background-position: 10px 50%;
    background-repeat: no-repeat;
    transition: 0.5s;
    padding: 8px 20px 8px 40px;
}

input[type=search]:focus {
    transition: 0.5s;
}

.box {
  width: 120px;
  height: 30px;
  border: 1px solid #e9ecef;
  font-size: 14px;
  color: #212529;
  background-color: #fff;
  line-height: 26px;
  font-weight: 300;
  border-radius: .25rem;
  padding: .375rem .75rem;
  line-height: 1.5;
  width: 100%;
  background-clip: padding-box;
  transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}



.btn-primary-gray{
  background-color: #fff;
  border: 2px solid #c9cbce9f;
  color: #212529d0;
  box-shadow: 0 3px 5px 0 rgba(95, 95, 97, 0.3);
}



.btn-primary-gray:hover{
  background-color: #5185ffa9;
  box-shadow: 0 3px 5px 0 rgba(95, 95, 97, 0.3);
}



.button-icon{
  
  background-position: 10px 50%;
  background-repeat: no-repeat;
  transition: 0.5s;
  padding: 8px 20px 8px 40px;
}



.menu-btn{
  padding:6px;
  color: #3b3b3b;
  background-position: 30% 50%;
  background-repeat: no-repeat;
  transition: 0.5s;
  
}

.menu-text{
  padding-left: 40%;
  font-weight: 500;
  font-size: 16px;
  
}


.menu-active{
  color: var(--primarycolor);
  border-right: 7px solid var(--primarycolor);
  background-color: var();
}

.menu-btn:hover{
  background-color: var(--btnice);
  color: var(--primarycolor);
}

.non-style-link-menu:link, .non-style-link-menu:visited,  .non-style-link-menu:active{
  text-decoration: none;
  color: #3b3b3b;
}
.non-style-link-menu:hover{
  text-decoration: none;
  color: var(--primarycolor);
}

.non-style-link-menu-active:link, .non-style-link-menu-active:visited,  .non-style-link-menu-active:active{
  text-decoration: none;
  color: var(--primarycolor);
}



.menu-icon-dashbord{
  background-image: url('../img/icons/dashboard.svg');
}


.menu-icon-doctor{
  background-image: url('../img/icons/doctors.svg');
}
.menu-icon-schedule{
  background-image: url('../img/icons/schedule.svg');
}
.menu-icon-appoinment{
  background-image: url('../img/icons/book.svg');
}
.menu-icon-patient{
  background-image: url('../img/icons/patients.svg');
}
.menu-icon-settings{
  background-image: url('../img/icons/settings.svg');
}

.menu-icon-session{
  background-image: url('../img/icons/session.svg');
}
.menu-icon-home{
  background-image: url('../img/icons/home.svg');
}



.menu-icon-dashbord:hover,.menu-icon-dashbord-active{
  color: var(--primarycolor);

  background-image: url('../img/icons/dashboard-hover.svg');
}


.menu-icon-doctor:hover,.menu-icon-doctor-active{
  color: var(--primarycolor);
  background-image: url('../img/icons/doctors-hover.svg');
}
.menu-icon-schedule:hover,.menu-icon-schedule-active{
  color: var(--primarycolor);
  
  background-image: url('../img/icons/schedule-hover.svg');
}
.menu-icon-appoinment:hover,.menu-icon-appoinment-active{
  color: var(--primarycolor);
  
  background-image: url('../img/icons/book-hover.svg');
}
.menu-icon-patient:hover,.menu-icon-patient-active{
  color: var(--primarycolor);
  
  background-image: url('../img/icons/patients-hover.svg');
}

.menu-icon-settings:hover,.menu-icon-settings-active{
  color: var(--primarycolor);
  
  background-image: url('../img/icons/settings-iceblue.svg');
}

.menu-icon-session:hover,.menu-icon-session-active{
  color: var(--primarycolor);
  
  background-image: url('../img/icons/session-iceblue.svg');
}
.menu-icon-home:hover,.menu-icon-home-active{
  color: var(--primarycolor);
  
  background-image: url('../img/icons/home-iceblue.svg');
}





.btn-icon-back{
  background-image: url('../img/icons/back-iceblue.svg');
  background-position: 18px 50%;
  background-repeat: no-repeat;
  transition: 0.5s;
  padding: 8px 20px 8px 40px;
}

.btn-icon-back:hover{
  background-image: url('../img/icons/back-white.svg');
}


.btn-edit{
  background-image: url('../img/icons/edit-iceblue.svg');
}
.btn-edit:hover{
  background-image: url('../img/icons/edit-white.svg');
}

.btn-view{
  background-image: url('../img/icons/view-iceblue.svg');
}
.btn-view:hover{
  background-image: url('../img/icons/view-white.svg');
}

.btn-delete{
  background-image: url('../img/icons/delete-iceblue.svg');
}
.btn-delete:hover{
  background-image: url('../img/icons/delete-white.svg');
}

.btn-filter{
  background-image: url('../img/icons/filter-iceblue.svg');
  background-position: 15px 50%;
}
.btn-filter:hover{
  background-image: url('../img/icons/filter-white.svg');
}




.dashboard-items{
  
  border: 2px solid #c9cbce9f;
  border-radius: 7px;
  color: var(--primarycolor);
  /*background-color: #d8ebfa25 ;*/
  /*box-shadow: 0 3px 5px 0 rgba(95, 95, 97, 0.3);*/
}


.h1-dashboard{
  margin: 0;
  padding: 0;
  font-size: 25px;
  font-weight: 600;
  line-height: 0;
  padding-top: 20px;
}

.h3-dashboard{
  margin: 0;
  padding: 0;
  font-size: 20px;
  font-weight: 500;
  color: #212529e3;
}

.dashboard-icons{
  background-color: rgba(184, 184, 184, 0.247);
  padding-top: 30px;
  padding-bottom: 30px;
  border-radius: 7px;
  margin-left: 40px;
  margin-right: 0px;
  
}
.dashboard-icons-setting{
  background-color: rgba(184, 184, 184, 0.247);
  padding-top: 30px;
  padding-bottom: 30px;
  border-radius: 7px;
  margin-left: 5px;
  margin-right: 20px;
  
}

.setting-tabs:hover{
  background-color: #d6d6d657;
}


.doctor-header{
  background-image: url(../img/b8.jpg);
  color: rgba(0, 0, 0, 0.87);
  background-size: 100%;
  background-repeat: no-repeat;
  padding: 20px;
  padding-left: 35px;
}

.patient-header{
  background-image: url(../img/b3.jpg);
}

.search-items{
  padding:20px;
  margin:10px;
  width:95%;
  display: flex;
  padding-left:0;
  padding-left: 30px;
  box-sizing: border-box;
  line-height: 1.5;
  box-shadow: 0 3px 5px 0 rgba(95, 95, 97, 0.068);
}


.h1-search{
  margin: 0;
  padding: 0;
  font-size: 23px;
  font-weight: 600;
  padding-top: 20px;
  padding-bottom: 10px;
}

.h3-search{
  margin: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  color: #212529e3;
  
}

.h4-search{
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 400;
  color: #212529e3;
}

.btn-book{
  background-image: url('../img/icons/book-balck.svg');
  background-position: 68% 50%;
  background-repeat: no-repeat;
  transition: 0.5s;
}

/* =========================================================
   ADD-ON RESPONSIVE (no rompe tu CSS actual)
   Pégalo al final de css/main.css
   ========================================================= */

/* Previene scroll horizontal accidental en móviles */
html, body { overflow-x: hidden; }

/* Imágenes y svgs fluidos */
img, svg, video { max-width: 100%; height: auto; }

/* ---------- Tablas: que NO partan letras y permitan scroll ---------- */
.sub-table, .dashboard-items, .table-wrap, .table-container {
  position: relative;
}

.sub-table .table-responsive,
.dashboard-items .table-responsive,
.table-wrap, .table-container {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1024px) {
  /* Evita que los encabezados se apilen letra por letra */
  table th, table td {
    white-space: nowrap;
    word-break: keep-all;
  }
  /* Si tu tabla queda apretada, fuerza un ancho mínimo */
  table { min-width: 640px; }
}

/* ---------- Menú lateral (paciente/admin) ---------- */
@media (max-width: 992px) {
  .menu {
    width: 100% !important;
    border-right: 0;
    border-bottom: 1px solid #ebebeb;
    box-shadow: none;
  }

  /* Contenido debajo del menú ocupa todo el ancho */
  .dash-body { width: 100% !important; }

  /* Botones/links del menú en una fila scrollable si no caben */
  .menu-container,
  .menu table { width: 100%; }

  .menu a,
  .menu .menu-btn,
  .menu .non-style-link-menu {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    white-space: nowrap;              /* no partir texto del menú */
    text-decoration: none;
  }

  /* Píldora azul de activo centrada y sin “romper” */
  .menu-active,
  .non-style-link-menu-active {
    color: var(--primarycolor);
    background-color: var(--btnice);
    border-right: 0;                  /* evita borde grueso vertical en móvil */
    border-radius: 8px;
  }
}

/* ---------- Formularios / Inputs ---------- */
@media (max-width: 768px) {

  /* Input de búsqueda con icono: que no se corte */
  input[type="search"] {
    width: 100%;
    background-position: 10px 50%;
    padding-left: 40px;
  }

  /* Campos e inputs a 100% */
  .input-text, .box, select, textarea {
    width: 100% !important;
  }

  /* Botones principales a 100% cuando están en formularios */
  .btn, .btn-primary, .btn-primary-soft, .btn-primary-gray {
    min-height: 44px;                 /* target accesible */
    touch-action: manipulation;
  }

  /* Bloques de búsqueda/filtros en columna */
  .search-items, .filter-container-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding-left: 0;
    margin: 10px 0;
  }
}

/* ---------- Tarjetas/listas (citas, doctores) ---------- */
@media (max-width: 768px) {
  .card, .doctor-card, .service-card, .dashboard-items {
    width: 100% !important;
    margin: 0 0 12px 0;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
  }

  .h1-dashboard { font-size: 22px; line-height: 1.2; }
  .h3-dashboard { font-size: 18px; }
  .h1-search { font-size: 20px; }
  .h3-search { font-size: 14px; }
  .h4-search { font-size: 13px; }
}

/* ---------- Cabeceras/hero del panel ---------- */
@media (max-width: 768px) {
  .doctor-header, .patient-header {
    background-size: cover;
    background-position: center;
    padding: 16px;
  }
}

/* ---------- Popups ---------- */
@media (max-width: 700px) {
  .popup { width: 92% !important; }
}

/* ---------- Mejoras táctiles y focus ---------- */
@media (hover: none) {
  .btn:hover { background-color: var(--primarycolor); }
}
.btn:focus-visible,
.input-text:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(10,118,216,.35);
  outline-offset: 2px;
}

/* ---------- Arreglo de “botones verticales” del menú de iconos ---------- */
/* Si tienes un menú de solo iconos, que cada item sea horizontal y clicable */
.menu .btn, .menu .btn-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ===== PARCHE EXPRESS MOVIL (pegar al final de main.css) ===== */

/* 1) HERO / portada: evita desbordes y texto súper grande */
.hero, .hero-section{
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}
.hero h1, .hero-section h1{ line-height: 1.15; }
@media (max-width: 768px){
  .hero, .hero-section{ padding: 20px 16px; }
  .hero h1, .hero-section h1{ font-size: 1.8rem; }
  .hero p,  .hero-section p { font-size: 1rem; }
}

/* 2) MENÚ LATERAL en móvil: icono + texto en fila, clic full width */
@media (max-width: 768px){
  .menu{ width: 100% !important; height: auto !important; border-right: 0; }
  .dash-body{ width: 100% !important; }
  .menu a, .menu .menu-btn, .menu .non-style-link-menu{
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    white-space: nowrap;
    width: 100%;
  }
  .menu-text{ padding-left: 0; font-size: 16px; }
  .profile-container{ padding: 16px 12px; }
  .logout-btn{ width: 95%; }
}

/* 3) TABLAS RESPONSIVAS (todas): scroll x y sin “letras verticales” */
.sub-table,
table,
.table,
.dashboard-tables{
  width: 100%;
  overflow: hidden;
  border-collapse: collapse;
}

.table-wrap,
.sub-table .abc,
.dashboard-tables .abc{
  /* si ya tienes .abc como contenedor scrolleable, genial; si no, aplica a .table-wrap */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

table thead th,
.table thead th,
.sub-table thead th{
  white-space: nowrap;          /* no partir palabras */
  word-break: keep-all;
  letter-spacing: 0;            /* evita separación extra */
  vertical-align: middle;
}

table td, table th,
.table td, .table th,
.sub-table td, .sub-table th{
  white-space: normal;
  word-break: normal;
  line-height: 1.3;
  padding: 10px 12px;
}

/* Anchos mínimos por columnas comunes: ajusta si quieres */
th:nth-child(1){ min-width: 60px; }
th:nth-child(2){ min-width: 140px; }
th:nth-child(3){ min-width: 120px; }
th:nth-child(4){ min-width: 100px; }
th:nth-child(5){ min-width: 100px; }
th:nth-child(6){ min-width: 120px; }

/* Botones dentro de celdas: no se apilen verticalmente */
td .btn, td .btn-primary, td .btn-primary-soft{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  min-width: 88px;
  height: auto;
  writing-mode: horizontal-tb !important; /* por si algo lo pone vertical */
}

/* 4) CORRECCIÓN DE WRITING-MODE ACCIDENTAL */
[style*="writing-mode"], .vertical-text{
  writing-mode: horizontal-tb !important;
}

/* 5) CONTENEDORES DE BLOQUES (cards/tablas) bien centrados en móvil */
@media (max-width: 768px){
  .card, .doctor-card, .service-card, .sub-table{
    border-radius: 10px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* 6) BOTÓN “AGREGAR DOCTOR” u otros que se “ponen de lado” */
.btn, .btn-primary, .btn-primary-soft{
  writing-mode: horizontal-tb !important;
  transform: none !important;
}

/* 7) Safe-area iOS: evita que algo quede pegado al borde curvo */
@supports (padding: max(0px)){
  body{
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}
