@charset "UTF-8";

/* ==========================================
   ONCONCEPT - PRODUCT PORTFOLIO
   Transformação da tabela em cartões
   Sem alterações ao HTML
========================================== */

/* Container da tabela */
body table:has(tbody td:nth-child(4)) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: transparent !important;
    margin: 35px 0 !important;
    overflow: visible !important;
}

/* Esconder cabeçalho original */
body table:has(tbody td:nth-child(4)) thead {
    display: none !important;
}

/* Grelha de cartões */
body table:has(tbody td:nth-child(4)) tbody {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px !important;
    width: 100% !important;
}

/* Cada linha passa a ser um cartão */
body table:has(tbody td:nth-child(4)) tbody tr {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border: 1px solid #e5edf3 !important;
    border-radius: 12px !important;
    padding: 25px 24px !important;
    margin: 0 !important;
    box-shadow: 0 3px 14px rgba(20, 65, 100, 0.045) !important;
    transition: transform .3s ease,
                box-shadow .3s ease,
                border-color .3s ease !important;
}

/* Efeito hover */
body table:has(tbody td:nth-child(4)) tbody tr:hover {
    transform: translateY(-4px);
    border-color: #e74f3d !important;
    box-shadow: 0 9px 25px rgba(20, 65, 100, 0.10) !important;
}

/* Reset das células */
body table:has(tbody td:nth-child(4)) tbody td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
    vertical-align: top !important;
    line-height: 1.5 !important;
}

/* 1 - INN: nome do princípio ativo */
body table:has(tbody td:nth-child(4)) tbody td:nth-child(1) {
    color: #e74f3d !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 16px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid #eaf0f4 !important;
}

/* 2 - Reference Product */
body table:has(tbody td:nth-child(4)) tbody td:nth-child(2) {
    color: #506779 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 14px !important;
}

body table:has(tbody td:nth-child(4)) tbody td:nth-child(2)::before {
    content: "REFERENCE PRODUCT";
    display: block;
    color: #91a5b3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

/* 3 - Strength / Dosage Form */
body table:has(tbody td:nth-child(4)) tbody td:nth-child(3) {
    color: #315e7a !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin-bottom: 16px !important;
}

body table:has(tbody td:nth-child(4)) tbody td:nth-child(3)::before {
    content: "STRENGTH | DOSAGE FORM";
    display: block;
    color: #91a5b3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 7px;
}

/* 4 - Indication */
body table:has(tbody td:nth-child(4)) tbody td:nth-child(4) {
    color: #637684 !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
    margin-top: auto !important;
    padding-top: 13px !important;
    border-top: 1px solid #eaf0f4 !important;
}

body table:has(tbody td:nth-child(4)) tbody td:nth-child(4)::before {
    content: "INDICATION";
    display: block;
    color: #91a5b3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

/* Links dentro dos cartões */
body table:has(tbody td:nth-child(4)) tbody td a {
    color: #e74f3d !important;
    text-decoration: none !important;
}

/* Tablet */
@media (max-width: 991px) {
    body table:has(tbody td:nth-child(4)) tbody {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px !important;
    }

    body table:has(tbody td:nth-child(4)) tbody tr {
        padding: 22px !important;
    }
}

/* Mobile */
@media (max-width: 575px) {
    body table:has(tbody td:nth-child(4)) tbody {
        grid-template-columns: 1fr;
        gap: 14px !important;
    }

    body table:has(tbody td:nth-child(4)) tbody tr {
        padding: 22px !important;
        border-radius: 10px !important;
    }

    body table:has(tbody td:nth-child(4)) tbody td:nth-child(1) {
        font-size: 18px !important;
    }
}

