/* ============================================
   NS-GMaps Frontend Styles
   Version: 0.0.19
   ============================================ */

/* ========== RESET Y AISLAMIENTO CSS ========== */
.ns-gmaps-plugin-container,
.ns-gmaps-plugin-container *,
.ns-gmaps-plugin-container *::before,
.ns-gmaps-plugin-container *::after {
    box-sizing: border-box !important;
}

/* Variables CSS */
.ns-gmaps-plugin-container {
    --ns-border: #e2e8f0;
    --ns-text: #1f2937;
    --ns-muted: #6b7280;
    --ns-shadow: 0 12px 32px rgba(0,0,0,.05);
    --ns-radius: 16px;
    --ns-bg: #fff;
    --ns-btn-bg: #1a73e8;
    --ns-btn-text: #fff;
    
    /* Fuentes - se establecen desde las configuraciones */
    font-family: var(--ns-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #1f2937 !important;
    background: transparent !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ns-gmaps-wrapper {
    --ns-border: #e2e8f0;
    --ns-text: #1f2937;
    --ns-muted: #6b7280;
    --ns-shadow: 0 12px 32px rgba(0,0,0,.05);
    --ns-radius: 16px;
    --ns-bg: #fff;
    --ns-btn-bg: #1a73e8;
    --ns-btn-text: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
    font-size: 16px !important;
    color: #1f2937 !important;
    background: transparent !important;
}

/* ========== CARRUSEL STYLES ========== */
.ns-gmaps-display-carousel {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
}

.ns-gmaps-display-carousel.splide {
    position: relative;
    margin-bottom: 48px;
    width: 100% !important;
    max-width: 100% !important;
    isolation: isolate;
    overflow: visible !important;
}

.ns-gmaps-display-carousel .splide__track {
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
}

.ns-gmaps-display-carousel .splide__list {
    display: flex !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    align-items: stretch !important;
}

.ns-gmaps-display-carousel .splide__slide {
    box-sizing: border-box !important;
    height: auto !important;
    display: flex !important;
    align-items: stretch !important;
    position: relative !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.ns-gmaps-display-carousel .splide__slide .ns-gmaps-review-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    height: 100% !important;
    min-height: 280px;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* Flechas: contenedor a pantalla completa (Splide posiciona respecto al carrusel) */
.ns-gmaps-display-carousel.splide .splide__arrows {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 40 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ns-gmaps-display-carousel .splide__arrow {
    position: absolute !important;
    z-index: 41 !important;
    pointer-events: auto !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Alineación por defecto: CENTRO (solo si no hay clase de alineación) */
.ns-gmaps-display-carousel.ns-arrows-align-center .splide__arrow,
.ns-gmaps-display-carousel[data-arrows-alignment="center"] .splide__arrow {
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
}

/* Alineación CENTER - más específica */
.ns-gmaps-display-carousel.ns-arrows-align-center .splide__arrow,
.ns-gmaps-display-carousel.ns-arrows-align-center .splide__arrow--prev,
.ns-gmaps-display-carousel.ns-arrows-align-center .splide__arrow--next,
.ns-gmaps-display-carousel[data-arrows-alignment="center"] .splide__arrow,
.ns-gmaps-display-carousel[data-arrows-alignment="center"] .splide__arrow--prev,
.ns-gmaps-display-carousel[data-arrows-alignment="center"] .splide__arrow--next {
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Alineación TOP - más específica */
.ns-gmaps-display-carousel.ns-arrows-align-top .splide__arrow,
.ns-gmaps-display-carousel.ns-arrows-align-top .splide__arrow--prev,
.ns-gmaps-display-carousel.ns-arrows-align-top .splide__arrow--next,
.ns-gmaps-display-carousel[data-arrows-alignment="top"] .splide__arrow,
.ns-gmaps-display-carousel[data-arrows-alignment="top"] .splide__arrow--prev,
.ns-gmaps-display-carousel[data-arrows-alignment="top"] .splide__arrow--next {
    top: 20px !important;
    bottom: auto !important;
    transform: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Alineación BOTTOM - más específica */
.ns-gmaps-display-carousel.ns-arrows-align-bottom .splide__arrow,
.ns-gmaps-display-carousel.ns-arrows-align-bottom .splide__arrow--prev,
.ns-gmaps-display-carousel.ns-arrows-align-bottom .splide__arrow--next,
.ns-gmaps-display-carousel[data-arrows-alignment="bottom"] .splide__arrow,
.ns-gmaps-display-carousel[data-arrows-alignment="bottom"] .splide__arrow--prev,
.ns-gmaps-display-carousel[data-arrows-alignment="bottom"] .splide__arrow--next {
    bottom: 14px !important;
    top: auto !important;
    transform: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Posición horizontal según configuración usando clases */
.ns-gmaps-display-carousel.ns-arrows-pos-inside .splide__arrow--prev {
    left: 12px !important;
    right: auto !important;
}

.ns-gmaps-display-carousel.ns-arrows-pos-inside .splide__arrow--next {
    right: 12px !important;
    left: auto !important;
}

.ns-gmaps-display-carousel.ns-arrows-pos-outside .splide__arrow--prev {
    left: 0 !important;
    right: auto !important;
}

.ns-gmaps-display-carousel.ns-arrows-pos-outside .splide__arrow--next {
    right: 0 !important;
    left: auto !important;
}

/* Agregar padding cuando las flechas están fuera */
.ns-gmaps-display-carousel.ns-arrows-pos-outside {
    padding-left: 52px !important;
    padding-right: 52px !important;
    overflow: visible !important;
}

.ns-gmaps-display-carousel.ns-arrows-pos-outside.ns-arrows-align-bottom .splide__arrow,
.ns-gmaps-display-carousel.ns-arrows-pos-outside[data-arrows-alignment="bottom"] .splide__arrow {
    bottom: 52px !important;
    top: auto !important;
    transform: none !important;
}

.elementor-widget-shortcode .ns-gmaps-plugin-container,
.elementor-element .ns-gmaps-display-carousel.splide {
    overflow: visible !important;
}

.ns-gmaps-display-carousel .splide__arrow svg {
    fill: var(--ns-arrows-color, var(--ns-primary-color, #1a73e8)) !important;
    width: 22px !important;
    height: 22px !important;
}

.ns-gmaps-display-carousel .splide__arrow:hover {
    background: #fff !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Ocultar flechas si está desactivado */
.ns-gmaps-display-carousel[data-show-arrows="0"] .splide__arrows,
.ns-gmaps-display-carousel[data-show-arrows="0"] .splide__arrow {
    display: none !important;
}

/* Paginación (puntos) */
.ns-gmaps-display-carousel .splide__pagination {
    bottom: -32px !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 8px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 40 !important;
    pointer-events: auto !important;
}

.ns-gmaps-display-carousel .splide__pagination__page {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #d1d5db !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

.ns-gmaps-display-carousel .splide__pagination__page.is-active {
    background: var(--ns-primary-color, #1a73e8) !important;
    width: 10px !important;
    height: 10px !important;
}

/* ========== REVIEW CARDS ========== */
.ns-gmaps-review-card {
    background: var(--ns-bg) !important;
    border: 1px solid var(--ns-border) !important;
    border-radius: var(--ns-radius) !important;
    box-shadow: var(--ns-shadow) !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    transition: box-shadow 0.2s ease !important;
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
    position: relative !important;
    text-align: left !important;
}

.ns-gmaps-review-card:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,.08) !important;
}

/* ========== HEADER Y META ========== */
.ns-gmaps-header {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.ns-gmaps-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.ns-gmaps-avatar img {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.ns-gmaps-avatar-fallback {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
    z-index: 1 !important;
}

.ns-gmaps-meta {
    line-height: 1.3 !important;
    font-size: 14px !important;
    flex: 1;
    min-width: 0;
}

.ns-gmaps-name {
    font-weight: 600 !important;
    font-size: var(--ns-font-size-name, 14px) !important;
    font-family: var(--ns-font-family, inherit) !important;
    color: var(--ns-text) !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    display: block !important;
}

.ns-gmaps-rating {
    font-size: var(--ns-font-size-rating, 13px) !important;
    font-family: var(--ns-font-family, inherit) !important;
    line-height: 1.3 !important;
    display: block !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    font-weight: normal !important;
}

.ns-gmaps-rating-filled {
    color: #f5a623 !important;
    display: inline-block !important;
}

.ns-gmaps-rating-empty {
    color: #e5e7eb !important;
    display: inline-block !important;
}

.ns-gmaps-date {
    font-size: var(--ns-font-size-date, 12px) !important;
    font-family: var(--ns-font-family, inherit) !important;
    color: var(--ns-muted) !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    display: block !important;
    font-weight: normal !important;
    line-height: 1.3 !important;
}

.ns-gmaps-text {
    font-size: var(--ns-font-size-text, 14px) !important;
    font-family: var(--ns-font-family, inherit) !important;
    line-height: 1.55 !important;
    color: var(--ns-text) !important;
    margin: 12px 0 0 0 !important;
    padding: 0 !important;
    flex: 1 1 auto !important;
    overflow-wrap: break-word !important;
}

.ns-gmaps-text-clamp {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: var(--ns-text-lines, 5) !important;
    overflow: hidden !important;
}

.ns-gmaps-review-card.is-expanded .ns-gmaps-text-clamp {
    -webkit-line-clamp: unset !important;
    display: block !important;
}

.ns-gmaps-read-more {
    align-self: flex-start !important;
    margin: 10px 0 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--ns-primary-color, #1a73e8) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}

.ns-gmaps-read-more:hover {
    opacity: 0.85 !important;
}

.ns-gmaps-card-footer {
    margin-top: auto !important;
    padding-top: 14px !important;
    border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
}

.ns-gmaps-google-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    color: var(--ns-muted) !important;
    font-weight: 500 !important;
}

.ns-gmaps-google-g {
    flex-shrink: 0 !important;
}

/* ========== DISEÑO: ELEVATED (default) ========== */
.ns-gmaps-design-elevated .ns-gmaps-review-card,
.ns-gmaps-card-elevated {
    border-top: 3px solid var(--ns-primary-color, #1a73e8) !important;
    padding: 18px 18px 14px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%) !important;
}

/* ========== DISEÑO: QUOTE / TESTIMONIAL ========== */
.ns-gmaps-design-quote .ns-gmaps-review-card,
.ns-gmaps-card-quote {
    position: relative !important;
    padding: 22px 20px 16px !important;
    background: #f8fafc !important;
    border: 1px solid #e8edf3 !important;
    border-left: 4px solid var(--ns-primary-color, #1a73e8) !important;
    box-shadow: none !important;
}

.ns-gmaps-card-quote .ns-gmaps-quote-icon {
    position: absolute !important;
    top: 8px !important;
    right: 14px !important;
    font-size: 52px !important;
    line-height: 1 !important;
    color: rgba(26, 115, 232, 0.16) !important;
    color: color-mix(in srgb, var(--ns-primary-color, #1a73e8) 18%, transparent) !important;
    font-family: Georgia, "Times New Roman", serif !important;
    pointer-events: none !important;
}

.ns-gmaps-card-quote .ns-gmaps-header {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 10px !important;
}

.ns-gmaps-card-quote .ns-gmaps-avatar {
    width: 56px !important;
    height: 56px !important;
}

.ns-gmaps-card-quote .ns-gmaps-avatar img {
    width: 56px !important;
    height: 56px !important;
}

.ns-gmaps-card-quote .ns-gmaps-meta {
    width: 100% !important;
}

.ns-gmaps-card-quote .ns-gmaps-text {
    text-align: center !important;
    font-style: italic !important;
    color: #334155 !important;
}

.ns-gmaps-card-quote .ns-gmaps-card-footer {
    border-top: none !important;
    padding-top: 8px !important;
    text-align: center !important;
    width: 100% !important;
}

.ns-gmaps-card-quote .ns-gmaps-google-badge {
    justify-content: center !important;
}

/* ========== DISEÑO: GOOGLE ========== */
.ns-gmaps-design-google .ns-gmaps-review-card,
.ns-gmaps-card-google {
    padding: 0 0 14px 0 !important;
    border: 1px solid #dadce0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.15), 0 2px 6px rgba(60, 64, 67, 0.08) !important;
}

.ns-gmaps-google-stripe {
    height: 4px !important;
    width: 100% !important;
    background: linear-gradient(90deg, #4285F4 0%, #EA4335 33%, #FBBC04 66%, #34A853 100%) !important;
}

.ns-gmaps-card-google .ns-gmaps-header,
.ns-gmaps-card-google .ns-gmaps-text,
.ns-gmaps-card-google .ns-gmaps-read-more,
.ns-gmaps-card-google .ns-gmaps-card-footer {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

.ns-gmaps-card-google .ns-gmaps-header {
    margin-top: 14px !important;
}

.ns-gmaps-card-google .ns-gmaps-rating-filled {
    color: #FBBC04 !important;
}

.ns-gmaps-card-google .ns-gmaps-card-footer {
    border-top-color: #eceff1 !important;
}

/* ========== DISEÑO: SHOWCASE (panel + 3 tarjetas) ========== */
.ns-gmaps-showcase {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 0 !important;
    font-family: var(--ns-font-family, inherit) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    background: #f5f7fa !important;
}

.ns-gmaps-showcase-sidebar {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 28px 24px 32px !important;
    background: var(--ns-showcase-sidebar-bg, #0a5082) !important;
    color: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    text-align: left !important;
}

.ns-gmaps-showcase-brand {
    margin-bottom: 12px !important;
    line-height: 1.15 !important;
}

.ns-gmaps-showcase-google-word {
    display: block !important;
    font-size: 28px !important;
    font-weight: 500 !important;
    letter-spacing: -0.02em !important;
    color: #fff !important;
}

.ns-gmaps-showcase-reviews-word {
    display: block !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #fff !important;
    margin-top: 2px !important;
}

.ns-gmaps-showcase-aggregate-stars {
    font-size: 22px !important;
    letter-spacing: 2px !important;
    color: #fff !important;
    margin: 8px 0 6px !important;
}

.ns-gmaps-showcase-aggregate-meta {
    margin: 0 0 16px !important;
    font-size: 13px !important;
    opacity: 0.92 !important;
}

.ns-gmaps-showcase-intro {
    margin: 0 0 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    max-width: 280px !important;
}

.ns-gmaps-showcase-cta {
    display: inline-block !important;
    padding: 12px 22px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: transform 0.2s, opacity 0.2s !important;
}

.ns-gmaps-showcase-cta:hover {
    opacity: 0.92 !important;
    transform: scale(1.03) !important;
}

.ns-gmaps-showcase-cards {
    flex: 1 1 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 20px 16px 24px !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
}

.ns-gmaps-showcase-card {
    background: #fff !important;
    border-radius: 14px !important;
    padding: 20px 18px 16px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid #e8eaed !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    min-height: 100% !important;
}

.ns-gmaps-showcase-card-title {
    margin: 0 0 6px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #202124 !important;
    line-height: 1.3 !important;
}

.ns-gmaps-showcase-card-date {
    margin: 0 0 10px !important;
    font-size: 12px !important;
    color: #5f6368 !important;
}

.ns-gmaps-showcase-card-stars {
    margin-bottom: 12px !important;
    font-size: 14px !important;
}

.ns-gmaps-showcase-card-stars .ns-gmaps-rating-filled {
    color: #fbbc04 !important;
}

.ns-gmaps-showcase-card-body {
    text-align: center !important;
    color: #3c4043 !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    width: 100% !important;
}

.ns-gmaps-showcase-card-g {
    margin-top: auto !important;
    padding-top: 14px !important;
}

@media (min-width: 900px) {
    .ns-gmaps-showcase-sidebar {
        flex: 0 0 260px !important;
        max-width: 260px !important;
        min-height: 320px !important;
    }

    .ns-gmaps-showcase-cards {
        flex: 1 1 0 !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        padding: 24px 20px !important;
    }
}

@media (min-width: 768px) and (max-width: 899px) {
    .ns-gmaps-showcase-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Flechas más discretas en carrusel Elementor */
.ns-gmaps-display-carousel .splide__arrow {
    backdrop-filter: blur(4px) !important;
}

/* ========== EMPTY STATE ========== */
.ns-gmaps-empty-state {
    text-align: center !important;
    padding: 40px 20px !important;
    background: #f9fafb !important;
    border-radius: var(--ns-radius) !important;
    border: 2px dashed var(--ns-border) !important;
}

.ns-gmaps-empty-state-icon {
    font-size: 48px !important;
    margin-bottom: 16px !important;
}

.ns-gmaps-empty-state h3 {
    margin: 0 0 8px 0 !important;
    color: var(--ns-text) !important;
    font-size: 18px !important;
}

.ns-gmaps-empty-state p {
    margin: 0 !important;
    color: var(--ns-muted) !important;
    font-size: 14px !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
    .ns-gmaps-display-carousel .splide__arrow {
        width: 36px !important;
        height: 36px !important;
    }
    
    .ns-gmaps-display-carousel .splide__arrow svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    .ns-gmaps-review-card {
        padding: 12px !important;
    }
}
