/**
 * Tecnotron Mapas — estilos del frontend.
 * Namespaced con .fc-tecmap-* para no interferir con el tema.
 */

.fc-tecmap-wrap {
    --fc-tecmap-accent: #7c5cff;
    --fc-tecmap-accent-2: #5b8def;
    position: relative;
    margin: 0 0 1.5rem;
    font-family: inherit;
}

.fc-tecmap-title {
    margin: 0 0 .75rem;
    font-size: 1.25rem;
    line-height: 1.3;
}

/* Barra de búsqueda */
.fc-tecmap-searchbar {
    background: linear-gradient(180deg, #14121c 0%, #1b1830 100%);
    color: #fff;
    padding: 1rem 1rem 1.1rem;
    border-radius: 10px 10px 0 0;
    text-align: center;
}

.fc-tecmap-search-hint {
    font-size: .95rem;
    margin-bottom: .75rem;
    line-height: 1.45;
}

.fc-tecmap-search-sub {
    display: block;
    opacity: .8;
    font-size: .85rem;
    margin-top: .15rem;
}

.fc-tecmap-search-row {
    position: relative;
    display: flex;
    max-width: 640px;
    margin: 0 auto;
}

.fc-tecmap-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 42px;
    padding: 0 54px 0 .9rem; /* hueco a la derecha para el icono de ubicación */
    border: none;
    border-radius: 4px 0 0 4px;
    background: #fff;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.3;
}

.fc-tecmap-search-input:focus {
    outline: 2px solid var(--fc-tecmap-accent);
    outline-offset: -2px;
}

/* Icono "mi ubicación" superpuesto dentro del input, a la izquierda de Buscar */
.fc-tecmap-geo-btn {
    position: absolute;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    padding: 0;
    border: none;
    background-color: transparent;
    cursor: pointer;
    color: #5f6368;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border-radius: 50%;
    transition: background-color .2s ease, color .2s ease;
}

.fc-tecmap-geo-btn:hover {
    background-color: rgba(0, 0, 0, .06);
    color: #3c4043;
}

.fc-tecmap-geo-btn[disabled] {
    cursor: default;
}

.fc-tecmap-geo-icon {
    width: 24px;
    height: 24px;
    display: block;
}

/* Gira mientras se obtiene la ubicación */
.fc-tecmap-geo-btn.is-loading .fc-tecmap-geo-icon {
    animation: fc-tecmap-spin .9s linear infinite;
    transform-origin: 50% 50%;
}

@keyframes fc-tecmap-spin {
    to { transform: rotate(360deg); }
}

.fc-tecmap-search-btn {
    flex: 0 0 90px;
    height: 42px;
    padding: 0 10px;
    background-image: linear-gradient(75deg, rgb(158, 120, 238), rgb(96, 124, 253));
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
    transition: filter .15s ease;
}

.fc-tecmap-search-btn:hover {
    filter: brightness(1.06);
}

/* El mapa */
.fc-tecmap-map {
    width: 100%;
    min-height: 320px;
    border-radius: 0 0 10px 10px;
    background: #e9eef3;
    overflow: hidden;
}

.fc-tecmap-wrap:not(:has(.fc-tecmap-searchbar)) .fc-tecmap-map {
    border-radius: 10px;
}

/* Estado / avisos */
.fc-tecmap-status {
    margin-top: .6rem;
    font-size: .9rem;
    min-height: 1.2em;
    padding: .35rem .1rem;
}

.fc-tecmap-status.is-success {
    color: #15803d;
    font-weight: 600;
}

.fc-tecmap-status.is-error {
    color: #b91c1c;
    font-weight: 600;
}

.fc-tecmap-status.is-warn {
    color: #b45309;
}

.fc-tecmap-notice {
    padding: 1rem 1.25rem;
    border: 1px solid #e0c200;
    background: #fff8db;
    color: #6b5900;
    border-radius: 8px;
    font-size: .95rem;
}

/* ===== InfoWindow / tarjeta ===== */

/* Quitar el padding por defecto del InfoWindow para que la cabecera de color
   llegue a los bordes. Se limita al contexto del mapa del plugin. */
.fc-tecmap-map .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18) !important;
    overflow: hidden !important;
    max-width: 340px !important;
}

.fc-tecmap-map .gm-style-iw-d {
    overflow: auto !important;
    padding: 0 !important;
    max-height: 440px !important;
}

/* Botón de cierre visible sobre la cabecera de color */
.fc-tecmap-map .gm-style-iw-chr {
    position: absolute;
    top: 0;
    right: 0;
    height: auto;
    z-index: 3;
}

.fc-tecmap-map .gm-style-iw-chr button.gm-ui-hover-effect {
    background: rgba(255, 255, 255, .9) !important;
    border-radius: 50% !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    margin: 8px !important;
    opacity: 1 !important;
}

.fc-tecmap-map .gm-style-iw-chr button.gm-ui-hover-effect > span {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
}

