/* Estilos para el formulario de búsqueda de dentistas */

.bdc-formulario-container {
    max-width: 100%;
    margin: 0 auto;
}

.bdc-titulo {
    text-align: center;
    color: #82b927;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: bold;
}

.bdc-formulario {
    display: block;
    flex-direction: column;
    gap: 15px;
    background: transparent;
    padding: 25px;
    padding-top: 5px;
    padding-bottom: 0;
    border-radius: 10px;
}

.bdc-fila {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 0;
    margin-bottom: 15px;
}

.bdc-campo {
    flex: 1;
}

.bdc-campo-especialidad {
    flex: 2;
}

.bdc-campo label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.bdc-campo select,
.bdc-campo input[type="text"] {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-family: 'Poppins';
    font-size: 16px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.bdc-campo select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
}

.bdc-campo input[type="text"] {
    cursor: text;
}

.bdc-campo select {
    cursor: pointer;
}

.bdc-campo select:hover:not(:disabled),
.bdc-campo input[type="text"]:hover {
    border-color: #82b927;
}

.bdc-campo select:focus,
.bdc-campo input[type="text"]:focus {
    outline: none;
    border-color: #82b927;
    box-shadow: 0 0 0 3px rgba(130, 185, 39, 0.1);
}

.bdc-campo select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.bdc-boton-buscar {
    padding: 8px 30px !important;
    background-color: #333333 !important;
    color: white !important;
    border: none !important;
    border-radius: 20px !important;
    font-family: 'Poppins' !important;
    font-size: 16px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease, transform 0.1s ease !important;
    margin-top: 0;
    width: 100% !important;
}

.bdc-boton-buscar:hover {
    background-color: #6fa01f;
    transform: translateY(-2px);
}

.bdc-boton-buscar:active {
    transform: translateY(0);
}

/* Estilos para los botones de tabs Mapa/Listado */
.bdc-tab-button {
    padding: 10px 7px;
    border: none;
    background: none;
    color: #333333;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}

.bdc-tab-button:hover {
    background-color: transparent;
    color: inherit;
    text-decoration: none;
}

.bdc-tab-button:focus {
    background-color: inherit;
    color: inherit;
    outline: none;
}

.bdc-tab-button img {
    width: 40px !important;
    height: 40px !important;
    vertical-align: middle;
    margin-right: 5px;
}

button#bdc-buscar-direccion,
button#bdc-buscar-direccion-home {
    width: 115px !important;
    white-space: nowrap;
}

button#bdc-buscar-cerca {
    padding: 10px 20px;
    border: none;
    background: #82BA26;
    color: white;
    cursor: pointer;
    border-radius: 25px;
    font-weight: 600;
    transition: 0.3s;
    text-transform: uppercase;
    font-family: 'Poppins';
    font-size: 16px;
}

button#bdc-buscar-cerca:hover {
    background: #6fa01f;
    transform: translateY(-2px);
}

button#bdc-buscar-cerca img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-left: 8px;
}

/* Estilos para el botón de búsqueda cerca de mí en la home */
button#bdc-buscar-cerca-home {
    padding: 10px 20px;
    border: none;
    background: #82BA26;
    color: white;
    cursor: pointer;
    border-radius: 25px;
    font-weight: 600;
    transition: 0.3s;
    text-transform: uppercase;
    font-family: 'Poppins';
    font-size: 16px;
}

button#bdc-buscar-cerca-home:hover {
    background: #6fa01f;
    transform: translateY(-2px);
}

button#bdc-buscar-cerca-home img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-left: 8px;
}

/* Campo de dirección en la barra de búsqueda */
.bdc-campo-direccion {
    flex: 1;
    padding: 10px 15px !important;
    border: 1px solid #ddd !important;
    border-radius: 20px !important;
    font-family: 'Poppins';
    font-size: 16px;
    background-color: white;
    transition: border-color 0.3s ease !important;
    box-sizing: border-box;
}

.bdc-campo-direccion:focus {
    outline: none;
    border-color: #82b927;
    box-shadow: 0 0 0 3px rgba(130, 185, 39, 0.1);
}

.bdc-campo-direccion:hover {
    border-color: #82b927;
}

