/* search-drawer.css - Google Maps Premium Aesthetic */

:root {
    --google-blue: #4B2883;
    /* Take violet */
    --google-blue-hover: #3B1F66;
    --google-blue-text: #4B2883;
    --google-gray-700: #3c4043;
    --google-gray-600: #70757a;
    --google-gray-200: #dadce0;
    --google-gray-100: #f1f3f4;
    --drawer-width: 360px;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.search-drawer {
    width: var(--drawer-width);
    max-width: var(--drawer-width);
    height: 100%;
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-right: 1px solid var(--google-gray-200);
    border-radius: 0;
    overflow: hidden;
    z-index: 50;
    transition: transform 0.25s cubic-bezier(0, 0, 0.2, 1);
    will-change: transform;
    font-family: var(--font-primary);
    display: flex;
    flex-direction: column;
}


.search-drawer__container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


/* Header al estilo Google - fondo blanco y tipografía limpia */
.search-drawer__header {
    padding: 1rem 1.25rem;
    background: #ffffff;
    color: var(--google-gray-700);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    z-index: 20;
    border-bottom: 1px solid var(--google-gray-200);
    flex-shrink: 0;
    min-height: 64px;
}


.search-drawer__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--google-gray-700);
}

.search-drawer__close {
    padding: 0.5rem;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--google-gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.search-drawer__close:hover {
    background: var(--google-gray-100);
}

.search-drawer__body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    display: block;
    /* Cambio de flex a block para evitar problemas de amontonamiento en scroll */
    -webkit-overflow-scrolling: touch;
    height: 100%;
}


.search-drawer__body::-webkit-scrollbar {
    width: 8px;
}

.search-drawer__body::-webkit-scrollbar-thumb {
    background: #bdc1c6;
    border-radius: 10px;
}

/* Hero image - ocupando todo el ancho superior */
.search-hero {
    position: relative;
    width: 100%;
    height: 180px;
    background: var(--google-gray-100);
    overflow: hidden;
}

.search-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Contenido Principal */
.search-main-info {
    padding: 1.25rem;
    border-bottom: 1px solid var(--google-gray-200);
}

.search-eyebrow {
    font-size: 0.75rem;
    color: var(--google-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.search-title-large {
    font-size: 1.5rem;
    font-weight: 400;
    color: #202124;
    margin: 0 0 0.5rem 0;
}

/* Acciones rápidas estilo Google Maps */
.search-quick-actions {
    display: flex;
    padding: 0.75rem 1.25rem;
    gap: 1.5rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--google-gray-200);
    scrollbar-width: none;
}

.search-quick-actions::-webkit-scrollbar {
    display: none;
}

.search-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2px;
    background: none;
    border: none;
    cursor: pointer;
    min-width: 60px;
}

.search-action-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--google-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--google-blue);
    transition: background 0.2s, border-color 0.2s;
}

.search-action-item:hover .search-action-circle {
    background: #f5f0fb;
    border-color: var(--google-blue);
}

.search-action-label {
    font-size: 0.75rem;
    color: var(--google-blue-text);
    font-weight: 500;
}

