/* MMITech custom overrides - not overwritten by Lagom updates */

/* News cards: equal height */
.site .news .row {
    align-items: stretch;
}
.site .row.news>.col-xl-4>.news-box,
.site .row.news>[class*="col"]>.news-box {
    height: 100%;
}
.site .news-box .news-body {
    flex: 0 0 auto;
}
.site .news-box .news-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.site .news-box .news-actions {
    margin-top: auto;
}
@media (min-width: 1200px) {
    .site .news>[class*="col"] {
        flex: 0 0 33.33333%;
        max-width: 33.33333%;
        width: 33.33333%;
    }
}

/* Compare Us: legend */
.site .mmi-compare-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-lighter-color);
}
.site .mmi-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Compare Us: footnotes */
.site .mmi-compare-footnotes {
    margin-top: 24px;
    max-width: 100%;
    font-size: 12px;
    color: var(--text-lighter-color);
}
.site .mmi-compare-footnotes p {
    margin: 0 0 8px;
    padding-left: 20px;
    text-indent: -20px;
}
.site .mmi-compare-footnotes p:last-child {
    margin-bottom: 0;
}

/* Testimonials: attribution hyphen */
.site .testimonials-author>span::before {
    content: "-";
    margin-left: -.6em;
}
.site .hero-testimonials .testimonial-author {
    position: relative;
    padding-left: .6em;
}
.site .hero-testimonials .testimonial-author::before {
    content: "-";
    margin-left: -.6em;
}

/* Dashboard: base layout */
.client-home-panels.row .mmi-dashboard-columns {
    display: flex;
    flex-direction: column;
}
/* Left column: gap between stacked panels */
.client-home-panels.row .mmi-dashboard-left > .panel + .panel {
    margin-top: 30px;
}

/* Mobile (<768px): tickets list with scroll cap */
@media (max-width: 767px) {
    .client-home-panels.row .mmi-dashboard-columns:not(.has-affiliate) .mmi-dashboard-right > .panel > .list-group.has-scroll {
        display: block !important;
        flex: none !important;
        margin: 0 !important;
        max-height: 45vh !important;
        overflow-y: auto !important;
    }
}

/* Desktop (>=768px): 2-column layout with Tickets panel stretched tall */
@media (min-width: 768px) {
    .client-home-panels.row .mmi-dashboard-columns {
        flex-direction: row;
        margin: 0 -15px;
    }
    /* Columns: equal height via flex stretch */
    .client-home-panels.row .mmi-dashboard-columns > .col-md-6 {
        padding: 0 15px;
        display: flex;
        flex-direction: column;
    }
    /* Right column: Tickets panel stretches to fill column (only when no Affiliate panel) */
    .client-home-panels.row .mmi-dashboard-columns:not(.has-affiliate) .mmi-dashboard-right > .panel {
        height: 100%;
        display: flex !important;
        flex-direction: column;
    }
    /* Heading: don't grow or shrink */
    .client-home-panels.row .mmi-dashboard-columns:not(.has-affiliate) .mmi-dashboard-right > .panel > .panel-heading {
        flex: 0 0 auto;
    }
    /* list-group: fill remaining panel height, scroll internally — override theme display:flex + margin-bottom + max-height:323px */
    .client-home-panels.row .mmi-dashboard-columns:not(.has-affiliate) .mmi-dashboard-right > .panel > .list-group.has-scroll {
        max-height: none !important;
        display: block !important;
        margin: 0 !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
    }
    /* No-data state centering (panel-body wraps no-data message) */
    .client-home-panels.row .mmi-dashboard-columns:not(.has-affiliate) .mmi-dashboard-right > .panel > .panel-body:has(.no-data) {
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
