/* =========================================================
   OFFERING CARD - SHARED COMPONENT

   Dipakai oleh:
   - InvestationPage
   - ListingPenerbit

   File ini hanya untuk styling card.
========================================================= */

/* =========================================================
   OFFER CARD
   Selector dibuat spesifik agar override CSS lama card-custom
========================================================= */

.listing-penerbit .card-custom.offer-card {
    width: 100%;
    max-width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    border: 1px solid #e4e8ed;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.09);
    cursor: pointer;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.listing-penerbit .card-custom.offer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

/* =========================================================
   CARD IMAGE
========================================================= */

.listing-penerbit .card-custom.offer-card .offer-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 190px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background: #f3f4f6;
}

.listing-penerbit .card-custom.offer-card .offer-card-image {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
}

/* =========================================================
   CARD BODY
========================================================= */

.listing-penerbit .card-custom.offer-card .offer-card-body {
    padding: 20px;
    margin: 0;
    display: block;
    flex: 1;
}

/* =========================================================
   CARD TITLE
========================================================= */

.listing-penerbit .card-custom.offer-card .offer-card-title {
    min-height: 48px;
    margin: 0 0 16px 0;
    padding: 0;
    color: #111827;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
}

/* =========================================================
   CARD DIVIDER
========================================================= */

.listing-penerbit .card-custom.offer-card .offer-card-divider {
    width: 100%;
    height: 1px;
    margin: 0 0 15px 0;
    background: #edf0f3;
}

/* =========================================================
   CARD LABEL & VALUE
========================================================= */

.listing-penerbit .card-custom.offer-card .offer-label {
    margin-bottom: 5px;
    color: #8b95a5;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 400;
}

