/* ============================================ */
/* DMARC DATATABLES - PROPER STRUCTURE FIX */
/* Standard table layout with DataTables */
/* ============================================ */

/* ============================================ */
/* CRITICAL: OVERRIDE ENFOLD THEME */
/* ============================================ */

/* Override Enfold's stripe CSS variables within our scope */
.dmarc-analyzer-wrapper {
    --enfold-socket-color-stripe:   #FFFFFF !important;
    --enfold-socket-color-stripe2:  #FFFFFF !important;
    --enfold-socket-color-stripe2nd:#FFFFFF !important;
    --enfold-footer-color-stripe:   #FFFFFF !important;
    --enfold-footer-color-stripe2:  #FFFFFF !important;
    --enfold-footer-color-stripe2nd:#FFFFFF !important;
    --enfold-alternate-color-stripe:   #FFFFFF !important;
    --enfold-alternate-color-stripe2:  #FFFFFF !important;
    --enfold-alternate-color-stripe2nd:#FFFFFF !important;
}

/* Hide DataTables default sort arrows on all headers */
.dmarc-analyzer-wrapper .dmarc-nested-table thead th.sorting:after,
.dmarc-analyzer-wrapper .dmarc-nested-table thead th.sorting:before,
.dmarc-analyzer-wrapper .dmarc-nested-table thead th.sorting_asc:after,
.dmarc-analyzer-wrapper .dmarc-nested-table thead th.sorting_asc:before,
.dmarc-analyzer-wrapper .dmarc-nested-table thead th.sorting_desc:after,
.dmarc-analyzer-wrapper .dmarc-nested-table thead th.sorting_desc:before {
    display: none !important;
    content: none !important;
}

/* Cursor pointer only on the sortable volume column */
.dmarc-analyzer-wrapper .dmarc-nested-table thead th.sorting,
.dmarc-analyzer-wrapper .dmarc-nested-table thead th.sorting_asc,
.dmarc-analyzer-wrapper .dmarc-nested-table thead th.sorting_desc {
    cursor: pointer !important;
}

/* FA caret injected by drawCallback */
.dmarc-analyzer-wrapper .dmarc-nested-table thead th .sort-caret {
    color: #5d78ff !important;
    font-size: 13px !important;
}

/* Disable Enfold's zebra striping on our tables — all rows white */
.dmarc-analyzer-wrapper .dmarc-nested-table tbody,
.dmarc-analyzer-wrapper .dmarc-nested-table tbody tr,
.dmarc-analyzer-wrapper .dmarc-nested-table tbody tr:nth-child(odd),
.dmarc-analyzer-wrapper .dmarc-nested-table tbody tr:nth-child(even),
.dmarc-analyzer-wrapper .main_color .dmarc-nested-table tbody tr:nth-child(odd),
.dmarc-analyzer-wrapper .main_color .dmarc-nested-table tbody tr:nth-child(even),
.main_color .dmarc-analyzer-wrapper .dmarc-nested-table tbody tr,
.main_color .dmarc-analyzer-wrapper .dmarc-nested-table tbody tr:nth-child(odd),
.main_color .dmarc-analyzer-wrapper .dmarc-nested-table tbody tr:nth-child(even) {
    background: #FFFFFF !important;
}

.dmarc-analyzer-wrapper .dmarc-nested-table tbody tr td,
.dmarc-analyzer-wrapper .dmarc-nested-table tbody tr:nth-child(odd) td,
.dmarc-analyzer-wrapper .dmarc-nested-table tbody tr:nth-child(even) td,
.main_color .dmarc-analyzer-wrapper .dmarc-nested-table tbody tr td,
.main_color .dmarc-analyzer-wrapper .dmarc-nested-table tbody tr:nth-child(odd) td,
.main_color .dmarc-analyzer-wrapper .dmarc-nested-table tbody tr:nth-child(even) td {
    background: #FFFFFF !important;
}

/* Kill doubled top/left borders — Enfold override */
.dmarc-analyzer-wrapper .dmarc-nested-table thead tr th,
.dmarc-analyzer-wrapper .dmarc-nested-table thead tr td,
.dmarc-analyzer-wrapper .dmarc-nested-table tbody tr th,
.dmarc-analyzer-wrapper .dmarc-nested-table tbody tr td,
.main_color .dmarc-analyzer-wrapper .dmarc-nested-table thead tr th,
.main_color .dmarc-analyzer-wrapper .dmarc-nested-table thead tr td,
.main_color .dmarc-analyzer-wrapper .dmarc-nested-table tbody tr th,
.main_color .dmarc-analyzer-wrapper .dmarc-nested-table tbody tr td {
    border-top:  none !important;
    border-left: none !important;
}

