/* mobile-modal.css – Estilos exclusivos para el modal en móvil (ancho < 768px) */
/* Basado en los colores inactivos de toggle-buttons (sin azules ni borde inferior) */

/* Contenedor principal del modal (inicialmente oculto) */
.mobile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* Fondo semitransparente y blur (similar al modal de tipo de cambio) */
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* Modal visible (se agrega con JS) */
.mobile-modal.show {
    visibility: visible;
    opacity: 1;
}

/* Caja del modal */
.mobile-modal-content {
    position: relative;
    width: calc(100% - 20px);   /* 10px a cada lado */
    max-width: 500px;
    margin: 25px auto 5px auto;  /* 25px arriba, 5px abajo, centrado horizontal */
    height: auto;                /* altura automática según contenido */
    max-height: calc(100% - 30px); /* respeta los 25px arriba + 5px abajo */
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border: 2px solid #0087ff;
    overflow-y: hidden;         /* Scroll solo en la columna izquierda */
    display: flex;
    flex-direction: column;
}

/* Botón de cierre (siempre visible en móvil) - TONO AZULADO */
.modal-close-btn-2 {
    position: absolute;
    top: auto;           /* <-- ESTA ES LA CLAVE PARA DESANCLARLO DE ARRIBA */
    bottom: 15px;         /* <-- AQUÍ LO ANCLAS ABAJO */
    right: 10px;
    font-size: 31px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
	background: #00acff;          
    color: #fff;               
    border-radius: 50%;
    border: 1px solid #fff;
    transition: all 0.2s ease;
}
.modal-close-btn-2:hover {
    background: #e0eaff;
    color: #0066cc;
    border-color: rgba(0, 135, 255, 0.6);
}

/* Contenedor interno flex de dos columnas */
.modal-container {
    display: flex;
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;  /* Para que el scroll funcione correctamente */
}

.modal-left {
    flex: 3;                    /* 3/4 del ancho */
    background: #f8f9fc;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 1.15rem;
    color: #1e2a3e;
    text-align: left;
    overflow-y: auto;           /* Scroll vertical solo aquí */
    min-height: 0;
}

.modal-left p {
    margin: 0 0 12px 0;
    line-height: 1.5;
    font-size: 1.15rem;
}

/* Contenedor para mantener texto y botón en la misma línea */
.inline-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

/* Botón de WhatsApp: color verde original, sombra verde 45° izquierda abajo */
.modal-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #128C7E;      /* Verde original de WhatsApp */
    color: white !important;
    border: none;
    padding: 8px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: background 0.3s;
    text-decoration: none;
    line-height: normal;
    /* Sombra verde, 45° hacia abajo e izquierda */
    box-shadow: -2px 2px 4px rgba(37, 211, 102, 0.4);
}

.modal-whatsapp-btn:hover {
    background: #25D366;      /* Hover más oscuro (verde WhatsApp oscuro) */
    box-shadow: -2px 2px 6px rgba(37, 211, 102, 0.5);
}

/* Botón de visitar sitio web: sombra grisácea suave 45° izquierda abajo */
.modal-visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2c3e50;
    color: white !important;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s;
    text-decoration: none;
    line-height: normal;
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15);
}

.modal-visit-btn:hover {
    background: #1a252f;
    box-shadow: -2px 2px 6px rgba(0, 0, 0, 0.2);
}

.modal-whatsapp-btn i,
.modal-visit-btn i {
    font-size: 1.6rem;
    vertical-align: middle;
}

/* Enlace para "El Incorruptible" */
.law-firm-link {
    color: #0087ff;
    font-weight: bold;
    text-decoration: none;
}
.law-firm-link:hover {
    text-decoration: underline;
}

/* Número de teléfono como enlace de llamada */
.phone-link {
    text-decoration: underline;
    text-underline-offset: 2px;
    color: #0087ff;
    font-weight: bold;
}

.stars {
    color: #ffb400;
    font-size: 1.4rem;
    margin: 8px 0;
    letter-spacing: 2px;
}