.listing-penerbit .card-custom.offer-card .offer-value {
    overflow: hidden;
    color: #374151;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* =========================================================
   FUNDING
========================================================= */

.listing-penerbit .card-custom.offer-card .offer-funding-label {
    margin-bottom: 10px;
    color: #8b95a5;
    font-size: 14px;
}

.listing-penerbit .card-custom.offer-card .offer-progress {
    position: relative;
    width: 100%;
    height: 10px;
    margin: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #e9edf3;
}

.listing-penerbit .card-custom.offer-card .offer-progress-bar {
    height: 100%;
    border-radius: 20px;
    background: #233b85;
}

.listing-penerbit .card-custom.offer-card .offer-progress-percent {
    color: #283d80;
    font-size: 14px;
    font-weight: 700;
}

.listing-penerbit .card-custom.offer-card .offer-funding-value {
    color: #111827;
    font-size: 14px;
    font-weight: 700;
}

/* =========================================================
   STATUS BADGE
========================================================= */

.listing-penerbit .card-custom.offer-card .offer-status-badge {
    position: absolute;
    top: 13px;
    right: 13px;
    min-width: 72px;
    padding: 6px 13px;
    border-radius: 20px;
    text-align: center;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
}

.listing-penerbit .card-custom.offer-card .offer-status-badge.offer-status-open {
    background: #d8f5df !important;
    color: #16803b !important;
}

.listing-penerbit .card-custom.offer-card .offer-status-badge.offer-status-closed {
    background: #fff1c9 !important;
    color: #8b6508 !important;
}

.listing-penerbit .card-custom.offer-card .offer-status-badge.offer-status-done {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
}

/* =========================================================
   STATUS BADGE - SURAT HUTANG
   Force badge and nested i18n span to use the same colors
   as Saham, even if there is a global .surat-hutang span rule.
========================================================= */

.listing-penerbit .card-custom.offer-card.surat-hutang .offer-status-badge.offer-status-open,
.listing-penerbit .card-custom.offer-card.surat-hutang .offer-status-badge.offer-status-open>span {
    background: #d8f5df !important;
    color: #16803b !important;
}

.listing-penerbit .card-custom.offer-card.surat-hutang .offer-status-badge.offer-status-closed,
.listing-penerbit .card-custom.offer-card.surat-hutang .offer-status-badge.offer-status-closed>span {
    background: #fff1c9 !important;
    color: #8b6508 !important;
}

.listing-penerbit .card-custom.offer-card.surat-hutang .offer-status-badge.offer-status-done,
.listing-penerbit .card-custom.offer-card.surat-hutang .offer-status-badge.offer-status-done>span {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
}

/* =========================================================
   EQUITY CARD
========================================================= */

.listing-penerbit .card-custom.offer-card:not(.surat-hutang) {
    background: #ffffff;
}

.listing-penerbit .card-custom.offer-card:not(.surat-hutang) .offer-card-title {
    color: #111827;
}

.listing-penerbit .card-custom.offer-card:not(.surat-hutang) .offer-label,
.listing-penerbit .card-custom.offer-card:not(.surat-hutang) .offer-funding-label {
    color: #8b95a5;
}

.listing-penerbit .card-custom.offer-card:not(.surat-hutang) .offer-value {
    color: #374151;
}

/* =========================================================
   SURAT HUTANG CARD
========================================================= */

.listing-penerbit .card-custom.offer-card.surat-hutang {
    background: #093361;
    border-color: #093361;
}

.listing-penerbit .card-custom.offer-card.surat-hutang .offer-card-title {
    color: #ffffff;
}

.listing-penerbit .card-custom.offer-card.surat-hutang .offer-label,
.listing-penerbit .card-custom.offer-card.surat-hutang .offer-funding-label {
    /* Typography exactly follows the Saham card; only color differs for dark background */
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 400;
}

.listing-penerbit .card-custom.offer-card.surat-hutang .offer-value,
.listing-penerbit .card-custom.offer-card.surat-hutang .offer-progress-percent,
.listing-penerbit .card-custom.offer-card.surat-hutang .offer-funding-value {
    color: #ffffff;
}

.listing-penerbit .card-custom.offer-card.surat-hutang .offer-card-divider {
    background: rgba(255, 255, 255, 0.30);
}

.listing-penerbit .card-custom.offer-card.surat-hutang .offer-progress {
    background: rgba(255, 255, 255, 0.85);
}

/* =========================================================
   MODERN LISTING PENERBIT CARD
   Tampilan disamakan dengan card Daftar Penawaran
========================================================= */

.listing-penerbit .card-custom.publisher-offer-card {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    border: 1px solid #e4e8ed;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.09);
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.listing-penerbit .card-custom.publisher-offer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

/* =========================================================
   IMAGE
========================================================= */

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-image-wrapper {
    position: relative;
    width: 100%;
    height: 185px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background: #f3f4f6;
}

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-image {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border-radius: 0;
    object-fit: cover;
}

/* =========================================================
   STATUS BADGE
========================================================= */

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-status-badge {
    position: absolute;
    top: 13px;
    right: 13px;
    z-index: 2;
    min-width: 72px;
    padding: 6px 13px;
    border-radius: 20px;
    text-align: center;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
}

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-status-open,
.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-status-open>span {
    background: #d8f5df !important;
    color: #16803b !important;
}

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-status-closed,
.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-status-closed>span {
    background: #fff1c9 !important;
    color: #8b6508 !important;
}

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-status-done,
.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-status-done>span {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
}

/* =========================================================
   CARD BODY
========================================================= */

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-body {
    padding: 20px;
    margin: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-title {
    min-height: 48px;
    margin: 0 0 16px 0;
    padding: 0;
    color: #111827;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
}

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-divider {
    width: 100%;
    height: 1px;
    margin: 0 0 15px 0;
    background: #edf0f3;
}

/* =========================================================
   INFORMATION
========================================================= */

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-label {
    margin-bottom: 5px;
    color: #8b95a5;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 400;
}

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-value {
    overflow: hidden;
    color: #374151;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* =========================================================
   FUNDING
========================================================= */

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-funding-label {
    margin-bottom: 10px;
    color: #8b95a5;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 400;
}

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-progress {
    width: 100%;
    height: 10px;
    margin: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #e9edf3;
}

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-progress-bar {
    height: 100%;
    border-radius: 20px;
    background: #233b85;
}

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-progress-percent {
    color: #283d80;
    font-size: 14px;
    font-weight: 700;
}

.listing-penerbit .card-custom.publisher-offer-card .publisher-offer-funding-value {
    color: #111827;
    font-size: 14px;
    font-weight: 700;
}

/* =========================================================
   SURAT HUTANG
========================================================= */

.listing-penerbit .card-custom.publisher-offer-card.surat-hutang {
    background: #093361;
    border-color: #093361;
}

.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-title {
    color: #ffffff;
}

/*
 * Label Surat Hutang dibuat sama ukuran / weight dengan Saham.
 * Hanya warna disesuaikan agar terbaca di background gelap.
 */
.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-label,
.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-funding-label {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 400;
}

.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-value,
.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-progress-percent,
.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-funding-value {
    color: #ffffff;
}

.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-divider,
.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-action-divider {
    background: rgba(255, 255, 255, 0.22);
}

.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-progress {
    background: rgba(255, 255, 255, 0.85);
}

.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-funding-status-title {
    color: #ffffff !important;
}


/*
 * Penting:
 * Override global .surat-hutang span agar warna badge
 * tetap sama dengan card Saham.
 */
.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-status-open,
.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-status-open>span {
    background: #d8f5df !important;
    color: #16803b !important;
}

.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-status-closed,
.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-status-closed>span {
    background: #fff1c9 !important;
    color: #8b6508 !important;
}

.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-status-done,
.listing-penerbit .card-custom.publisher-offer-card.surat-hutang .publisher-offer-status-done>span {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
}

/* =========================================================
   SHARED CARD RESPONSIVE
========================================================= */

@media (min-width: 992px) {

    .listing-penerbit .card-custom.offer-card .offer-card-image-wrapper,
    .listing-penerbit .card-custom.publisher-offer-card .publisher-offer-image-wrapper {
        height: 175px;
    }

    .listing-penerbit .card-custom.offer-card .offer-card-body,
    .listing-penerbit .card-custom.publisher-offer-card .publisher-offer-body {
        padding: 18px;
    }

    .listing-penerbit .card-custom.offer-card .offer-card-title,
    .listing-penerbit .card-custom.publisher-offer-card .publisher-offer-title {
        font-size: 17px;
    }
}

@media (max-width: 991.98px) {

    .listing-penerbit .card-custom.offer-card .offer-card-image-wrapper,
    .listing-penerbit .card-custom.publisher-offer-card .publisher-offer-image-wrapper {
        height: 210px;
    }
}

@media (max-width: 575.98px) {

    .listing-penerbit .card-custom.offer-card .offer-card-image-wrapper,
    .listing-penerbit .card-custom.publisher-offer-card .publisher-offer-image-wrapper {
        height: 220px;
    }

    .listing-penerbit .card-custom.offer-card .offer-card-title,
    .listing-penerbit .card-custom.publisher-offer-card .publisher-offer-title {
        font-size: 18px;
    }
}