/* Disable Enfold borders */
.dmarc-analyzer-wrapper .dmarc-nested-table,
.dmarc-analyzer-wrapper .dmarc-nested-table *,
.main_color .dmarc-analyzer-wrapper .dmarc-nested-table,
.main_color .dmarc-analyzer-wrapper .dmarc-nested-table * {
    border-color: #E1E1EB !important;
}

/* ============================================ */
/* HIDE DATATABLES SIZING ROWS PROPERLY */
/* ============================================ */

.dmarc-analyzer-wrapper .dataTables_scrollBody thead,
.dmarc-analyzer-wrapper .dataTables_scrollHead thead tr:nth-child(2),
.dmarc-analyzer-wrapper thead tr[style*="height: 0"],
.dmarc-analyzer-wrapper thead tr[style*="height:0"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.dmarc-analyzer-wrapper .dataTables_sizing {
    display: none !important;
}

/* Hide duplicate icon tabs */
#category-tabs-icons,
.dmarc-analyzer-wrapper #category-tabs-icons {
    display: none !important;
}

/* ============================================ */
/* STANDARD TABLE STRUCTURE */
/* ============================================ */

.dmarc-analyzer-wrapper .dmarc-nested-table {
    width: 100% !important;
    display: table !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-family: 'Muli', 'Mulish', sans-serif !important;
    font-size: 13px !important;
    border: 1px solid #E1E1EB !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #FFFFFF !important;
}

.dmarc-analyzer-wrapper .dmarc-nested-table thead {
    display: table-header-group !important;
}

.dmarc-analyzer-wrapper .dmarc-nested-table tbody {
    display: table-row-group !important;
}

.dmarc-analyzer-wrapper .dmarc-nested-table thead tr,
.dmarc-analyzer-wrapper .dmarc-nested-table tbody tr {
    display: table-row !important;
}

.dmarc-analyzer-wrapper .dmarc-nested-table thead th,
.dmarc-analyzer-wrapper .dmarc-nested-table tbody td {
    display: table-cell !important;
}

/* ============================================ */
/* SCROLLING - SIMPLE WRAPPER APPROACH */
/* ============================================ */

.dmarc-analyzer-wrapper .dataTables_wrapper,
.dmarc-analyzer-wrapper .dataTables_scroll,
.dmarc-analyzer-wrapper .dataTables_scrollHead,
.dmarc-analyzer-wrapper .dataTables_scrollBody {
    overflow: visible !important;
    width: 100% !important;
}

.dmarc-analyzer-wrapper .l1-table-wrapper,
.dmarc-analyzer-wrapper .l2-container,
.dmarc-analyzer-wrapper .l3-container {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    scrollbar-width: thin !important;
    scrollbar-color: #cbd5e0 #f7f8fa !important;
}

.dmarc-analyzer-wrapper .l1-table-wrapper::-webkit-scrollbar,
.dmarc-analyzer-wrapper .l2-container::-webkit-scrollbar,
.dmarc-analyzer-wrapper .l3-container::-webkit-scrollbar {
    height: 8px !important;
}

.dmarc-analyzer-wrapper .l1-table-wrapper::-webkit-scrollbar-track,
.dmarc-analyzer-wrapper .l2-container::-webkit-scrollbar-track,
.dmarc-analyzer-wrapper .l3-container::-webkit-scrollbar-track {
    background: #f7f8fa !important;
    border-radius: 4px !important;
}

.dmarc-analyzer-wrapper .l1-table-wrapper::-webkit-scrollbar-thumb,
.dmarc-analyzer-wrapper .l2-container::-webkit-scrollbar-thumb,
.dmarc-analyzer-wrapper .l3-container::-webkit-scrollbar-thumb {
    background: #cbd5e0 !important;
    border-radius: 4px !important;
}

.dmarc-analyzer-wrapper .l1-table-wrapper::-webkit-scrollbar-thumb:hover,
.dmarc-analyzer-wrapper .l2-container::-webkit-scrollbar-thumb:hover,
.dmarc-analyzer-wrapper .l3-container::-webkit-scrollbar-thumb:hover {
    background: #5d78ff !important;
}

