/* =============================================
   MSB Credit Rating Element
   ============================================= */
.msb-cr-inner {
    max-width: 1366px;
    margin: 0 auto;
    padding: 0 24px;;
}

/* ---- Header ---- */
.msb-cr__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}

.msb-cr__title {
    font-size: 26px;
    font-weight: 700;
    color: #091E42;
    margin: 0;
    line-height: 36px;
}

/* ---- Year Select ---- */
.msb-cr__year-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.msb-cr__year-select {
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1px solid #DEE5EF;
    border-radius: 8px;
    padding: 8px 40px 8px 16px;
    font-size: 15px;
    color: #0d1b3e;
    cursor: pointer;
    outline: none;
    min-width: 260px;
    min-height: 44px;
    margin-bottom: 0px;
    box-shadow: none;
}

.msb-cr__year-select:focus {
    border-color: #0d1b3e;
}

.msb-cr__year-select-arrow {
    position: absolute;
    right: 12px;
    pointer-events: none;
    color: #0d1b3e;
    display: flex;
    align-items: center;
}

/* ---- Tabs ---- */
.msb-cr__tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.msb-cr__tab {
    padding: 8px 12px;
    border-radius: 32px;
    border: 1.5px solid #DEE5EF;
    background: #fff;
    color: #091E42;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    margin: 0;
    text-transform: none;
    line-height: 24px;
}

.msb-cr__tab.is-active,
.msb-cr__tab:hover:not(.is-active){
    border-color: #F8A06D;
    color: #F4600C;
    background: #FEEFE7;
}

/* ---- Panels ---- */
.msb-cr__panel {
    display: none;
}

.msb-cr__panel.is-active {
    display: block;
}

.msb-cr__panel.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ---- Content inner (two column) ---- */
.msb-cr__content-inner {
    display: grid;
    grid-template-columns: 1fr calc(var(--cr-cols, 3) * 200px);
    gap: 32px;
    align-items: stretch;
}

/* ---- Left column ---- */
.msb-cr__left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.msb-cr__thumbnail {
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
    flex: 1;
    min-height: 0;
}

.msb-cr__thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 12px;
}

.msb-cr__link {
    margin-top: 24px;
    color: #F4600C;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.msb-cr__link:hover {
    text-decoration: underline;
}

/* ---- Right column ---- */
.msb-cr__right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
    height: 100%;
}

/* ---- danh_gia grid ---- */
.msb-cr__grid {
    display: grid;
    grid-template-columns: repeat(var(--cr-cols, 3), 1fr);
    gap: 24px;
    overflow: hidden;
    height: 100%;
    align-content: stretch;
}

.msb-cr__grid-item {
    padding: 24px 12px;
    text-align: center;
    flex-direction: column;
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    background-color: #FFFFFF;
    border-radius: 12px;
}

.msb-cr__grid-mo-ta {
    margin-bottom: 0px;
    color: #091E42;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.msb-cr__grid-value {
    font-size: 40px;
    font-weight: 700;
    color: #2573C8;
    margin: 0;
    line-height: 40px;
}

/* ---- Empty state ---- */
.msb-cr__empty {
    color: #9ca3af;
    font-size: 14px;
    padding: 24px 0;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .msb-cr__content-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .msb-cr__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .msb-cr__grid-item:nth-child(3n) {
        border-right: 1px solid #e5e7eb;
    }

    .msb-cr__grid-item:nth-child(2n) {
        border-right: none;
    }

    .msb-cr__header {
        flex-direction: column;
        align-items: flex-start;
    }
}