/* Secciones de Información */
.search-info-row {
    display: flex;
    align-items: flex-start;
    padding: 0.875rem 1.25rem;
    gap: 1.25rem;
    transition: background 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.search-info-row:hover {
    background: var(--google-gray-100);
}

.search-info-icon {
    width: 24px;
    height: 24px;
    color: var(--google-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-info-content {
    font-size: 0.875rem;
    color: var(--google-gray-700);
    line-height: 1.4;
    word-break: break-word;
}

.search-info-divider {
    height: 1px;
    background: var(--google-gray-200);
    margin-left: 4.5rem;
    /* Alineado con el inicio del texto */
}

/* Horarios al estilo Google Maps */
.search-hours-section {
    padding: 1.25rem;
    border-bottom: 1px solid var(--google-gray-200);
}

.search-hours-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.search-hours-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--google-gray-700);
    margin: 0;
}

.search-hours-status {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.search-hours-status.open {
    background: #e8f5e8;
    color: #2e7d32;
}

.search-hours-status.closed {
    background: #ffebee;
    color: #c62828;
}

.search-hours-status.info {
    background: #e8f0fe;
    color: #1a73e8;
}

.search-hours-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-hours-body {
    border-radius: 10px;
    overflow: hidden;
}

.search-hours-toggle {
    width: 100%;
    background: #f8f9fa;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--google-gray-700);
    font-size: 0.875rem;
}

.search-hours-toggle:hover {
    background: var(--google-gray-100);
}

.search-hours-summary strong {
    margin-right: 0.35rem;
}

.search-hours-chevron {
    transition: transform 0.2s ease;
}

.search-hours-toggle.expanded .search-hours-chevron {
    transform: rotate(180deg);
}

.search-hours-body.collapsed .search-hours-list {
    display: none;
}

.search-hours-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-radius: 4px;
    transition: background 0.2s;
}

.search-hours-item:hover {
    background: var(--google-gray-100);
}

.search-hours-item.today {
    background: #f5f0fb;
    font-weight: 500;
}

.search-hours-day {
    font-size: 0.875rem;
    color: var(--google-gray-700);
    min-width: 80px;
}

.search-hours-time {
    font-size: 0.875rem;
    color: var(--google-gray-600);
}

.search-hours-item.closed .search-hours-time {
    color: var(--google-gray-600);
    font-style: italic;
}

.search-hours-item.missing .search-hours-time {
    color: var(--google-gray-600);
    font-style: italic;
}

.search-hours-empty {
    font-size: 0.875rem;
    color: var(--google-gray-600);
    margin: 0.5rem 0 0;
}

/* Galería al estilo Grid lateral */
.search-gallery-section {
    padding: 1.25rem;
}

.search-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.search-gallery-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--google-gray-100);
    cursor: pointer;
}

.search-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
}

.search-gallery-item:hover img {
    opacity: 0.8;
}

/* Footer de alternativas */
.search-alt-section {
    background: var(--google-gray-100);
    padding: 1.25rem;
    margin-top: 0;
    border-top: 1px solid var(--google-gray-200);
}

.search-alt-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    border: 1px solid var(--google-gray-200);
}

.search-alt-card:hover {
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
}

/* Responsive Móvil - Google Maps Bottom Sheet */
@media (max-width: 768px) {
    .search-drawer {
        width: 100vw;
        max-width: 100vw;
        background: #ffffff;
        border-radius: 1rem 1rem 0 0;
        border-right: none;
        border-top: none;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        bottom: 0;
        top: auto;
        height: auto;
        min-height: 120px;
    }

    .search-drawer::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 32px;
        height: 4px;
        background: var(--google-gray-200);
        border-radius: 2px;
        z-index: 20;
    }

    /* Estados móviles */
    .search-drawer.-translate-x-full {
        transform: translateY(100%) !important;
    }

    .search-drawer[data-state="peek"] {
        transform: translateY(calc(100% - 120px));
        overflow: hidden;
    }

    .search-drawer[data-state="expanded"] {
        transform: translateY(0);
        height: 100vh;
    }

    .search-drawer__header {
        padding: 1.5rem 1rem 1rem;
        border-radius: 1rem 1rem 0 0;
    }

    .search-hero {
        height: 140px;
    }
}

/* Cluster Modal Styles Removed */

/* Fullscreen Image Preview Styles */
.fullscreen-image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.fullscreen-image-viewer.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.fullscreen-image-viewer__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100002;
    transition: all 0.2s ease;
}

.fullscreen-image-viewer__close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.fullscreen-image-viewer__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    transition: all 0.2s ease;
}

.fullscreen-image-viewer__nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.fullscreen-image-viewer__nav.prev {
    left: 20px;
}

.fullscreen-image-viewer__nav.next {
    right: 20px;
}

.fullscreen-image-viewer__counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.fullscreen-image-viewer__content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.fullscreen-image-viewer__content img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
}

.fullscreen-image-viewer.show .fullscreen-image-viewer__content img {
    transform: scale(1);
}

@media (max-width: 768px) {
    .fullscreen-image-viewer__nav {
        width: 44px;
        height: 44px;
    }

    .fullscreen-image-viewer__nav.prev {
        left: 10px;
    }

    .fullscreen-image-viewer__nav.next {
        right: 10px;
    }

    .fullscreen-image-viewer__content {
        padding: 20px;
    }
}



.search-gallery-item img {
    transition: opacity 0.2s, transform 0.2s;
}

.search-gallery-item:hover img {
    opacity: 0.9;
    transform: scale(1.02);
}
