@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;700&display=swap');

/* Regras específicas para a view Aplications */
/* Ocultar scrollbar do navegador (body/html) - ES5 Compatible */
body[data-view="aplications"] {
    overflow: hidden; /* Previne scroll no body */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE e Edge */
    height: 100vh;
    width: 100%;
}

body[data-view="aplications"]::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Ocultar scrollbar do html também quando na view de aplicações */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE e Edge */
    overflow: hidden; /* Previne scroll no html */
}

html::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

body[data-view="aplications"] .container {
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    display: block;
    position: relative;
    /* IE9 não suporta Flexbox - usar alternativa */
    /* Overlay opacity only on the background: 35% */
    background: linear-gradient(rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.70)), url('../../assets/backgrounds/background-home-blur.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body[data-view="aplications"] .main-content {
    margin-left: 120px;
    font-family: 'Inter', sans-serif;
    padding: 32px 0px 60px 24px;
    /* IE9: 100vh = altura da tela, menos 104px do header não é crítico, usar apenas 100vh ou valor fixo */
    min-height: 100vh;
    /* Scroll vertical compatível com ES5 - permite descer até embaixo com controle */
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    max-height: 100vh;
    /* Ocultar scrollbars - ES5 Compatible */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE e Edge */
}

/* Ocultar scrollbar no WebKit (Chrome, Safari) - ES5 Compatible */
body[data-view="aplications"] .main-content::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Ocultar todas as scrollbars na tela de aplicações - ES5 Compatible */
body[data-view="aplications"] * {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE e Edge */
}

body[data-view="aplications"] *::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Ocultar scrollbar no container principal */
body[data-view="aplications"] .container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body[data-view="aplications"] .container::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Container fixo para exibir exceções - por cima de tudo - TELA INTEIRA */
body[data-view="aplications"] .error-exception-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important;
    background: rgba(0, 0, 0, 0.98) !important;
    border: 3px solid #ff6b6b !important;
    padding: 20px 24px !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    display: none; /* Oculto por padrão, será mostrado quando houver erro */
    font-family: 'Courier New', monospace !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #ff6b6b !important;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5) !important;
    box-sizing: border-box !important;
}

body[data-view="aplications"] .error-exception-container.visible {
    display: block !important;
}

body[data-view="aplications"] .error-exception-container .error-title {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #ff6b6b !important;
    margin-bottom: 16px !important;
    text-transform: uppercase !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid #ff6b6b !important;
}

body[data-view="aplications"] .error-exception-container .error-content {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    color: #ff9999 !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    padding: 8px 0 !important;
}

body[data-view="aplications"] .error-exception-container .error-close {
    position: fixed !important;
    top: 16px !important;
    right: 20px !important;
    background: #ff6b6b !important;
    color: #000 !important;
    border: 2px solid #ff0000 !important;
    padding: 8px 16px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: bold !important;
    border-radius: 6px !important;
    z-index: 100000 !important;
    min-width: 40px !important;
    min-height: 40px !important;
}

body[data-view="aplications"] .error-exception-container .error-close:hover {
    background: #ff9999 !important;
}

.section-title {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 16px;
    color: #ffffff;
    letter-spacing: 1;
}

.section-title:not(:first-of-type) {
    margin-top: 50px;
}

/* Mosaico de imagens app_thumbnail - ES5 compatível */
.thumbnail-mosaic {
    display: block;
    width: 100%;
    margin: 20px 0;
    padding: 0;
}

.thumbnail-mosaic-item {
    display: inline-block;
    width: 120px;
    height: 120px;
    margin: 8px;
    padding: 0;
    vertical-align: top;
    position: relative;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
}

.thumbnail-mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    border: none;
    /* Forçar exibição mesmo se houver problemas de CORS */
    image-rendering: auto;
}

/* Proporções para monitor e televisão */

/* Notebook (até 1366px) - Base já configurada acima */

/* Monitor (1367px a 1919px) */
@media (min-width: 1367px) and (max-width: 1919px) {
    body[data-view="aplications"] .main-content {
        margin-left: 140px;
        padding-bottom: 70px;
        padding-left: 48px;
        overflow-y: auto;
        overflow-x: hidden;
        height: 100vh;
        max-height: 100vh;
        /* Ocultar scrollbars */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    body[data-view="aplications"] .main-content::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .section-title:not(:first-of-type) {
        margin-top: 60px;
    }
}

/* Televisão (acima de 1920px) */
@media (min-width: 1920px) {
    body[data-view="aplications"] .main-content {
        margin-left: 160px;
        padding-bottom: 90px;
        padding-left: 80px;
        overflow-y: auto;
        overflow-x: hidden;
        height: 100vh;
        max-height: 100vh;
        /* Ocultar scrollbars */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    body[data-view="aplications"] .main-content::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    body[data-view="aplications"] .section-title {
        font-size: 34px;
        margin-bottom: 32px;
        font-weight: 300;
    }



    .section-title:not(:first-of-type) {
        margin-top: 75px;
        margin-bottom: 30px;
    }
}