/**
 * QuestAbierto - Estilos Principales
 * Archivo: styles.css
 * 
 * Contiene todos los estilos base de la aplicación:
 * - Layout y estructura
 * - Componentes del mapa
 * - Modales y overlays
 * - Botones y controles
 * - Filtros y sidebar
 * - Responsive design
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    background: #f8f9fa;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 15px 20px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.header .logo {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Filtro de rubros */
.filter-panel {
    position: fixed;
    top: 80px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 15px;
    padding: 15px;
    z-index: 1000;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    max-width: 500px;
    margin: 0 auto;
}

.filter-panel label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.filter-panel select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-panel select:focus {
    outline: none;
    border-color: #2563eb;
    background-color: white;
}

/* Botón de mi ubicación */
.location-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.location-btn:active {
    transform: scale(0.95);
}

.location-btn i {
    font-size: 24px;
    color: #2563eb;
}

/* Botón instalar PWA */
.install-btn {
    position: fixed;
    bottom: 90px; /* Arriba del menú inferior (70px + 20px margen) */
    left: 50%; /* Centrar horizontalmente */
    transform: translateX(-50%); /* Ajustar para centrado perfecto */
    max-width: 200px; /* Reducido de 500px a 200px */
    margin: 0;
    padding: 12px 16px; /* Reducir padding */
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px; /* Reducir tamaño de fuente */
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3);
    z-index: 1000;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.install-btn i {
    font-size: 16px; /* Reducir icono */
}

/* Leyenda */
.legend {
    position: fixed;
    bottom: 90px; /* Arriba del menú inferior (70px + 20px margen) */
    left: 20px;
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    font-size: 13px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.open {
    background: #10b981;
}

.legend-dot.closed {
    background: #ef4444;
}

/* Modal de información del negocio */
.negocio-modal {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    background: white;
    border-radius: 25px 25px 0 0;
    padding: 25px 20px;
    z-index: 2000;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    max-height: 70vh;
    overflow-y: auto;
    max-width: 500px;
    width: 90%;
}

.negocio-modal.show {
    transform: translate(-50%, 0);
}

.negocio-modal .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #64748b;
    transition: all 0.2s;
}

.negocio-modal .close-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.negocio-modal .handle {
    width: 40px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 3px;
    margin: 0 auto 20px;
}

/* Estilos específicos para modal de contacto */
#modalContacto {
    max-width: 400px;
    text-align: center;
}

#modalContacto .info-item {
    justify-content: center;
}

.negocio-modal h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
}

.negocio-modal .estado-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.negocio-modal .estado-badge.abierto {
    background: #d1fae5;
    color: #065f46;
}

.negocio-modal .estado-badge.cerrado {
    background: #fee2e2;
    color: #991b1b;
}

.info-item {
    margin: 12px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-item i {
    font-size: 18px;
    color: #2563eb;
    width: 24px;
    margin-top: 2px;
}

.info-item .text {
    flex: 1;
    color: #475569;
    line-height: 1.6;
}

.promociones-list {
    margin: 15px 0;
}

.promocion-item {
    background: #f1f5f9;
    padding: 12px 15px;
    border-radius: 10px;
    margin: 8px 0;
    border-left: 4px solid #2563eb;
}

.promocion-item .desc {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.promocion-item .valor {
    color: #059669;
    font-weight: 700;
    font-size: 16px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-action {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-action:active {
    transform: scale(0.98);
}

.btn-primary-custom {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.btn-secondary-custom {
    background: #f1f5f9;
    color: #475569;
}

/* Overlay oscuro para modal */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
}

.overlay.show {
    display: block;
}

/* Menu inferior */
.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 10px 20px;
    z-index: 1001;
    display: flex;
    justify-content: space-around;
}

.menu-item {
    text-align: center;
    color: #64748b;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s;
}

.menu-item i {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
}

.menu-item span {
    font-size: 11px;
    display: block;
}

.menu-item:hover {
    background: #f1f5f9;
    color: #2563eb;
}