.dmarc-analyzer-wrapper #l1-table-compliant,
.dmarc-analyzer-wrapper #l1-table-forwarded,
.dmarc-analyzer-wrapper #l1-table-failed {
    min-width: 900px !important;
}

.dmarc-analyzer-wrapper .dmarc-l2-table {
    min-width: 900px !important;
}

.dmarc-analyzer-wrapper .dmarc-l3-table {
    min-width: 1800px !important;
}

/* ============================================ */
/* TAB BUTTONS */
/* ============================================ */

.dmarc-analyzer-wrapper .category-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 0 !important;    
    margin-bottom: 0 !important;
}

.dmarc-analyzer-wrapper .tab-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    border: 1px solid #E1E1EB !important;
    border-radius: 6px !important;
    background: #FFFFFF !important;
    border-bottom: 2px solid transparent !important;
    margin-bottom: -1px !important;
    font-family: 'Muli', 'Mulish', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #565D85 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.dmarc-analyzer-wrapper .tab-btn:hover {
    color: #5d78ff !important;
    border-color: #5d78ff !important;
    background: #F0F3FF !important;
}

.dmarc-analyzer-wrapper .tab-btn.active {
    color: #5d78ff !important;
    border-color: #5d78ff !important;
    background: #F0F3FF !important;
}

.dmarc-analyzer-wrapper .tab-btn-icon {
    width: 20px !important;
    height: 20px !important;
}

.dmarc-analyzer-wrapper .tab-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 22px !important;
    height: 20px !important;
    padding: 0 7px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: white !important;
}

/* ============================================ */
/* PORTLET */
/* ============================================ */

.dmarc-analyzer-wrapper .category-portlet {
    margin-top: 20px !important;
    background: #FFFFFF !important;
    border-radius: 8px !important;
    box-shadow: 0px 0px 13px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #E1E1EB !important;
}

.dmarc-analyzer-wrapper .kt-portlet__head {
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
    padding: 16px 20px !important;
    border-bottom: 1px solid #E1E1EB !important;
    display: flex !important;
    align-items: center !important;
    background: #FFFFFF !important;
}

.dmarc-analyzer-wrapper .kt-portlet__head-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-family: 'Muli', 'Mulish', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #565D85 !important;
    margin: 0 !important;
}

.dmarc-analyzer-wrapper .dmarc-status-icon {
    width: 24px !important;
    height: 24px !important;
}

.dmarc-analyzer-wrapper .kt-portlet__body {
    padding: 20px !important;
    overflow: visible !important;
    background: #FFFFFF !important;
}

/* ============================================ */
/* NESTED TABLE CONTAINERS */
/* ============================================ */

.dmarc-analyzer-wrapper .l2-container {
    background: #FFFFFF !important;
    border: 1px solid #E1E1EB !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin: 8px 0 !important;
}

.dmarc-analyzer-wrapper .l3-container {
    background: #FFFFFF !important;
    border: 1px solid #E1E1EB !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin: 8px 0 !important;
}

/* ============================================ */
/* TABLE HEADERS */
/* ============================================ */

