/* estilos base originales */
html,
body {
    background-color: #ffffff;
    font-family: "Georgia", serif;
}

.ol-control>* {
    background-color: #f8f8f8 !important;
    color: #444444 !important;
    border-radius: 0px;
}

.ol-attribution a,
.gcd-gl-input::placeholder,
.search-layer-input-search::placeholder {
    color: #444444 !important;
}

.search-layer-input-search {
    background-color: #f8f8f8 !important;
}

.ol-control>*:focus,
.ol-control>*:hover {
    background-color: rgba(248, 248, 248, 0.7) !important;
}

.ol-control {
    background-color: rgba(255, 255, 255, .4) !important;
    padding: 2px !important;
}

html,
body,
#map {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

/* Botones flotantes (estilos) */
.map-style-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 9999;
    background: rgba(30, 30, 30, 0.7);
    border-radius: 6px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: "Roboto", "Helvetica", Arial, sans-serif;
}

.map-style-buttons button {
    width: 42px;
    height: 42px;
    padding: 6px;
    border: none;
    background: #303030;
    color: white;
    cursor: pointer;
    border-radius: 6px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.map-style-buttons button:hover {
    background: #4a4a4a;
}

.map-style-buttons button.active {
    background: #1976d2;
}

.map-style-buttons i {
    pointer-events: none;
}

/* asegurar que los controles no queden sobre la modal */
.ol-control {
    z-index: 9980 !important;
}

/* Modal / Material card styles */
/* overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 10050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 11, 11, 0.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
}

/* card */
.modal-card {
    background: #ffffff;
    color: #222;
    width: 96%;
    height: 80vh;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    font-family: "Roboto", "Helvetica", Arial, sans-serif;
    animation: materialIn .18s ease;
}

@keyframes materialIn {
    from {
        transform: translateY(8px) scale(.995);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* left: gallery */
.modal-gallery {
    width: 60%;
    min-width: 260px;
    background: #121212;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal-gallery img {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-nav {
    position: absolute;
    left: 6px;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.gallery-nav button {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* right: content */
.modal-body {
    padding: 18px;
    flex: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.modal-title {
    font-size: 18px;
    font-weight: 500;
    color: #111;
}

.modal-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.modal-actions button {
    border: none;
    background: #1976d2;
    color: white;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

/* tabs */
.modal-tabs {
    margin-top: 12px;
}

.tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

.tabs-nav button {
    background: transparent;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
    font-size: 14px;
}

.tabs-nav button.active {
    color: #111;
    box-shadow: inset 0 -2px 0 #1976d2;
}

.tab-content {
    margin-top: 12px;
    height: 100%;
    overflow: auto;
    font-size: 14px;
    color: #333;
}

.prop-row {
    margin-bottom: 8px;
}

.prop-key {
    color: #666;
    font-weight: 600;
    margin-right: 8px;
}

.prop-val {
    color: #222;
}

/* responsive */
@media (max-width: 900px) {
    .modal-card {
        flex-direction: column;
        width: 94%;
    }

    .modal-gallery {
        width: 100%;
        min-height: 220px;
    }

    .modal-body {
        padding: 12px;
    }
}

/* CSS para thumbs y contador */
/* mini thumbnails bajo la imagen principal */
.modal-thumb-row {
  display:none; /*flex*/
  gap:6px;
  margin-top:8px;
  align-items:center;
  padding: 8px;
  overflow-x: auto;
}
.modal-thumb-row img {
  width:56px;
  height:40px;
  object-fit:cover;
  border-radius:4px;
  cursor:pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border: 2px solid transparent;
}
.modal-thumb-row img.active {
  border-color: #1976d2;
}

/* contador */
.modal-counter {
  font-size: 13px;
  color: rgba(255,255,255,0.9);
  position: absolute;
  left: 8px;
  top: 8px;
  background: rgba(0,0,0,0.35);
  padding: 5px 8px;
  border-radius: 14px;
}

.modal-gallery { position:relative; }


      @media (max-width: 900px) {
        .modal-card {
          flex-direction: column;
          width: 94%;
        }
        .modal-gallery {
          width: 100%;
          min-height: 220px;
          overflow: auto;
        }
        .modal-body {
          padding: 12px;
        }
      }
      @media (max-width: 430px) {
        .modal-card {
          width: 100%;
          margin: 0;
          border-radius: 0;
        }
        .modal-gallery img {
          max-height: 47vh;
          overflow: auto;
        }
        .modal-thumb-row img {
          width: 48px;
          height: 32px;
        }
        .tabs-nav button {
          font-size: 11px;
          padding: 6px 2px;
        }
        .modal-body {
          font-size: 13px;
        }
      }


      .com-logo-wrap{
        text-align: center;
        margin-top: 20px;
        margin-bottom: 12px;
      }

      .com-logo-wrap img{
        max-height: 200px;
      }

.highlight-match {
    background: #ffe066;
    border-radius: 3px;
    padding: 0 2px;
}