.fc-tecmap-info {
    width: 300px;
    max-width: 82vw;
    font-size: .9rem;
    line-height: 1.45;
    color: #2b2b2b;
}

.fc-tecmap-info-head {
    background: linear-gradient(135deg, var(--fc-head-a, #6a4bd6) 0%, var(--fc-head-b, #4b30a0) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
    padding: .85rem 2.4rem .85rem 1rem;
}

.fc-tecmap-info-body {
    padding: .85rem 1rem 1rem;
}

/* Bloque superior: productos + imagen */
.fc-tecmap-info-top {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    margin-bottom: .55rem;
}

.fc-tecmap-info-prod {
    flex: 1 1 auto;
    min-width: 0;
}

.fc-tecmap-info-prod-title {
    font-weight: 700;
    color: #222;
    margin-bottom: .35rem;
    font-size: .9rem;
}

.fc-tecmap-info-star {
    color: var(--fc-accent, #7c5cff);
}

.fc-tecmap-info-prod-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fc-tecmap-info-prod-list li {
    position: relative;
    padding-left: 1.15rem;
    margin: .16rem 0;
    color: #444;
    font-size: .85rem;
}

.fc-tecmap-info-prod-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--fc-accent, #7c5cff);
    font-weight: 700;
}

.fc-tecmap-info-img.is-side {
    width: 86px;
    height: 108px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 8px;
}

.fc-tecmap-info-img.is-full {
    display: block;
    width: 100%;
    max-height: 190px;
    object-fit: contain;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: .6rem;
}

.fc-tecmap-info-tag {
    display: inline-block;
    border: 1px solid var(--fc-accent, #7c5cff);
    color: var(--fc-accent, #7c5cff);
    background: transparent;
    font-size: .68rem;
    font-weight: 700;
    padding: .1rem .5rem;
    border-radius: 999px;
    margin-bottom: .45rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.fc-tecmap-info-lines > * {
    display: block;
}

.fc-tecmap-info-addr {
    color: #1a1a1a;
    font-size: .92rem;
    margin-bottom: .1rem;
}

.fc-tecmap-info-den {
    color: #777;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.fc-tecmap-info-modelo {
    color: #555;
    font-size: .82rem;
}

.fc-tecmap-info-zona {
    color: #888;
    font-size: .8rem;
}

.fc-tecmap-info-dist {
    margin: .55rem 0 .1rem;
    color: #333;
    font-size: .88rem;
}

.fc-tecmap-info-pin {
    color: var(--fc-accent, #7c5cff);
}

.fc-tecmap-info-btn {
    display: block;
    text-align: center;
    margin-top: .7rem;
    padding: .62rem .8rem;
    background: linear-gradient(135deg, var(--fc-btn-a, #7c5cff) 0%, var(--fc-btn-b, #5b8def) 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: .92rem;
}

.fc-tecmap-info-btn:hover {
    filter: brightness(1.06);
}

/* Marca de agua "Diseñado por FastCore": discreta, justo DEBAJO del mapa, para
   no cubrir el logo de Google. */
.fc-tecmap-map-holder {
    position: relative;
    /* Reserva espacio para la etiqueta que cuelga bajo el mapa (top:100%). */
    margin-bottom: 22px;
}

.fc-tecmap-watermark {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background: rgba(26, 26, 26, .95);
    color: #a0a0a0 !important;
    font-size: 10px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
    opacity: .85;
    line-height: 1.2;
    white-space: nowrap;
    transition: opacity .2s ease, color .2s ease;
}

.fc-tecmap-watermark:hover {
    opacity: 1;
    color: #fff !important;
}

@media (max-width: 768px) {
    .fc-tecmap-watermark {
        font-size: 9px;
        padding: 3px 10px;
    }
}

/* ===== Admin: personalización por modelo ===== */
.fc-tecmap-model-block {
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 12px;
    margin: 0 0 12px;
    background: #fff;
    max-width: 760px;
}

.fc-tecmap-model-block-head {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.fc-tecmap-model-block-head input {
    flex: 1 1 auto;
}

.fc-tecmap-model-remove {
    color: #b32d2e;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    flex: 0 0 auto;
}

.fc-tecmap-model-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.fc-tecmap-model-grid > label {
    flex: 1 1 300px;
}

.fc-tecmap-model-grid > label > span,
.fc-tecmap-model-colors > label > span,
.fc-tecmap-model-prod > span {
    display: block;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
}

.fc-tecmap-model-colors {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.fc-tecmap-model-colors input[type="color"] {
    width: 48px;
    height: 30px;
    padding: 0;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    cursor: pointer;
}

.fc-tecmap-media {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fc-tecmap-media-preview {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dcdcde;
    flex: 0 0 auto;
}

.fc-tecmap-media-url {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 520px) {
    /* El icono de ubicación va superpuesto: la fila se mantiene en una sola línea. */
    .fc-tecmap-search-btn {
        flex-basis: 76px;
    }
    .fc-tecmap-geo-btn {
        right: 84px;
    }
}