.dmarc-analyzer-wrapper .dmarc-nested-table thead th {
    background: #FFFFFF !important;
    color: #565D85 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 12px 14px !important;
    border-top:    none !important;
    border-left:   none !important;
    border-bottom: 1px solid #E1E1EB !important;
    border-right:  1px solid #E1E1EB !important;
    text-align: left !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.dmarc-analyzer-wrapper .dmarc-nested-table thead th:last-child {
    border-right: none !important;
}

.dmarc-analyzer-wrapper .dmarc-l2-table thead th {
    background: #FFFFFF !important;
    font-size: 12px !important;
}

.dmarc-analyzer-wrapper .dmarc-l3-table thead th {
    background: #FFFFFF !important;
    font-size: 12px !important;
}

/* ============================================ */
/* TABLE BODY */
/* ============================================ */

.dmarc-analyzer-wrapper .dmarc-nested-table tbody td {
    color: #565D85 !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    padding: 12px 14px !important;
    border-top:    none !important;
    border-left:   none !important;
    border-bottom: 1px solid #E1E1EB !important;
    border-right:  1px solid #E1E1EB !important;
    vertical-align: middle !important;
    background: #FFFFFF !important;
}

.dmarc-analyzer-wrapper .dmarc-nested-table tbody td:last-child {
    border-right: none !important;
}

.dmarc-analyzer-wrapper .dmarc-nested-table tbody tr:last-child td {
    border-bottom: none !important;
}

.dmarc-analyzer-wrapper .dmarc-l3-table tbody td {
    font-size: 13px !important;
    padding: 10px 12px !important;
}

/* Zebra striping — all white */
.dmarc-analyzer-wrapper .dmarc-nested-table tbody tr:nth-of-type(even) {
    background: transparent !important;
}

.dmarc-analyzer-wrapper .dmarc-nested-table tbody tr:nth-of-type(even) td {
    background: #FFFFFF !important;
}

/* ============================================ */
/* CLICKABLE ROWS */
/* ============================================ */

.dmarc-analyzer-wrapper tr.l1-row {
    cursor: pointer !important;
    transition: background 0.15s ease !important;
}

.dmarc-analyzer-wrapper tr.l1-row:hover td {
    background: #EEF2FF !important;
}

.dmarc-analyzer-wrapper tr.l1-row.row-expanded td {
    background: #E8EEFF !important;
    border-bottom-color: #5d78ff !important;
}

.dmarc-analyzer-wrapper tr.child td {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.dmarc-analyzer-wrapper .dmarc-l2-table tbody tr:not(.child) {
    cursor: pointer !important;
}

.dmarc-analyzer-wrapper .dmarc-l2-table tbody tr:not(.child):hover td {
    background: #E8EEFF !important;
}

.dmarc-analyzer-wrapper .dmarc-l2-table tbody tr.row-expanded td {
    background: #D6E0FF !important;
    border-bottom-color: #FFA800 !important;
}

/* ============================================ */
/* PROGRESS BARS */
/* ============================================ */

.dmarc-analyzer-wrapper .dmarc-progress {
    height: 6px !important;
    background: #E1E1EB !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    margin-bottom: 5px !important;
    min-width: 80px !important;
}

.dmarc-analyzer-wrapper .dmarc-progress-bar {
    height: 100% !important;
    border-radius: 3px !important;
    transition: width 0.6s ease !important;
}

.dmarc-analyzer-wrapper .progress-label {
    font-size: 11px !important;
    color: #565D85 !important;
    font-weight: 600 !important;
}

/* ============================================ */
/* BADGES */
/* ============================================ */

.dmarc-analyzer-wrapper .badge-yes {
    display: inline-block !important;
    padding: 3px 10px !important;
    border-radius: 4px !important;
    background: #E8FAF3 !important;
    color: #0ABB87 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

.dmarc-analyzer-wrapper .badge-no {
    display: inline-block !important;
    padding: 3px 10px !important;
    border-radius: 4px !important;
    background: #FFEBEE !important;
    color: #E53935 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

.dmarc-analyzer-wrapper .text-success {
    color: #0ABB87 !important;
    font-weight: 600 !important;
}

.dmarc-analyzer-wrapper .text-danger {
    color: #E53935 !important;
    font-weight: 600 !important;
}

.dmarc-analyzer-wrapper .text-muted {
    color: #979DBB !important;
}

.dmarc-analyzer-wrapper .text-break {
    word-break: break-word !important;
}

/* ============================================ */
/* DKIM/SPF BLOCKS */
/* ============================================ */

.dmarc-analyzer-wrapper .dkim-block {
    line-height: 1.5 !important;
}

.dmarc-analyzer-wrapper .dkim-block > div:first-child {
    font-weight: 600 !important;
    font-size: 13px !important;
}

/* ============================================ */
/* SOURCE IP */
/* ============================================ */

.dmarc-analyzer-wrapper .source-ip {
    font-family: 'SFMono-Regular', Consolas, monospace !important;
    font-size: 13px !important;
    color: #5d78ff !important;
    text-decoration: none !important;
}

.dmarc-analyzer-wrapper .source-ip:hover {
    text-decoration: underline !important;
}

.dmarc-analyzer-wrapper .d-flex {
    display: flex !important;
}

.dmarc-analyzer-wrapper .align-items-center {
    align-items: center !important;
}

.dmarc-analyzer-wrapper .flag-icon {
    width: 18px !important;
    height: 13px !important;
    background: #E1E1EB !important;
    border-radius: 2px !important;
    margin-right: 8px !important;
}

/* ============================================ */
/* DATATABLES CONTROLS                          */
/* Top header hidden; bottom has pagination     */
/* left + "Show N entries" + info right         */
/* ============================================ */

/* Hide the top search/length bar completely */
.dmarc-analyzer-wrapper .dt-header {
    display: none !important;
}

/* Footer: all items centered, matching PrimeVue paginator layout */
.dmarc-analyzer-wrapper .dt-footer {
    display:         flex !important;
    align-items:     center !important;
    justify-content: center !important;
    flex-wrap:       wrap !important;
    gap:             8px !important;
    padding:         16px 0 6px !important;
    margin-top:      8px !important;
}

.dmarc-analyzer-wrapper .dt-footer-left {
    display:     flex !important;
    align-items: center !important;
}

.dmarc-analyzer-wrapper .dt-footer-right {
    display:     flex !important;
    align-items: center !important;
    gap:         12px !important;
}

/* Pagination buttons */
.dmarc-analyzer-wrapper .dataTables_paginate .paginate_button {
    display:     inline-block !important;
    padding:     6px 12px !important;
    margin:      0 2px !important;
    border-radius: 4px !important;
    font-size:   13px !important;
    color:       #565D85 !important;
    cursor:      pointer !important;
    border:      1px solid transparent !important;
    background:  transparent !important;
    transition:  all 0.15s ease !important;
}

.dmarc-analyzer-wrapper .dataTables_paginate .paginate_button:hover {
    background:   #F7F7F9 !important;
    border-color: #E1E1EB !important;
    color:        #5d78ff !important;
}

.dmarc-analyzer-wrapper .dataTables_paginate .paginate_button.current {
    background:   #5d78ff !important;
    color:        #FFFFFF !important;
    border-color: #5d78ff !important;
}

.dmarc-analyzer-wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.4 !important;
    cursor:  default !important;
}

/* "Show N entries" dropdown */
.dmarc-analyzer-wrapper .dt-footer-length .dataTables_length label {
    display:     flex !important;
    align-items: center !important;
    gap:         6px !important;
    margin:      0 !important;
    font-family: 'Muli', 'Mulish', sans-serif !important;
    font-size:   13px !important;
    color:       #565D85 !important;
    white-space: nowrap !important;
}

.dmarc-analyzer-wrapper .dt-footer-info {
    display: none !important;
}

.dmarc-analyzer-wrapper .dt-footer-length .dataTables_length select {
    margin-bottom: 0 !important;
    height:             32px !important;
    padding:            0 28px 0 10px !important;
    border:             1px solid #E1E1EB !important;
    border-radius:      4px !important;
    background:         #fff url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z' fill='%23979DBB'/%3E%3C/svg%3E") no-repeat right 8px center !important;
    -webkit-appearance: none !important;
    -moz-appearance:    none !important;
    appearance:         none !important;
    color:              #565D85 !important;
    font-size:          13px !important;
    font-family:        'Muli', 'Mulish', sans-serif !important;
    cursor:             pointer !important;
    outline:            none !important;
    transition:         border-color 0.15s ease !important;
}

.dmarc-analyzer-wrapper .dt-footer-length .dataTables_length select:focus {
    border-color: #5d78ff !important;
    box-shadow:   0 0 0 2px rgba(93, 120, 255, 0.15) !important;
}

/* Info text "Showing X to Y of Z entries" */
.dmarc-analyzer-wrapper .dt-footer-info .dataTables_info {
    font-family: 'Muli', 'Mulish', sans-serif !important;
    font-size:   13px !important;
    color:       #979DBB !important;
    white-space: nowrap !important;
    padding-top: 0 !important;
}

/* Empty table message */
.dmarc-analyzer-wrapper .dataTables_empty {
    text-align:  center !important;
    padding:     40px 20px !important;
    color:       #979DBB !important;
    font-style:  italic !important;
    font-size:   13px !important;
    font-family: 'Muli', 'Mulish', sans-serif !important;
}

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

@media (max-width: 768px) {
    .dmarc-analyzer-wrapper .tab-btn span:not(.tab-badge) {
        display: none !important;
    }

    .dmarc-analyzer-wrapper .kt-portlet__body {
        padding: 12px !important;
    }

    .dmarc-analyzer-wrapper .l2-container,
    .dmarc-analyzer-wrapper .l3-container {
        padding: 12px !important;
    }

    .dmarc-analyzer-wrapper .dt-footer {
        flex-direction: column !important;
        align-items:    flex-start !important;
    }
}