/* News Articles */

@media (min-width: 768px) {
    .article-hero:before {
        content: '';
        position: absolute;
        inset: 0;
        left: 0.75rem;
        z-index: 1;
        width: calc(100% - 1.5rem);
        background: linear-gradient(to right, #000a 0%, #0005 60%, transparent 100%);
    }
}

@media (min-width: 768px) {
    .article-hero p,
    .article-hero h1 {
        color: white !important;
    }

    .article-hero .subtitle-teal {
        color: var(--logo-orange) !important;
    }

    .hero-image-adjust {
        position: absolute !important;
        top: 0;
        left: 0;
    }
}

/* Hide AddToAny's injected clear div which breaks flex alignment */
.a2a_kit > div[style*='clear'] {
    display: none !important;
}

/* News Body Overrides */

.news-body a {
    text-decoration: underline;
}

@media (max-width: 991.98px) {
    .market-scorecard .news-body {
        overflow-x: auto;
    }
    .market-scorecard .news-body table {
        min-width: 700px;
    }
}

.news-body table * {
    font-family: 'Inter', sans-serif !important;
}

.news-body table a {
    color: var(--primary-teal);
    font-weight: 600 !important;
}

.news-body h2 {
    font-size: calc(1.3rem + 0.6vw) !important;
}

.news-body h2 b {
    font-family: 'Inter Tight', sans-serif !important;
    font-weight: 600 !important;
}

/* Article Comments Section */

.commentAction button {
    font-size: 0.8rem;
    transition: opacity 0.15s ease;
}

.commentAction button {
    transition: all 0.3s ease;
}

.comments-table table > tbody > tr > td {
    position: relative;
}

.comments-table table > tbody > tr:not(:last-child) > td {
    padding-bottom: 1rem;
}

.comments-table a {
    font-weight: 500;
}

.comments-table > tbody > tr:first-child > td {
    border-top: none !important;
    padding-top: 0 !important;
}

.comments-table > tbody > tr:last-child > td {
    padding-bottom: 0 !important;
}

/* Sidebar */

/* Ask Us */

#newsAskUs .form-control.small {
    font-size: .875em;
}

#iir-article-forms {
    scroll-margin-top: 12rem;
}

@media (max-width: 991.98px) {
    #iir-article-forms {
        scroll-margin-top: 6rem;
    }
}

/* Sidebar CTA banners */

@media (max-width: 991.98px) {
    .cta-ratio::before {
        padding-top: 0 !important;
    }
    .cta-ratio {
        min-height: 350px;
    }
}

/* Sidebar list groups */

.list-group-flush .list-group-item:last-child {
    padding-bottom: 0;
}
.latest-headline-img {
    max-height: 8rem;
    overflow: hidden;
}

.energy-solutions-cta {
    background-image: url('https://media.industrialinfo.com/news/img/webp/cta/iir-industry-news-banner-power-transmission-towers.webp');
    background-size: cover;
    background-position: center right;
}

.iir-solutions-cta {
    background-image: url('https://media.industrialinfo.com/industries/semiconductors/iir-global-semiconductors-database-industrial-info-resources-3840.webp');
    background-size: cover;
    background-position: center right;
}

.news-by-industry-footer > div {
    border-right: 1px solid #dee2e6;
}

.news-by-industry-footer > div:last-child {
    border-right: none;
}

.news-industry-tabs .nav-link {
    color: var(--primary-dark-blue);
    border: 0;
}

.news-industry-tabs .nav-link:not(.active):hover {
    color: var(--primary);
    transform: scale(1.1);
    border: 0;
}

/* Article Reader */
.col-md-8.col-lg-9 #article-reader {
    border: 1px solid rgba(0, 0, 0, 0.175);
    padding: 0.5rem 1rem;
}

#article-reader .volume-control .vertical-slider {
    width: 100px;
    height: 100px;
    transform: rotate(270deg) translateY(-30%);
}

#article-reader .volume-control.dropdown .dropdown-menu {
    min-width: unset;
    width: 40px;
    transform: translate(-10%, -120%);
    overflow: hidden;
    border: 1px solid #ccc !important;
}

#article-reader .volume-control.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1 !important;
}

#article-reader .volume-control.dropdown > .fa:active {
    pointer-events: none;
}

.latest-news-reader-wrapper .btn {
    padding: 0;
    letter-spacing: normal;
}

.latest-news-reader-wrapper #article-reader > div.my-2 {
    margin: 0 0 !important;
    padding: 0 0 !important;
    border: 0 !important;
}

.latest-news-reader-wrapper #article-reader small {
    font-size: 0.6rem !important;
}

#sr-progress-container {
    background: var(--bs-dark-bg-subtle) !important;
}

.news-by-switcher {
    letter-spacing: var(--iir-energy-letter-spacing-body);
}

article:has(.stretched-link) {
    transition: all 0.3s ease;
}
article:has(.stretched-link:hover) {
    transform: scale(1.015);
}

.x-small {
    font-size: 0.75rem;
}

#news-by-industry #industry-tab-content .list-group li:nth-last-child(2),
#ind-news-global > div:first-of-type .list-group:first-of-type li:nth-last-child(2) {
    border: 0;
    padding-bottom: 0 !important;
}

/* News Alerts */

#news-alerts-prompt {
    top: 0;
    z-index: 1055;
}

@media (max-width: 575.98px) {
    #news-alerts-prompt {
        left: 0 !important;
        width: 100vw;
        transform: none !important;
    }
}

.notification-switch-track {
    width: 55px;
    height: 25px;
    transition: background-color .2s ease;
}

.notification-switch-knob {
    top: 2.5px;
    left: 4px;
    width: 20px;
    height: 20px;
    transition: left .2s ease;
}

.notification-switch-knob i {
    transition: color .2s ease;
}

.notification-switch[aria-checked="true"] .notification-switch-knob {
    left: calc(100% - 24px);
}

.news-search .input-group-text,
.news-search .form-control {
    height: 35px;
}

/* Scorecard */

.scorecard-card .bg-danger {
    background-color: #c32424 !important;
}

.scorecard-card .text-danger {
    color: #c32424 !important;
}
