/* Painted elements table from 9 cell pieces (corners, edges, inner).
   Paint sits on ::before so we can lift it without bleaching the text/symbols.
   Scoped to html.aa-look-painted so Simple look keeps the flat table. */

html.aa-look-painted .chart-container #result table.natal-elements-modality-table,
html.aa-look-painted #person1Positions table.natal-elements-modality-table,
html.aa-look-painted #person2Positions table.natal-elements-modality-table {
    border: none !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
    background-image: none !important;
}

html.aa-look-painted .chart-container #result table.natal-elements-modality-table thead tr,
html.aa-look-painted #person1Positions table.natal-elements-modality-table thead tr,
html.aa-look-painted #person2Positions table.natal-elements-modality-table thead tr {
    background: transparent !important;
    background-image: none !important;
}

html.aa-look-painted .chart-container #result table.natal-elements-modality-table thead th,
html.aa-look-painted .chart-container #result table.natal-elements-modality-table tbody td,
html.aa-look-painted .chart-container #result table.natal-elements-modality-table tbody tr:last-child td,
html.aa-look-painted .chart-container #result table.natal-elements-modality-table tbody tr:last-child td:first-child,
html.aa-look-painted #person1Positions table.natal-elements-modality-table thead th,
html.aa-look-painted #person1Positions table.natal-elements-modality-table tbody td,
html.aa-look-painted #person1Positions table.natal-elements-modality-table tbody tr:last-child td,
html.aa-look-painted #person1Positions table.natal-elements-modality-table tbody tr:last-child td:first-child,
html.aa-look-painted #person2Positions table.natal-elements-modality-table thead th,
html.aa-look-painted #person2Positions table.natal-elements-modality-table tbody td,
html.aa-look-painted #person2Positions table.natal-elements-modality-table tbody tr:last-child td,
html.aa-look-painted #person2Positions table.natal-elements-modality-table tbody tr:last-child td:first-child {
    position: relative;
    z-index: 0;
    box-sizing: border-box;
    box-shadow: none !important;
    vertical-align: middle;
    border: none !important;
    border-image: none !important;
    background: #ffffff !important;
    background-image: none !important;
}

/* Painted layer as exported. Tiny lift only (tune brightness). */
html.aa-look-painted .chart-container #result table.natal-elements-modality-table thead th::before,
html.aa-look-painted .chart-container #result table.natal-elements-modality-table tbody td::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table thead th::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table tbody td::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table thead th::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table tbody td::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    filter: brightness(1.04);
}

/* Default: inner cell */
html.aa-look-painted .chart-container #result table.natal-elements-modality-table thead th::before,
html.aa-look-painted .chart-container #result table.natal-elements-modality-table tbody td::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table thead th::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table tbody td::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table thead th::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table tbody td::before {
    background-image: url('images/elements-cell-center.png?v=15');
}

/* Top row */
html.aa-look-painted .chart-container #result table.natal-elements-modality-table thead th:nth-child(1),
html.aa-look-painted #person1Positions table.natal-elements-modality-table thead th:nth-child(1),
html.aa-look-painted #person2Positions table.natal-elements-modality-table thead th:nth-child(1) {
    min-height: 3.6rem;
}
html.aa-look-painted .chart-container #result table.natal-elements-modality-table thead th:nth-child(1)::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table thead th:nth-child(1)::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table thead th:nth-child(1)::before {
    background-image: url('images/elements-cell-tl.png?v=15');
}

html.aa-look-painted .chart-container #result table.natal-elements-modality-table thead th:nth-child(2),
html.aa-look-painted .chart-container #result table.natal-elements-modality-table thead th:nth-child(3),
html.aa-look-painted #person1Positions table.natal-elements-modality-table thead th:nth-child(2),
html.aa-look-painted #person1Positions table.natal-elements-modality-table thead th:nth-child(3),
html.aa-look-painted #person2Positions table.natal-elements-modality-table thead th:nth-child(2),
html.aa-look-painted #person2Positions table.natal-elements-modality-table thead th:nth-child(3) {
    min-height: 3.6rem;
}
html.aa-look-painted .chart-container #result table.natal-elements-modality-table thead th:nth-child(2)::before,
html.aa-look-painted .chart-container #result table.natal-elements-modality-table thead th:nth-child(3)::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table thead th:nth-child(2)::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table thead th:nth-child(3)::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table thead th:nth-child(2)::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table thead th:nth-child(3)::before {
    background-image: url('images/elements-cell-top.png?v=15');
}

html.aa-look-painted .chart-container #result table.natal-elements-modality-table thead th:nth-child(4),
html.aa-look-painted #person1Positions table.natal-elements-modality-table thead th:nth-child(4),
html.aa-look-painted #person2Positions table.natal-elements-modality-table thead th:nth-child(4) {
    min-height: 3.6rem;
}
html.aa-look-painted .chart-container #result table.natal-elements-modality-table thead th:nth-child(4)::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table thead th:nth-child(4)::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table thead th:nth-child(4)::before {
    background-image: url('images/elements-cell-tr.png?v=15');
}

/* Left column (Fire / Earth / Air) */
html.aa-look-painted .chart-container #result table.natal-elements-modality-table tbody tr:not(:last-child) td:first-child::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table tbody tr:not(:last-child) td:first-child::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table tbody tr:not(:last-child) td:first-child::before {
    background-image: url('images/elements-cell-left.png?v=15');
}

/* Right column (not last row) */
html.aa-look-painted .chart-container #result table.natal-elements-modality-table tbody tr:not(:last-child) td:last-child::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table tbody tr:not(:last-child) td:last-child::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table tbody tr:not(:last-child) td:last-child::before {
    background-image: url('images/elements-cell-right.png?v=15');
}

/* Bottom row */
html.aa-look-painted .chart-container #result table.natal-elements-modality-table tbody tr:last-child td:first-child::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table tbody tr:last-child td:first-child::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table tbody tr:last-child td:first-child::before {
    background-image: url('images/elements-cell-bl.png?v=15');
}

html.aa-look-painted .chart-container #result table.natal-elements-modality-table tbody tr:last-child td:not(:first-child):not(:last-child)::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table tbody tr:last-child td:not(:first-child):not(:last-child)::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table tbody tr:last-child td:not(:first-child):not(:last-child)::before {
    background-image: url('images/elements-cell-bottom.png?v=15');
}

html.aa-look-painted .chart-container #result table.natal-elements-modality-table tbody tr:last-child td:last-child::before,
html.aa-look-painted #person1Positions table.natal-elements-modality-table tbody tr:last-child td:last-child::before,
html.aa-look-painted #person2Positions table.natal-elements-modality-table tbody tr:last-child td:last-child::before {
    background-image: url('images/elements-cell-br.png?v=15');
}

html.aa-look-painted .chart-container #result table.natal-elements-modality-table tbody tr:last-child td,
html.aa-look-painted #person1Positions table.natal-elements-modality-table tbody tr:last-child td,
html.aa-look-painted #person2Positions table.natal-elements-modality-table tbody tr:last-child td {
    padding-bottom: 11px !important;
}

@media (max-width: 768px) {
    html.aa-look-painted .chart-container #result table.natal-elements-modality-table tbody tr:last-child td,
    html.aa-look-painted #person1Positions table.natal-elements-modality-table tbody tr:last-child td,
    html.aa-look-painted #person2Positions table.natal-elements-modality-table tbody tr:last-child td {
        padding-bottom: 5px !important;
    }
}
