/*--------------------------------------------------------------
 Theme:   Biosafras Theme (Child of BuddyBoss)
 URI:     https://biosafrasgroup.com.py
 Author:  Guillermo Robertti - https://sacrobits.org
Template: buddyboss-theme
 Version: 2.0.0
--------------------------------------------------------------*/

/* ======= 1. Importa estilos del tema padre ======= */
@import url("../buddyboss-theme/style.css");

/* ======= 2. Ajustes generales del header ======= */
.bb-header-buttons .button.small.outline.signin-button.link {
  display: none !important;
}
.bb-header-buttons .search-separator.bb-separator {
  display: none !important;
}

/* ======= 3. Tarjeta de factura ======= */
.factura-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  background: #D2DFBF;
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
}

.factura-card .fila-top {
    display: flex;
    flex: auto;
}

/* Icono */
.factura-card .col-icono img {
  width: 40px;
  height: 40px;
}

/* Descripción */
.factura-card .col-descripcion {
  flex: 2;
  display: flex;
  flex-direction: column;
  margin-right: 10px;
}
.factura-card .descripcion {
  font-weight: bold;
  margin-right: 10px;
}
.factura-card .numero-factura {
  color: #555;
  font-size: 0.9em;
}

.factura-card .col-descripcion,
.factura-card .descripcion,
.factura-card .numero-factura {
    max-width: 700px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Valor + Fecha */
.factura-card .col-valor-fecha {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: auto;
}

.factura-card .valor {
  font-weight: bold;
}
.factura-card .valor span {
  color: green;
}
.factura-card .fecha {
  color: #555;
  font-size: 0.9em;
}

/* Descarga */
.factura-card .col-descarga {
  flex: 0 0 100px;
  display: flex;
  flex-direction: column;
  margin-left: 10px;
  row-gap: 6px;
}
.factura-card .col-descarga a {
  text-align: center;
  padding: 6px 0;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: bold;
  transition: background 0.3s;
}
.factura-card .col-descarga .btn-xml {
  border: 2px solid #7ea842;
  color: #7ea842;
}
.factura-card .col-descarga .btn-xml:hover {
  border: 2px solid #88c431;
  color: #88c431;
}
.factura-card .col-descarga .btn-pdf {
  background: #7ea842;
  color: white;
}
.factura-card .col-descarga .btn-pdf:hover {
  background: #88c431;
  color: white;
}

/* Última actualización */
.ultima-update {
    display: flex;
    column-gap: 8px;
    color: gray;
    font-size: 14px;
    padding: 5px 10px;
    font-weight: bold;
}
.ultima-update p {
    font-size: 12px;
    margin: 0;
}

/* Botón para filtros */
.btn-filtro-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: gray;
    padding: 0;
    margin-left: 4px;
}
.btn-filtro-toggle:hover {
    color: #F5A828;
}
.btn-filtro-toggle:focus {
  outline: none;
  box-shadow: none;
  background: none;
  color: gray;
}

/* ======= Formulario de filtros de facturas ======= */
.filtro-facturas.hidden {
  display: none;
}
.filtro-facturas {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  column-gap: 12px;
  background: #D2DFBF;
  border: 1px solid #ccc;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 6px;
}
.filtro-facturas label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: #333;
  font-weight: 600;
}
.filtro-facturas input[type="date"],
.filtro-facturas input[type="text"] {
  padding: 6px 10px;
  border: 1px solid #bbb;
  margin-bottom: 10px;
  border-radius: 4px;
  font-size: 0.95rem;
  min-width: 140px;
}
.btnsFL {
  display: flex;
  column-gap: 12px;
  margin: 10px 0;
}
.ordenAD {
  margin-bottom: 10px;
  width: 100%;
}
.filtro-facturas .btn-filtrar,
.filtro-facturas .btn-limpiar {
  display: flex;
  width: 100%;
  height: 40px;
  padding: 8px 18px;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease;
  justify-content: center;
  align-items: center;
}
/* Botón Filtrar */
.filtro-facturas .btn-filtrar {
  background-color: #7ea842;
  color: #ffffff;
}
.filtro-facturas .btn-filtrar:hover {
  background-color: #88c431;
}
/* Botón Limpiar */
.filtro-facturas .btn-limpiar {
  background-color: #ffffff;
  color: #7ea842;
}
.filtro-facturas .btn-limpiar:hover {
  background-color: #edf2eb;
}

/* Mantener fechas lado a lado */
.filtroFechas {
  display: flex;
  column-gap: 12px;
}

.nav-meses {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 6px;
    border-radius: 5px;
}
.nav-meses.oculto {
    display: none;
}
.nav-meses .btn-mes.disabled {
    opacity: 0.3;
    pointer-events: none;
}
.filtroMA {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    font-weight: 800;
    line-height: 20px;
}
.mesF, .anioF {
    color: #7ea842;
}
.btn-mes {
    color: #000000;
    font-weight: 600;
}
.btn-mes:hover {
    color: #F5A828;
}

.noEncuentra {
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 200px;
    font-size: 100px;
    flex-direction: column;
    margin-top: 50px;
}
.noEncuentra span {
    color: black;
    font-size: 20px;
    font-weight: 600;
}

/* ======= 5. Responsive ======= */
@media (max-width: 600px) {
    .factura-card {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    .factura-card .fila-top {
        display: flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        column-gap: 8px;
        margin-bottom: 10px;
        font-size: 13px;
    }
    .factura-card .col-descripcion {
        display: flex;
        flex-direction: row;
        align-items: center;
        column-gap: 8px;
        margin-right: 8px;
    }
    .factura-card .col-info,
    .factura-card .numero-factura,
    .factura-card .descripcion {
        max-width: 200px;            
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .factura-card .col-icono img { width: 32px; height: 32px; }
    .factura-card .col-descarga {
        align-self: flex-end;
        display: flex;
        flex-direction: row;
        column-gap: 8px;
        margin-left: 0;          
        flex: 0 0 auto;
    }
    .factura-card .col-descarga a {
        padding: 2px;
        min-width: 80px;
        white-space: nowrap;
    }
    
    .filtro-facturas {
        flex-direction: column;
        align-items: stretch;
    }
    .filtroFechas {
        flex-direction: row !important;
        justify-content: space-between;
    }
    .filtroFechas > div {
        flex: 1;
    }
    .filtroFechas input[type="date"] {
        width: 100%;
        min-width: unset;
    }
    .filtro-facturas input[type="text"] {
        width: 100%;
        min-width: unset;
    }
}
