/*
 * "Bài hát liên quan" visual refresh for CTN's existing Joomla HTML module.
 * Only activates after related-songs-ui.js safely recognises its content.
 * Uses existing article links; no remote dependencies, images or animations.
 */
.ctn-related-v2 {
    box-sizing: border-box;
    clear: both;
    width: 100%;
    max-width: 100%;
    margin: 20px 0 24px;
    background: #fff;
    border: 1px solid #e1e6e5;
    border-radius: 11px;
    font-family: Arial, Helvetica, sans-serif;
    color: #26332d;
    overflow: hidden;
}

.ctn-related-v2 * {
    box-sizing: border-box;
}

.ctn-related-v2 .ctn-rs-header {
    position: relative;
    padding: 18px 20px 16px;
    border-bottom: 1px solid #e9edeb;
}

.ctn-related-v2 .ctn-rs-header:before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    width: 48px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: #278658;
}

.ctn-related-v2 .ctn-rs-header h2 {
    margin: 0 0 5px;
    padding: 0;
    border: 0;
    background: none;
    color: #21342a;
    font-size: 19px;
    font-weight: bold;
    line-height: 1.3;
}

.ctn-related-v2 .ctn-rs-header p {
    margin: 0;
    color: #65746d;
    font-size: 12px;
    line-height: 1.6;
}

.ctn-related-v2 .ctn-rs-section {
    padding: 17px 20px 19px;
}

.ctn-related-v2 .ctn-rs-section + .ctn-rs-section {
    border-top: 1px solid #e9edeb;
}

.ctn-related-v2 .ctn-rs-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: none;
    color: #607269;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: .7px;
    line-height: 1.4;
    text-transform: uppercase;
}

.ctn-related-v2 .ctn-rs-section-title:before {
    content: "";
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    background: #278658;
    border-radius: 50%;
}

.ctn-related-v2 .ctn-rs-same-grid,
.ctn-related-v2 .ctn-rs-suggest-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ctn-related-v2 .ctn-rs-card {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
}

.ctn-related-v2 .ctn-rs-same {
    padding: 13px 12px;
    border: 1px solid #e0e8e3;
    border-radius: 8px;
    background: #fff;
}

.ctn-related-v2 .ctn-rs-suggest {
    padding: 11px 0;
    border-bottom: 1px solid #edf0ee;
}

.ctn-related-v2 .ctn-rs-icon {
    display: inline-flex;
    flex: 0 0 40px;
    width: 40px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 22px;
    font-family: "Segoe UI Symbol", Arial, sans-serif;
    line-height: 1;
    background: #edf6f0;
    color: #278658;
}

.ctn-related-v2 .ctn-rs-icon-midi {
    background: #eaf1fb;
    color: #4074b0;
}

.ctn-related-v2 .ctn-rs-icon-chord {
    background: #ecf6ef;
    color: #278658;
}

.ctn-related-v2 .ctn-rs-suggest .ctn-rs-icon {
    flex-basis: 35px;
    width: 35px;
    height: 39px;
    border: 1px solid #e9eeeb;
    background: #f5f8f6;
    font-size: 19px;
}

.ctn-related-v2 .ctn-rs-copy {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
}

.ctn-related-v2 .ctn-rs-type {
    display: block;
    color: #278658;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: .5px;
    line-height: 1.3;
}

.ctn-related-v2 .ctn-rs-title {
    color: #26332d !important;
    font-size: 13px !important;
    font-weight: bold;
    line-height: 1.4;
    text-decoration: none !important;
    overflow-wrap: anywhere;
}

.ctn-related-v2 .ctn-rs-title:hover,
.ctn-related-v2 .ctn-rs-title:focus {
    color: #23794f !important;
    text-decoration: underline !important;
}

.ctn-related-v2 .ctn-rs-description,
.ctn-related-v2 .ctn-rs-reason {
    display: block;
    color: #67776e;
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.ctn-related-v2 .ctn-rs-reason-link {
    color: #278658 !important;
    text-decoration: none !important;
}

.ctn-related-v2 .ctn-rs-reason-link:hover,
.ctn-related-v2 .ctn-rs-reason-link:focus {
    text-decoration: underline !important;
}

.ctn-related-v2 .ctn-rs-chevron {
    flex: 0 0 auto;
    margin-left: auto;
    color: #96a29b;
    font-size: 20px;
    line-height: 1;
}

.ctn-related-v2 .ctn-rs-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 13px 20px 16px;
    border-top: 1px solid #edf0ee;
    color: #758078;
    font-size: 11px;
    line-height: 1.5;
}

.ctn-related-v2 .ctn-rs-footer a {
    color: #278658 !important;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none !important;
}

.ctn-related-v2 .ctn-rs-footer a:hover,
.ctn-related-v2 .ctn-rs-footer a:focus {
    text-decoration: underline !important;
}

.ctn-related-v2 a:focus-visible {
    outline: 2px solid #278658;
    outline-offset: 3px;
}

@media (max-width: 680px) {
    .ctn-related-v2 .ctn-rs-header {
        padding: 17px 14px 14px;
    }

    .ctn-related-v2 .ctn-rs-header:before {
        left: 14px;
    }

    .ctn-related-v2 .ctn-rs-section {
        padding: 15px 14px 17px;
    }

    .ctn-related-v2 .ctn-rs-same-grid,
    .ctn-related-v2 .ctn-rs-suggest-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ctn-related-v2 .ctn-rs-same {
        padding: 11px 12px;
    }

    .ctn-related-v2 .ctn-rs-footer {
        padding: 13px 14px 16px;
    }
}