/* Saludo: texto y manita en la misma línea, la mano se mueve */
.greeting {
    font-weight: bold;
    margin-top: 12px;
    font-size: 1.3rem;
    text-align: center;
    color: #0a4b6e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

/* La manita con animación de movimiento horizontal */
.waving-hand {
    display: inline-block;
    animation: waveHand 1.2s ease-in-out infinite;
    transform-origin: center center;
    font-size: 1.5rem;
}

@keyframes waveHand {
    0% {
        transform: translateX(0px) rotate(0deg);
    }
    50% {
        transform: translateX(4px) rotate(5deg);
    }
    100% {
        transform: translateX(0px) rotate(0deg);
    }
}

.highlight-text {
    color: #0087ff;
    font-weight: bold;
}

.modal-right {
    flex: 1;                    /* 1/4 del ancho */
    background: #eef2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lawyer-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Sin animación, imagen estática */
}

/* Modo oscuro: botones siguen la paleta oscura de toggle-buttons, sin azules ni bordes */
body.dark-mode .mobile-modal-content,
body.night-mode .mobile-modal-content {
    background: #1e1e2a;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #0087ff;
}
body.dark-mode .modal-left {
    background: #2a2a3a;
    color: #e0e0f0;
}
body.dark-mode .greeting {
    color: #8bcbff;
}
body.dark-mode .modal-right {
    background: #1f1f2f;
}
body.dark-mode .highlight-text,
body.dark-mode .law-firm-link,
body.dark-mode .phone-link {
    color: #5cb0ff;
}

/* Modo oscuro: botón WhatsApp mantiene su color original (verde) para buena visibilidad */
body.dark-mode .modal-whatsapp-btn {
    background: #25D366;
    color: #ffffff !important;
    border: none;
    box-shadow: -2px 2px 4px rgba(37, 211, 102, 0.5);
}
body.dark-mode .modal-whatsapp-btn:hover {
    background: #128C7E;
    box-shadow: -2px 2px 6px rgba(37, 211, 102, 0.7);
}

/* Modo oscuro: botón visitar sitio web */
body.dark-mode .modal-visit-btn {
    background: #3a4a5f;
    color: #ffffff !important;
    border: none;
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.3);
}
body.dark-mode .modal-visit-btn:hover {
    background: #2a3647;
    box-shadow: -2px 2px 6px rgba(0, 0, 0, 0.4);
}

/* Modo oscuro: botón de cierre con tono azulado oscuro */
body.dark-mode .modal-close-btn-2,
body.night-mode .modal-close-btn-2 {
    background: #2a3a5a;
    color: #ddd;
    border: 1px solid #ddd;
}

body.dark-mode .modal-close-btn-2:hover,
body.night-mode .modal-close-btn-2:hover {
    background: #1f2c46;
    color: #aac9ff;
    border-color: rgba(139, 185, 255, 0.6);
}

/* Ajustes para móviles muy pequeños (ancho < 480px) */
@media (max-width: 480px) {
    .mobile-modal-content {
        width: calc(100% - 20px);
        max-height: calc(100% - 30px);
        margin: 25px auto 5px auto;
    }
    .modal-left {
        padding: 14px 12px;
        font-size: 1rem;
    }
    .modal-left p {
        font-size: 1rem;
    }
    .stars {
        font-size: 1.25rem;
    }
    .greeting {
        font-size: 1.2rem;
    }
    .waving-hand {
        font-size: 1.5rem;
        animation-duration: 1.5s;
    }
    @keyframes waveHand {
        0% { transform: translateX(0px) rotate(0deg); }
        50% { transform: translateX(3px) rotate(3deg); }
        100% { transform: translateX(0px) rotate(0deg); }
    }
    .modal-close-btn-2 {
        top: auto;       /* <-- TAMBIÉN DEBES PONER ESTO AQUÍ */
        bottom: 12px;
        right: 8px;
        font-size: 28px;
        width: 32px;
        height: 32px;
    }
    .modal-whatsapp-btn,
    .modal-visit-btn {
        font-size: 1.2rem;
        padding: 6px 30px;
    }
    .modal-whatsapp-btn i,
    .modal-visit-btn i {
        font-size: 1.3rem;
    }
    .inline-buttons {
        flex-wrap: wrap;
        gap: 6px;
    }
}