.cda-wrapper {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin: 20px 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Panel izquierdo */
.cda-lista {
    flex: 0 0 32%;
    max-width: 32%;
    background: #f6f6f6;
    border-radius: 12px;
    padding: 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 600px;              /* 👈 altura fija compartida con el mapa */
}

/* Panel derecho (mapa) */
.cda-mapa {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    height: 600px;              /* 👈 misma altura que la lista */
    min-height: 600px;
}

#cda-mapa {
    width: 100%;
    height: 100%;               /* 👈 llena la altura de .cda-mapa */
}

.cda-filtros {
    margin-bottom: 10px;
}

.cda-filtros label {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
    font-weight: 600;
}

.cda-filtros select {
    width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.cda-lista-centros {
    overflow-y: auto;
    flex: 1;                    /* 👈 ocupa todo el alto disponible dentro de la caja */
    padding-right: 4px;
}

.cda-centro-item {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    border-left: 3px solid transparent;
}

.cda-centro-item:hover {
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border-left-color: #f5c34c; /* una franja amarilla similar a tu diseño */
}

.cda-centro-thumb {
    flex: 0 0 70px;
    max-width: 70px;
    height: 60px;
    overflow: hidden;
    border-radius: 6px;
    background: #ddd;
}

.cda-centro-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cda-centro-info {
    flex: 1;
    font-size: 14px;
}

.cda-centro-info h4 {
    margin: 0 0 4px;
    font-size: 14px;
}

.cda-centro-dir,
.cda-centro-tel,
.cda-centro-horario,
.cda-centro-materiales {
    margin: 0;
    line-height: 1.3;
}

.cda-centro-materiales {
    margin-top: 4px;
    font-size: 11px;
    color: #555;
}

/* Popup flotante tipo modal */

.cda-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.cda-popup-visible {
    display: flex;
}

.cda-popup-inner {
    background: #fff;
    border-radius: 16px;
    max-width: 640px;
    width: 90%;
    max-height: 80vh;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    position: relative;
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
}

/*.cda-popup-close {
    position: absolute;
    top: 12px !important;
    right: 12px !important;
    background: transparent !important; 
    border: 1px solid #ccc !important;  
    color: #555 !important;             
    border-radius: 50% !important;      
    width: 30px !important;
    height: 30px !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer;
    box-shadow: none !important;
    transition: all 0.2s ease;
}*/

.cda-popup-close:hover {
    background: #f6f6f6 !important;
    border-color: #999 !important;
    color: #000 !important;
}

.cda-popup-card {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.cda-popup-img {
    flex: 0 0 210px;
    max-width: 210px;
    border-radius: 12px;
    overflow: hidden;
}

.cda-popup-img img {
    width: 100%;
    height: auto;
    display: block;
}

.cda-popup-text {
    flex: 1;
    font-size: 14px;
}

.cda-popup-text h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 20px;
}

.cda-popup-text p {
    margin: 4px 0;
}

.cda-popup-buttons {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cda-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border: none;
}

.cda-btn-gmaps {
    background: #ffffff;
    border: 1px solid #ccc;
}

.cda-btn-waze {
    background: #06c4ff;
    color: #fff;
}

.cda-material-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.cda-material-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

h3 {
color: black;
}

/* Responsive */

@media (max-width: 900px) {
    .cda-wrapper {
        flex-direction: column;
    }

    .cda-lista {
        max-width: 100%;
        height: auto;
    }

    .cda-mapa {
        height: 300px;
        min-height: 300px;
    }
}

/* ========================================================
   Botón de cerrar del popup (BLINDADO)
======================================================== */
body #cda-popup .cda-popup-inner button.cda-popup-close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    background-color: transparent !important;
    background: transparent !important;
    border: 1px solid #ccc !important;
    color: #555 !important;
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 18px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

body #cda-popup .cda-popup-inner button.cda-popup-close:hover {
    background-color: #f6f6f6 !important;
    background: #f6f6f6 !important;
    border-color: #999 !important;
    color: #000 !important;
}

/* ========================================================
   Reseteo de controles de Google Maps (BLINDADO)
======================================================== */
body .cda-wrapper .cda-mapa #cda-mapa .gm-style button {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #565656 !important;
    border: none !important;
    border-radius: 2px !important;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px !important;
    text-transform: none !important;
    font-weight: 500 !important;
    min-width: auto !important;
}

body .cda-wrapper .cda-mapa #cda-mapa .gm-style button:hover {
    background-color: #ebebeb !important;
    background: #ebebeb !important;
    color: #000000 !important;
}

body .cda-wrapper .cda-mapa #cda-mapa .gm-style .gmnoprint, 
body .cda-wrapper .cda-mapa #cda-mapa .gm-style .gmnoprint div {
    color: inherit !important;
}