/**
 * Device Control - Estilos
 * 
 * Estilos base para el sistema de detección de dispositivos
 * Los overlays y mensajes se estilizarán aquí
 */

/* ============================================
   UTILIDADES GENERALES
   ============================================ */

/* Ocultar elementos en móvil */
.device-mobile .hide-on-mobile {
    display: none !important;
}

/* Ocultar elementos en tablet */
.device-tablet .hide-on-tablet {
    display: none !important;
}

/* Ocultar elementos en desktop */
.device-desktop .hide-on-desktop {
    display: none !important;
}

/* Mostrar solo en móvil */
.show-only-mobile {
    display: none !important;
}
.device-mobile .show-only-mobile {
    display: block !important;
}

/* Mostrar solo en tablet */
.show-only-tablet {
    display: none !important;
}
.device-tablet .show-only-tablet {
    display: block !important;
}

/* Mostrar solo en desktop */
.show-only-desktop {
    display: none !important;
}
.device-desktop .show-only-desktop {
    display: block !important;
}

/* ============================================
   OVERLAY BASE (para futuras fases)
   ============================================ */

.device-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.device-overlay.active {
    display: flex;
    opacity: 1;
}

.device-overlay-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    max-width: 90%;
    width: 500px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.device-overlay-icon {
    font-size: 60px;
    margin-bottom: 20px;
    display: block;
}

.device-overlay-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.device-overlay-message {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   DEBUG MODE (cuando esté activo)
   ============================================ */

.device-debug-info {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 12px;
    font-family: monospace;
    z-index: 999998;
    display: none;
}

.device-debug-mode .device-debug-info {
    display: block;
}

.device-debug-info p {
    margin: 5px 0;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media screen and (max-width: 767px) {
    .device-overlay-content {
        padding: 20px;
        width: 95%;
    }
    
    .device-overlay-icon {
        font-size: 50px;
    }
    
    .device-overlay-title {
        font-size: 20px;
    }
    
    .device-overlay-message {
        font-size: 14px;
    }
}
/* ========================================
   OVERLAY DE ORIENTACIÓN (TABLETS)
   ======================================== */

/* Overlay específico para tablets en portrait */
body.device-tablet.device-portrait.device-blocked .device-overlay {
    display: flex !important;
}

/* Estilos específicos para el mensaje de rotación */
body[data-block-reason="rotate_device"] .device-overlay-content {
    max-width: 500px;
    animation: gentleShake 2s ease-in-out infinite;
}

/* Icono de rotación animado */
body[data-block-reason="rotate_device"] .device-overlay-icon {
    animation: rotateIcon 3s ease-in-out infinite;
}

@keyframes rotateIcon {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-15deg) scale(1.1);
    }
    50% {
        transform: rotate(0deg) scale(1);
    }
    75% {
        transform: rotate(15deg) scale(1.1);
    }
}

@keyframes gentleShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Transición suave al girar */
.device-overlay {
    transition: opacity 0.3s ease-in-out;
}

body.device-tablet.device-landscape .device-overlay {
    opacity: 0;
    pointer-events: none;
}