/* Contenedor de sugerencias de autocompletado */
.bdc-autocomplete-dropdown {
    position: absolute;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
    left: 0;
}

.bdc-autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.bdc-autocomplete-item:last-child {
    border-bottom: none;
}

.bdc-autocomplete-item:hover {
    background-color: #f5f5f5;
}

.bdc-autocomplete-item-main {
    font-family: 'Poppins';
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.bdc-autocomplete-item-secondary {
    font-family: 'Poppins';
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

.bdc-autocomplete-loading {
    padding: 12px 15px;
    text-align: center;
    color: #666;
    font-family: 'Poppins';
    font-size: 14px;
}

/* Estilos para la página de resultados */
.bdc-resultados-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Header de resultados */
.bdc-resultados-header {
    margin-bottom: 30px;
    margin-top: 40px;
}

.bdc-resultados-titulo,
.bdc-titulo-resultados {
    color: #82b927;
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    margin: 0 0 10px 0;
}

.bdc-resultados-subtitulo,
.bdc-subtitulo-resultados {
    color: #666;
    font-size: 16px;
    margin: 0;
    text-align: center;
}

p.bdc-subtitulo-resultados strong {
    font-weight: bold;
}

.bdc-no-resultados {
    text-align: center;
    padding: 50px 20px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-top: 30px;
}

.bdc-no-resultados p {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

/* Lista de clínicas */
.bdc-clinicas-lista {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Tarjeta horizontal de clínica */
.bdc-clinica-card-horizontal {
    display: flex;
    gap: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.bdc-clinica-card-horizontal:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Sección de imagen */
.bdc-clinica-imagen {
    flex-shrink: 0;
    width: 276px;
    height: 276px;
}

.bdc-clinica-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 25px;
    background-color: #f5f5f5;
}

/* Sección de información */
.bdc-clinica-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 20px;
    border-right: 1px solid #e0e0e0;
}

.bdc-clinica-titulo {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.bdc-clinica-doctor {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 400;
    color: #82BA26;
    margin: 0;
    line-height: 1.4;
}

.bdc-clinica-direccion {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333333;
    margin: 0;
    line-height: 1.4;
}

.bdc-icon-person {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

.bdc-icon-location {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
}

.bdc-clinica-texto-info {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #333333;
    margin: 0;
    font-style: normal;
}

.bdc-btn-mas-info {
    display: inline-block;
    padding: 10px 30px;
    background-color: #82BA26;
    color: #ffffff;
    text-decoration: none !important;
    border-radius: 100px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    align-self: flex-start;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.bdc-btn-mas-info:hover {
    background-color: #6ba310;
    transform: translateY(-2px);
    color: white;
}

/* Sección de tratamientos */
.bdc-clinica-tratamientos {
    flex-shrink: 0;
    width: 400px;
}

.bdc-tratamientos-titulo {
    font-size: 28px;
    font-weight: bold;
    color: #82b927;
    margin: 0 0 10px 0;
    font-family: 'Poppins';
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bdc-toggle-tratamientos {
    display: none; /* Oculto por defecto en desktop */
    background: none !important;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    color: #82b927;
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.bdc-toggle-tratamientos:hover,
.bdc-toggle-tratamientos:focus,
.bdc-toggle-tratamientos:active {
    background: none !important;
    background-color: transparent !important;
    outline: none;
    color: #82ba26;
}

.bdc-toggle-tratamientos.active::before {
    content: '−'; /* Símbolo menos cuando está activo */
}

.bdc-toggle-tratamientos:not(.active)::before {
    content: '+'; /* Símbolo más cuando está cerrado */
}

.bdc-tratamientos-lista {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    max-height: 225px;
    overflow-y: auto;
}

.bdc-tratamiento-item {
    color: #333333;
    line-height: 1.4;
    font-family: 'Poppins';
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .bdc-formulario-container {
        padding: 0;
        margin: 0 0;
    }

    .bdc-titulo {
        font-size: 20px;
    }

    /* En móvil, hacer que todos los formularios muestren todos los campos en una sola fila */
    #bdc-formulario-busqueda,
    .bdc-formulario {
        display: flex;
        flex-wrap: nowrap; /* No permitir salto de línea */
        gap: 8px;
        overflow-x: auto; /* Scroll horizontal si es necesario */
    }

    .bdc-fila {
        display: contents; /* Elimina el contenedor de fila para que los campos estén directamente en el formulario */
    }

    .bdc-campo {
        flex: 1 1 auto;
        min-width: 100px; /* Ancho mínimo para cada campo */
    }

    .bdc-campo-especialidad {
        flex: 1.5 1 auto; /* Especialidad ocupa un poco más de espacio */
    }

    /* Barra de vista en móvil - cada elemento en su propia línea */
    .bdc-view-tabs {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .bdc-view-tabs > div,
    .bdc-view-tabs > button {
        width: 100%;
    }

    .bdc-view-tabs button {
        width: 100%;
    }

    button#bdc-buscar-direccion,
    button#bdc-buscar-direccion-home {
        width: 100% !important;
    }

    .bdc-campo select,
    .bdc-campo input[type="text"],
    .bdc-boton-buscar {
        font-size: 14px;
    }

    .bdc-resultados-container {
        padding: 20px 15px;
    }

    .bdc-resultados-titulo {
        font-size: 22px;
    }

    .bdc-resultados-subtitulo {
        font-size: 14px;
    }

    /* Cards verticales en móvil */
    .bdc-clinica-card-horizontal {
        flex-direction: column;
        gap: 15px;
    }

    .bdc-clinica-imagen {
        width: 100%;
        height: 200px;
    }

    .bdc-clinica-info {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 15px;
    }

    .bdc-clinica-tratamientos {
        width: 100%;
    }

    .bdc-tratamientos-lista,
    .bdc-sin-tratamientos {
        grid-template-columns: 1fr;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .bdc-tratamientos-lista.active,
    .bdc-sin-tratamientos.active {
        max-height: 2000px; /* Altura suficiente para mostrar todos los tratamientos */
    }

    .bdc-toggle-tratamientos {
        display: block !important; /* Mostrar el botón en móvil */
    }

    .bdc-tratamientos-titulo {
        font-size: 18px;
        cursor: pointer;
    }

    .bdc-btn-mas-info {
        width: 100%;
    }

    /* Estilos para el campo de dirección en móvil - ajustar al espacio disponible */
    .bdc-campo-direccion {
        min-width: 150px;
    }

    .bdc-autocomplete-dropdown {
        max-height: 200px;
    }
}

/* Responsive intermedio */
@media (max-width: 1024px) and (min-width: 769px) {
    .bdc-clinica-tratamientos {
        width: 220px;
    }

    .bdc-tratamientos-lista {
        gap: 4px;
    }

    .bdc-tratamiento-item {
        font-size: 12px;
    }
}

/* Asegurar ancho de botones de búsqueda en desktop */
@media (min-width: 769px) {
    button#bdc-buscar-direccion,
    button#bdc-buscar-direccion-home {
        width: 115px !important;
        white-space: nowrap !important;
    }
}

/* Estilos de paginación */
.bdc-paginacion {
    margin-top: 40px;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bdc-pag-boton {
    padding: 10px 20px;
    background: #82b927;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.bdc-pag-boton:hover {
    background: #6fa01f;
    transform: translateY(-2px);
}

.bdc-pag-boton-disabled {
    padding: 10px 20px;
    background: #ccc;
    color: #666;
    border-radius: 4px;
    font-weight: 600;
    cursor: not-allowed;
}

.bdc-pag-numero {
    padding: 8px 12px;
    background: white;
    color: #82b927;
    border: 2px solid #82b927;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.bdc-pag-numero:hover {
    background: #82b927;
    color: white;
    transform: translateY(-2px);
}

.bdc-pag-actual {
    padding: 8px 12px;
    background: #82b927;
    color: white;
    border: 2px solid #82b927;
    border-radius: 4px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .bdc-paginacion {
        gap: 5px;
    }

    .bdc-pag-boton,
    .bdc-pag-boton-disabled {
        padding: 8px 15px;
        font-size: 14px;
    }

    .bdc-pag-numero,
    .bdc-pag-actual {
        padding: 6px 10px;
        font-size: 14px;
    }
}
