/* BiblioGarden / My Books */
.bgi-my-books-page {
    width: 100%;
    box-sizing: border-box;
    color: #252525;
    font-family: inherit
}

.bgi-my-books-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin: 0 0 18px
}

.bgi-my-books-page h1 {
    margin: 0;
    color: #292929;
    font-family: inherit;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.2px
}

/* Credit summary */
.bgi-credit-box {
    width: 326px;
    min-width: 300px;
    box-sizing: border-box;
    border: 1px solid #dfe5ec;
    border-radius: 10px;
    background: #fff;
    padding: 11px 13px 10px
}

.bgi-credit-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #263b5e;
    font-size: 12px;
    line-height: 1.2
}

.bgi-credit-heading strong {
    font-size: 12px;
    font-weight: 700
}

.bgi-credit-heading span {
    font-weight: 500;
    white-space: nowrap
}

.bgi-credit-progress {
    height: 9px;
    margin: 8px 0 7px;
    overflow: hidden;
    background: #e7e9ed;
    border-radius: 999px
}

.bgi-credit-progress span {
    display: block;
    height: 100%;
    background: #4f8b3b;
    border-radius: 999px
}

.bgi-credit-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #7890b2;
    font-size: 12px;
    line-height: 1.2
}

.bgi-credit-bottom a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 105px;
    padding: 8px 12px;
    box-sizing: border-box;
    border-radius: 18px;
    background: #4f8b3b;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap
}

/* Tabs */
.bgi-books-tabs {
    display: flex;
    width: 342px;
    height: 45px;
    box-sizing: border-box;
    border: 1px solid #d8dee6;
    border-radius: 10px;
    background: #fafafa;
    padding: 4px;
    margin: 0 0 14px
}

.bgi-books-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    line-height: 1
}

.bgi-books-tabs a.is-active {
    background: #4f8b3b;
    color: #fff
}

/* Main list */
.bgi-books-table-wrap {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid #e4e8ee;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(24, 42, 68, .03)
}

.bgi-books-header, .bgi-book-row {
    display: grid;
    align-items: center
}

.bgi-books-table-wrap.is-my-books .bgi-books-header, .bgi-books-table-wrap.is-my-books .bgi-book-row {
    grid-template-columns: minmax(290px, 1.45fr) minmax(240px, 1.05fr) minmax(230px, 1fr) minmax(160px, .72fr)
}

.bgi-books-table-wrap.is-printing .bgi-books-header, .bgi-books-table-wrap.is-printing .bgi-book-row {
    grid-template-columns: minmax(0, 1fr) minmax(145px, .34fr)
}

.bgi-books-header {
    min-height: 40px;
    background: #f5f5f6;
    color: #4b4b4b;
    /*font-size: 11px;*/
    font-weight: 600
}

.bgi-books-header > div, .bgi-book-row > div {
    box-sizing: border-box;
    padding: 8px 12px
}

.bgi-books-header > div:first-child, .bgi-book-row > div:first-child {
    padding-left: 13px
}

.bgi-books-header > div:last-child, .bgi-book-row > div:last-child {
    padding-right: 13px
}

.bgi-book-row {
    min-height: 106px;
    border-top: 1px solid #eceef1;
    background: #fff
}

.bgi-book-row:hover {
    background: #fdfdfd
}

/* Book */
.bgi-book-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0
}

.bgi-book-cover {
    display: block;
    flex: 0 0 56px;
    width: 56px;
    height: 78px
}

.bgi-book-cover img {
    display: block;
    width: 56px;
    height: 78px;
    object-fit: cover;
    border-radius: 2px
}

.bgi-book-info {
    min-width: 0
}

.bgi-book-title {
    display: block;
    margin: 0;
    color: #282828;
    text-decoration: none !important;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25
}

.bgi-book-title:hover {
    text-decoration: underline !important
}

.bgi-book-author {
    margin-top: 2px;
    color: #5e6f86;
    font-size: 10px;
    line-height: 1.2
}

.bgi-book-price {
    margin-top: 4px;
    color: #272727;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2
}

.bgi-book-isbn {
    margin-top: 5px;
    color: #58606b;
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: .05px
}

/* BiblioGarden column */
.bgi-book-listing-cell, .bgi-book-lightning-cell {
    font-size: 11px;
    color: #5d6774;
    min-width: 0
}

.bgi-listing-dates {
    margin: 0 0 5px;
    color: #5d6878;
    font-size: 10px;
    line-height: 1.25;
    white-space: nowrap
}

.bgi-na {
    display: inline-block;
    color: #646464;
    font-size: 11px
}

.bgi-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1
}

.bgi-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4f8b3b;
    display: inline-block;
    flex: 0 0 6px
}

.bgi-status-active {
    background: #e9f7e8;
    color: #4f8b3b
}

.bgi-status-expiring {
    background: #fff0d6;
    color: #e68b08
}

.bgi-status-expiring .bgi-status-dot {
    background: #f39a14
}

.bgi-status-expired, .bgi-status-failed {
    background: #ffe8e9;
    color: #f0444f
}

.bgi-status-expired .bgi-status-dot, .bgi-status-failed .bgi-status-dot {
    background: #f0444f
}

.bgi-status-pending {
    background: #fff0df;
    color: #e98a1a
}

.bgi-status-pending .bgi-status-dot {
    background: #ff9824
}

.bgi-status-processing {
    background: #eef3fa;
    color: #54739c
}

.bgi-status-processing .bgi-status-dot {
    background: #6e93be
}

/* Buttons */
.bgi-list-on-bibliogarden, .bgi-outline-green-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    min-height: 32px;
    margin-top: 7px;
    border-radius: 18px;
    padding: 7px 12px;
    text-decoration: none !important;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap
}

.bgi-list-on-bibliogarden {
    border: 1px solid #4f8b3b;
    background: #4f8b3b;
    color: #fff !important
}

.bgi-outline-green-button {
    border: 1px solid #76a96b;
    background: #fff;
    color: #4f8b3b !important
}

.bgi-button-disabled {
    opacity: .5;
    cursor: not-allowed
}

.bgi-book-lightning-cell .bgi-book-action {
    margin: 0
}

.bgi-book-lightning-cell .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    min-height: 32px;
    border: 1px solid #76a96b;
    border-radius: 18px;
    padding: 7px 11px;
    color: #4f8b3b !important;
    background: #fff;
    text-decoration: none !important;
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap
}

.bgi-book-actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0
}

.bgi-buy-button, .bgi-edit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    min-height: 32px;
    border-radius: 18px;
    padding: 8px 11px;
    text-decoration: none !important;
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
    white-space: nowrap
}

.bgi-buy-button {
    background: #4f8b3b;
    color: #fff !important
}

.bgi-edit-button {
    background: #f4f5f6;
    color: #555 !important
}

/* Small inline icons, matching the screenshot without relying on an icon library. */
.bgi-icon {
    display: inline-block;
    position: relative;
    flex: 0 0 auto;
    width: 12px;
    height: 12px
}

.bgi-icon-cart:before {
    content: '';
    position: absolute;
    left: 1px;
    top: 2px;
    width: 8px;
    height: 6px;
    border: 1.4px solid currentColor;
    border-top: 0;
    border-radius: 0 0 2px 2px;
    transform: skew(-7deg)
}

.bgi-icon-cart:after {
    content: '•  •';
    position: absolute;
    left: 1px;
    top: 6px;
    font-size: 8px;
    letter-spacing: 2px;
    line-height: 8px
}

.bgi-icon-edit:before {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 8px;
    height: 4px;
    border-radius: 1px;
    background: currentColor;
    transform: rotate(-45deg)
}

.bgi-icon-edit:after {
    content: '';
    position: absolute;
    left: 1px;
    top: 8px;
    width: 3px;
    height: 3px;
    background: currentColor;
    clip-path: polygon(0 0, 100% 0, 0 100%)
}

.bgi-icon-upload:before {
    content: '';
    position: absolute;
    left: 2px;
    top: 1px;
    width: 7px;
    height: 7px;
    border-left: 1.5px solid currentColor;
    border-top: 1.5px solid currentColor;
    transform: rotate(45deg)
}

.bgi-icon-upload:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    width: 2px;
    height: 7px;
    background: currentColor;
    box-shadow: -3px 5px 0 -1px currentColor, 3px 5px 0 -1px currentColor
}

.bgi-icon-eye:before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 12px;
    height: 7px;
    border: 1.2px solid currentColor;
    border-radius: 50%/60%
}

.bgi-icon-eye:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor
}

/* Footer / pagination */
.bgi-books-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 12px;
    color: #7b8eab;
    font-size: 11px
}

.bgi-pagination {
    display: flex;
    align-items: center;
    gap: 4px
}

.bgi-pagination a {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #7185a3;
    text-decoration: none
}

.bgi-pagination a.is-current {
    background: #4f8b3b;
    color: #fff !important;
}

.bgi-books-empty {
    padding: 40px 24px;
    text-align: center
}

.bgi-books-empty h2 {
    margin: 0 0 8px;
    color: #333;
    font-family: inherit;
    font-size: 20px
}

.bgi-books-empty p {
    margin: 0;
    color: #74839a
}

/* Review page styles retained below. */
.bgi-review-page {
    width: 100%;
    box-sizing: border-box;
    color: #17284b;
    max-width: 1250px;
    margin: 0 auto
}

.bgi-review-page h1 {
    font-family: Georgia, 'Times New Roman', serif;
    color: #13244a;
    font-size: 34px;
    line-height: 1.15;
    margin: 0 0 5px
}

.bgi-back-link {
    margin: 0 0 18px
}

.bgi-back-link a {
    color: #4f873c;
    text-decoration: none
}

.bgi-review-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 26px
}

.bgi-review-page .bgi-subtitle {
    margin: 0;
    color: #7083a4;
    font-size: 17px
}

.bgi-review-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 4px
}

.bgi-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #7587a6
}

.bgi-step strong {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef0f3;
    font-size: 17px
}

.bgi-step small {
    font-size: 12px
}

.bgi-step.is-active {
    color: #4f873c
}

.bgi-step.is-active strong {
    background: #4f873c;
    color: #fff
}

.bgi-step-line {
    width: 90px;
    border-top: 2px dotted #d9dee6
}

.bgi-review-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, .9fr);
    gap: 18px
}

.bgi-panel {
    border: 1px solid #dce4ed;
    border-radius: 10px;
    padding: 24px;
    background: #fff;
    box-sizing: border-box
}

.bgi-panel h2 {
    font-family: Georgia, 'Times New Roman', serif;
    color: #19315d;
    margin: 0 0 20px;
    font-size: 24px
}

.bgi-book-detail-inner {
    display: grid;
    grid-template-columns: 215px 1fr;
    gap: 28px
}

.bgi-book-information h3 {
    font-family: Georgia, 'Times New Roman', serif;
    color: #19315d;
    font-size: 28px;
    margin: 0 0 4px
}

.bgi-book-information dl {
    display: grid;
    grid-template-columns: 135px 1fr;
    margin: 30px 0 0
}

.bgi-book-information dt, .bgi-book-information dd {
    margin: 0 0 12px;
    color: #52698c
}

.bgi-book-information dt {
    font-weight: 600
}

.bgi-review-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px
}

.bgi-credit-message {
    margin-top: 22px;
    padding: 18px;
    background: #f3f8ef;
    border-radius: 8px;
    color: #34445e
}

.bgi-credit-message-warning {
    background: #faf4e8
}

.bgi-credit-message p {
    margin: 7px 0
}

.bgi-phase3-notice {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f1f3f6;
    border-radius: 7px;
    color: #596b89;
    font-size: 13px
}

.bgi-primary-button, .bgi-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 7px;
    padding: 12px 22px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer
}

.bgi-primary-button {
    border: 0;
    background: #4f873c;
    color: #fff !important
}

.bgi-primary-button:hover {
    background: #447633;
    color: #fff !important
}

.bgi-secondary-button {
    border: 1px solid #ccd4df;
    background: #fff;
    color: #263958 !important
}

.bgi-primary-button[disabled] {
    opacity: .55;
    cursor: not-allowed
}

@media (max-width: 1050px) {
    .bgi-my-books-heading-row {
        flex-direction: column
    }

    .bgi-credit-box {
        width: 100%;
        min-width: 0
    }

    .bgi-books-header {
        display: none
    }

    .bgi-books-table-wrap.is-my-books .bgi-book-row, .bgi-books-table-wrap.is-printing .bgi-book-row {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 10px
    }

    .bgi-book-row > div {
        padding: 5px
    }

    .bgi-book-cell {
        grid-column: 1/-1
    }

    .bgi-book-actions-cell {
        grid-column: 1/-1
    }
}

@media (max-width: 760px) {
    .bgi-books-tabs {
        width: 100%
    }

    .bgi-books-table-wrap.is-my-books .bgi-book-row, .bgi-books-table-wrap.is-printing .bgi-book-row {
        grid-template-columns: 1fr
    }

    .bgi-book-listing-cell, .bgi-book-lightning-cell, .bgi-book-actions-cell {
        grid-column: auto
    }

    .bgi-book-actions-cell {
        flex-wrap: wrap
    }

    .bgi-books-footer {
        flex-direction: column;
        align-items: flex-start
    }

    .bgi-review-heading-row {
        flex-direction: column
    }

    .bgi-review-grid {
        grid-template-columns: 1fr
    }

    .bgi-book-detail-inner {
        grid-template-columns: 1fr
    }
}

/* Phase 3 UI refinement: match the supplied 1920x1080 reference and keep the
 * complete action group visible. The table gets a horizontal scroll only when
 * its minimum desktop width is wider than the available content area. */
.bgi-books-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c8d0da transparent;
    border-radius: 11px;
}

.bgi-books-scroll:focus-visible {
    outline: 2px solid #4f8b3b;
    outline-offset: 3px
}

.bgi-books-scroll .bgi-books-table-wrap {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.bgi-books-scroll .bgi-books-table-wrap.is-my-books {
    min-width: 1080px;
}

.bgi-books-scroll .bgi-books-table-wrap.is-printing {
    min-width: 760px;
}

.bgi-books-table-wrap.is-my-books .bgi-books-header,
.bgi-books-table-wrap.is-my-books .bgi-book-row {
    grid-template-columns: minmax(300px, 1.42fr) minmax(255px, 1.08fr) minmax(245px, 1fr) minmax(195px, .82fr);
}

.bgi-books-table-wrap.is-printing .bgi-books-header,
.bgi-books-table-wrap.is-printing .bgi-book-row {
    grid-template-columns: minmax(0, 1fr) minmax(170px, .28fr);
}

.bgi-book-actions-cell {
    min-width: 195px;
    flex-wrap: nowrap;
    padding-right: 18px !important;
}

.bgi-buy-button, .bgi-edit-button {
    flex: 0 0 auto
}

.bgi-book-listing-cell, .bgi-book-lightning-cell {
    overflow: visible
}

.bgi-list-on-bibliogarden {
    max-width: 100%;
}

@media (max-width: 1050px) {
    .bgi-books-scroll .bgi-books-table-wrap.is-my-books,
    .bgi-books-scroll .bgi-books-table-wrap.is-printing {
        min-width: 0
    }

    .bgi-books-scroll .bgi-books-table-wrap.is-my-books .bgi-books-header,
    .bgi-books-scroll .bgi-books-table-wrap.is-my-books .bgi-book-row,
    .bgi-books-scroll .bgi-books-table-wrap.is-printing .bgi-books-header,
    .bgi-books-scroll .bgi-books-table-wrap.is-printing .bgi-book-row {
        grid-template-columns: 1fr 1fr
    }
}

@media (max-width: 760px) {
    .bgi-books-scroll .bgi-books-table-wrap.is-my-books,
    .bgi-books-scroll .bgi-books-table-wrap.is-printing {
        min-width: 0
    }
}

/* Phase 4: Review / confirmation page - match the approved BiblioAuthor design. */
.bgi-review-page,
.bgi-review-page * {
    box-sizing: border-box
}

.bgi-review-page {
    max-width: 1250px;
    margin: 0 auto;
    color: #19315d;
    font-family: inherit
}

.bgi-review-page a,
.bgi-review-page a:visited {
    color: #4f873c;
    text-decoration: none
}

.bgi-review-page a:hover,
.bgi-review-page a:focus,
.bgi-review-page a:active {
    color: #4f873c !important;
    text-decoration: none
}

.bgi-review-page .bgi-back-link {
    margin: 0 0 17px;
    font-size: 14px;
    font-weight: 500
}

.bgi-review-page .bgi-back-link a:hover {
    color: #4f873c !important
}

.bgi-review-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin: 0 0 25px
}

.bgi-review-page h1 {
    margin: 0 0 4px;
    color: #4f873c;
    font-family: inherit;
    font-size: 33px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.5px
}

.bgi-review-page .bgi-subtitle {
    margin: 0;
    color: #7b8faf;
    font-size: 17px;
    line-height: 1.35
}

.bgi-review-stepper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-top: 0;
    min-width: 205px;
    justify-content: flex-end
}

.bgi-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #7d8eaa;
    font-size: 12px;
    white-space: nowrap
}

.bgi-step strong {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf0f4;
    color: #7587a4;
    font-size: 17px;
    font-weight: 600
}

.bgi-step.is-active, .bgi-step.is-complete {
    color: #4f873c
}

.bgi-step.is-active strong, .bgi-step.is-complete strong {
    background: #4f873c;
    color: #fff
}

.bgi-step-line {
    width: 86px;
    border-top: 2px dotted #d7dde6;
    margin-top: 19px
}

.bgi-step-line.is-complete {
    border-color: #4f873c
}

.bgi-review-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(390px, .92fr);
    gap: 18px
}

.bgi-review-page .bgi-panel {
    border: 1px solid #dce4ed;
    border-radius: 9px;
    background: #fff;
    padding: 22px 23px;
    box-shadow: none
}

.bgi-review-page .bgi-panel h2 {
    margin: 0 0 18px;
    color: #17315c;
    font-family: inherit;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2
}

.bgi-book-detail-inner {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 29px;
    align-items: start
}

.bgi-review-page .bgi-book-cover {
    width: 168px;
    height: 235px;
    overflow: hidden;
    border-radius: 6px;
    background: #f3f4f5
}

.bgi-review-page .bgi-book-cover img {
    width: 168px;
    height: 235px;
    display: block;
    object-fit: cover
}

.bgi-book-information h3 {
    margin: 0 0 4px;
    color: #19315d;
    font-family: inherit;
    font-size: 27px;
    font-weight: 600;
    line-height: 1.15
}

.bgi-review-page .bgi-book-author {
    margin: 0;
    color: #667d9e;
    font-size: 15px;
    line-height: 1.4
}

.bgi-book-information dl {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    column-gap: 8px;
    margin: 28px 0 0
}

.bgi-book-information dt, .bgi-book-information dd {
    margin: 0 0 10px;
    color: #52698c;
    font-size: 15px;
    line-height: 1.35
}

.bgi-book-information dt {
    font-weight: 700
}

.bgi-book-information dd {
    font-weight: 400
}

.bgi-review-page .bgi-subscription-panel {
    padding: 22px 23px
}

.bgi-review-page .bgi-credit-summary {
    margin-top: 78px
}

.bgi-review-page .bgi-credit-heading {
    font-size: 13px;
    color: #243a5e
}

.bgi-review-page .bgi-credit-heading strong {
    font-size: 13px
}

.bgi-review-page .bgi-credit-progress {
    height: 9px;
    margin: 9px 0 9px;
    background: #e8eaed
}

.bgi-review-page .bgi-credit-remaining {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: #243a5e;
    margin-bottom: 18px
}

.bgi-review-page .bgi-credit-remaining strong {
    font-size: 29px;
    line-height: 1;
    font-weight: 700
}

.bgi-review-page .bgi-credit-remaining span {
    font-size: 16px
}

.bgi-review-page .bgi-credit-message {
    margin: 0;
    padding: 16px 18px;
    border-radius: 8px;
    background: #faf3e5;
    color: #34445e
}

.bgi-review-page .bgi-credit-message-warning {
    background: #faf3e5
}

.bgi-review-page .bgi-credit-message strong {
    display: block;
    color: #243a5e;
    font-size: 16px;
    line-height: 1.3
}

.bgi-review-page .bgi-credit-message p {
    margin: 7px 0 0;
    font-size: 14px;
    line-height: 1.4
}

.bgi-review-page .bgi-primary-button,
.bgi-review-page .bgi-secondary-button {
    min-height: 43px;
    border-radius: 6px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1
}

.bgi-review-page .bgi-primary-button {
    background: #4f873c;
    color: #fff !important;
    border: 1px solid #4f873c
}

.bgi-review-page .bgi-primary-button:hover {
    background: #467b35;
    color: #fff !important
}

.bgi-review-page .bgi-secondary-button {
    background: #fff;
    color: #263958 !important;
    border: 1px solid #cfd7e2
}

.bgi-review-page .bgi-secondary-button:hover {
    background: #f6f8fa;
    color: #263958 !important
}

.bgi-review-page .bgi-credit-message .bgi-primary-button {
    display: flex;
    width: 100%;
    margin-top: 16px
}

.bgi-review-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 22px
}

.bgi-review-actions .bgi-primary-button {
    cursor: pointer
}

.bgi-review-actions .bgi-secondary-button {
    cursor: pointer
}

.bgi-form-notices {
    margin-top: 14px
}

.bgi-form-notices .woocommerce-error, .bgi-form-notices .woocommerce-message, .bgi-form-notices .woocommerce-info {
    margin: 0 !important
}

.bgi-review-page .woocommerce-error a:hover,
.bgi-review-page .woocommerce-message a:hover,
.bgi-review-page .woocommerce-info a:hover {
    color: #4f873c !important
}

/* Success page */
.bgi-success-panel {
    max-width: 100%;
    padding: 30px !important
}

.bgi-success-book {
    display: flex;
    align-items: center;
    gap: 22px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e9ef
}

.bgi-book-cover-large, .bgi-book-cover-large img {
    width: 120px;
    height: 168px;
    object-fit: cover;
    border-radius: 6px;
    display: block
}

.bgi-success-book h2 {
    margin: 0 0 5px;
    color: #19315d;
    font-family: inherit;
    font-size: 27px
}

.bgi-success-book p {
    margin: 0;
    color: #667d9e;
    font-size: 15px
}

.bgi-success-status {
    margin-top: 14px
}

.bgi-success-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 24px 0
}

.bgi-success-details div {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.bgi-success-details strong {
    font-size: 13px;
    color: #52698c
}

.bgi-success-details span {
    font-size: 15px;
    color: #19315d
}

.bgi-success-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 5px
}

.bgi-success-actions .bgi-button-disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none
}

/* Prevent the WordPress/theme link hover rule from turning integration links blue. */
.bgi-my-books-page a:hover,
.bgi-my-books-page a:focus,
.bgi-my-books-page a:active,
.bgi-my-books-page a:visited,
.bgi-my-books-page .btn:hover,
.bgi-my-books-page .btn:focus,
.bgi-my-books-page .btn:active {
    color: inherit
}

.bgi-my-books-page .bgi-book-title:hover,
.bgi-my-books-page .bgi-book-title:focus {
    color: #282828 !important
}

@media (max-width: 900px) {
    .bgi-review-heading-row {
        flex-direction: column
    }

    .bgi-review-stepper {
        justify-content: flex-start
    }

    .bgi-review-grid {
        grid-template-columns: 1fr
    }

    .bgi-review-page .bgi-credit-summary {
        margin-top: 20px
    }

    .bgi-success-details {
        grid-template-columns: 1fr
    }
}

@media (max-width: 600px) {
    .bgi-book-detail-inner {
        grid-template-columns: 1fr
    }

    .bgi-review-page .bgi-book-cover, .bgi-review-page .bgi-book-cover img {
        width: 145px;
        height: 203px
    }

    .bgi-book-information dl {
        grid-template-columns: 110px minmax(0, 1fr)
    }

    .bgi-review-actions, .bgi-success-actions {
        flex-direction: column;
        align-items: stretch
    }

    .bgi-review-actions > *, .bgi-success-actions > * {
        width: 100%;
        text-align: center
    }
}

/* Phase 4 revised: approved listing-review and listing-success layouts. */
.bgi-review-page,
.bgi-success-page {
    color: #17315c;
    font-family: inherit;
    box-sizing: border-box
}

.bgi-review-page *,
.bgi-success-page * {
    box-sizing: border-box
}

.bgi-review-page a,
.bgi-review-page a:visited,
.bgi-success-page a,
.bgi-success-page a:visited {
    color: #4f873c;
    text-decoration: none
}

.bgi-review-page a:hover,
.bgi-review-page a:focus,
.bgi-review-page a:active,
.bgi-success-page a:hover,
.bgi-success-page a:focus,
.bgi-success-page a:active {
    color: #4f873c !important;
    text-decoration: none
}

.bgi-review-page {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 0 22px
}

.bgi-review-page .bgi-back-link,
.bgi-success-page .bgi-back-link {
    margin: 0 0 13px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3
}

.bgi-review-page .bgi-back-link a,
.bgi-success-page .bgi-back-link a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #4f873c !important
}

.bgi-review-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 18px
}

.bgi-review-heading-copy {
    min-width: 0
}

.bgi-review-page h1 {
    margin: 0 0 3px;
    color: #122f5d;
    font-family: inherit;
    font-size: 34px;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -.7px
}

.bgi-review-page .bgi-subtitle {
    margin: 0;
    color: #7287a6;
    font-size: 17px;
    line-height: 1.3
}

.bgi-review-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 10px;
    min-width: 205px;
    padding-top: 0
}

.bgi-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #7e8da7;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap
}

.bgi-step strong {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #edf0f5;
    color: #73839e;
    font-size: 16px;
    font-weight: 600
}

.bgi-step.is-active {
    color: #4f873c
}

.bgi-step.is-active strong {
    background: #4f873c;
    color: #fff
}

.bgi-step-line {
    width: 78px;
    margin-top: 18px;
    border-top: 2px dotted #d6dce5
}

.bgi-review-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, .9fr);
    gap: 14px
}

.bgi-review-page .bgi-panel {
    border: 1px solid #dce4ed;
    border-radius: 8px;
    background: #fff;
    padding: 17px 19px;
    box-shadow: none
}

.bgi-review-page .bgi-panel h2 {
    margin: 0 0 15px;
    color: #17315c;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2
}

.bgi-book-detail-inner {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 22px;
    align-items: start
}

.bgi-review-page .bgi-book-cover {
    width: 148px;
    height: 207px;
    overflow: hidden;
    border-radius: 5px;
    background: #f2f3f5
}

.bgi-review-page .bgi-book-cover img {
    display: block;
    width: 148px;
    height: 207px;
    object-fit: cover
}

.bgi-book-information h3 {
    margin: 0 0 4px;
    color: #19315d;
    font-family: inherit;
    font-size: 25px;
    font-weight: 600;
    line-height: 1.15
}

.bgi-review-page .bgi-book-author {
    margin: 0;
    color: #6880a1;
    font-size: 15px;
    line-height: 1.35
}

.bgi-book-information dl {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    column-gap: 7px;
    margin: 22px 0 0
}

.bgi-book-information dt, .bgi-book-information dd {
    margin: 0 0 7px;
    color: #526b8e;
    font-size: 14px;
    line-height: 1.3
}

.bgi-book-information dt {
    font-weight: 700
}

.bgi-book-information dd {
    font-weight: 400
}

.bgi-review-page .bgi-subscription-panel {
    padding: 17px 19px
}

.bgi-review-has-credit .bgi-credit-summary {
    margin-top: 38px
}

.bgi-review-page .bgi-credit-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #223a60;
    font-size: 13px;
    line-height: 1.2
}

.bgi-review-page .bgi-credit-heading strong {
    font-size: 13px
}

.bgi-review-page .bgi-credit-progress {
    height: 9px;
    margin: 8px 0 9px;
    background: #e7e9ed;
    border-radius: 999px;
    overflow: hidden
}

.bgi-review-page .bgi-credit-progress span {
    display: block;
    height: 100%;
    background: #4f873c;
    border-radius: 999px
}

.bgi-review-page .bgi-credit-remaining {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin: 0 0 17px;
    color: #243a5e
}

.bgi-review-page .bgi-credit-remaining strong {
    font-size: 28px;
    line-height: 1;
    font-weight: 700
}

.bgi-review-page .bgi-credit-remaining span {
    font-size: 16px
}

.bgi-credit-message-info, .bgi-credit-message-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 14px 15px;
    border-radius: 8px
}

.bgi-credit-message-info {
    background: #faf3e5;
    color: #31455f
}

.bgi-credit-message-warning {
    background: #faf3e5;
    color: #31455f
}

.bgi-credit-message p {
    margin: 0 0 5px;
    font-size: 14px;
    line-height: 1.38
}

.bgi-credit-message p:last-child {
    margin-bottom: 0
}

.bgi-credit-message strong {
    color: #253a5c;
    font-weight: 700
}

.bgi-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #8a6c45;
    color: #fff;
    font-family: Georgia, serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1
}

.bgi-no-credit-panel {
    display: flex;
    flex-direction: column;
    min-height: 335px
}

.bgi-no-credit-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1;
    padding: 4px 0 14px;
    color: #19315d;
    text-align: center
}

.bgi-book-line-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #e9f6e8;
    color: #4f873c
}

.bgi-book-line-icon svg {
    width: 38px;
    height: 38px
}

.bgi-no-credit-hero strong {
    font-size: 19px;
    font-weight: 700
}

.bgi-purchase-button {
    width: 100%;
    margin-top: 14px
}

.bgi-primary-button, .bgi-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none !important;
    box-sizing: border-box
}

.bgi-primary-button {
    border: 1px solid #4f873c;
    background: #4f873c;
    color: #fff !important
}

.bgi-primary-button:hover, .bgi-primary-button:focus {
    background: #467a35;
    color: #fff !important
}

.bgi-secondary-button {
    border: 1px solid #cbd4df;
    background: #fff;
    color: #263958 !important
}

.bgi-secondary-button:hover, .bgi-secondary-button:focus {
    background: #f7f8fa;
    color: #263958 !important
}

.bgi-what-next {
    margin-top: 13px;
    padding: 13px 19px !important
}

.bgi-what-next h2 {
    margin-bottom: 10px !important
}

.bgi-next-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr)
}

.bgi-next-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 7px 25px 7px 5px;
    min-height: 76px;
    border-right: 1px solid #dfe5ec
}

.bgi-next-item:last-child {
    border-right: 0;
    padding-right: 5px
}

.bgi-next-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #e8f5e6;
    color: #4f873c
}

.bgi-next-icon svg {
    width: 35px;
    height: 35px
}

.bgi-next-item strong {
    display: block;
    margin-bottom: 3px;
    color: #17315c;
    font-size: 14px;
    line-height: 1.2
}

.bgi-next-item p {
    margin: 0;
    color: #7187a7;
    font-size: 12px;
    line-height: 1.35
}

.bgi-review-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px
}

.bgi-review-actions .bgi-primary-button {
    cursor: pointer
}

.bgi-review-disclaimer {
    margin: 7px 0 0;
    color: #7b8da7;
    font-size: 11px;
    line-height: 1.25;
    text-align: right
}

.bgi-form-notices {
    margin-top: 12px
}

.bgi-form-notices .woocommerce-error, .bgi-form-notices .woocommerce-message, .bgi-form-notices .woocommerce-info {
    margin: 0 !important
}

/* Success screen */
.bgi-success-page {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 0 24px
}

.bgi-success-hero {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 17px;
    align-items: center;
    margin: 0 0 23px
}

.bgi-success-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: #e5f5e3;
    color: #3f8435;
    font-size: 55px;
    font-weight: 500;
    line-height: 1
}

.bgi-success-page h1 {
    margin: 0 0 4px;
    color: #122f5d;
    font-family: inherit;
    font-size: 34px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.7px
}

.bgi-success-lead {
    margin: 0 0 4px;
    color: #7087a8;
    font-size: 17px;
    line-height: 1.3
}

.bgi-success-copy {
    margin: 0;
    color: #7a8fac;
    font-size: 15px;
    line-height: 1.35
}

.bgi-success-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.48fr) minmax(350px, .86fr);
    gap: 14px
}

.bgi-success-page .bgi-panel {
    border: 1px solid #dce4ed;
    border-radius: 8px;
    background: #fff;
    padding: 17px 19px;
    box-shadow: none
}

.bgi-success-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 13px
}

.bgi-success-page .bgi-panel h2 {
    margin: 0;
    color: #17315c;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2
}

.bgi-listed-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 17px;
    border-radius: 20px;
    background: #e5f5e3;
    color: #397d32;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap
}

.bgi-success-book-details {
    display: grid;
    grid-template-columns: 185px minmax(0, 1fr);
    gap: 23px;
    align-items: start
}

.bgi-success-cover, .bgi-success-cover img {
    width: 145px;
    height: 203px;
    display: block;
    object-fit: cover;
    border-radius: 5px
}

.bgi-success-book-info h3 {
    margin: 0 0 4px;
    color: #19315d;
    font-size: 25px;
    font-weight: 600;
    line-height: 1.15
}

.bgi-success-author {
    margin: 0;
    color: #6880a1;
    font-size: 15px;
    line-height: 1.35
}

.bgi-success-book-info dl {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    column-gap: 8px;
    margin: 19px 0 0
}

.bgi-success-book-info dt, .bgi-success-book-info dd {
    margin: 0 0 7px;
    color: #526b8e;
    font-size: 14px;
    line-height: 1.28
}

.bgi-success-book-info dt {
    font-weight: 700
}

.bgi-success-book-info dd {
    font-weight: 400
}

.bgi-success-subscription-panel {
    padding: 17px 19px !important
}

.bgi-success-feature {
    display: grid;
    grid-template-columns: 57px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin: 13px 0 21px
}

.bgi-success-feature:last-child {
    margin-bottom: 0
}

.bgi-success-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 57px;
    height: 57px;
    border-radius: 50%;
    background: #e7f5e5;
    color: #4f873c
}

.bgi-success-feature-icon svg {
    width: 32px;
    height: 32px
}

.bgi-success-feature strong {
    display: block;
    margin-bottom: 3px;
    color: #19315d;
    font-size: 16px;
    line-height: 1.2
}

.bgi-success-feature p {
    margin: 0;
    color: #7489a8;
    font-size: 12px;
    line-height: 1.4
}

.bgi-success-actions {
    display: flex;
    justify-content: center;
    gap: 13px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #dfe5ec
}

.bgi-success-actions .bgi-button-disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none
}

/* Keep theme hover rules from changing this feature to blue. */
.bgi-review-page a:hover, .bgi-review-page a:focus, .bgi-review-page button:hover, .bgi-review-page button:focus,
.bgi-success-page a:hover, .bgi-success-page a:focus {
    color: #4f873c
}

.bgi-review-page .bgi-primary-button:hover, .bgi-review-page .bgi-primary-button:focus,
.bgi-success-page .bgi-primary-button:hover, .bgi-success-page .bgi-primary-button:focus {
    color: #fff !important
}

.bgi-review-page .bgi-secondary-button:hover, .bgi-review-page .bgi-secondary-button:focus,
.bgi-success-page .bgi-secondary-button:hover, .bgi-success-page .bgi-secondary-button:focus {
    color: #263958 !important
}

@media (max-width: 900px) {
    .bgi-review-page, .bgi-success-page {
        max-width: none
    }

    .bgi-review-heading-row {
        flex-direction: column
    }

    .bgi-review-stepper {
        justify-content: flex-start
    }

    .bgi-review-grid, .bgi-success-grid {
        grid-template-columns: 1fr
    }

    .bgi-next-grid {
        grid-template-columns: 1fr
    }

    .bgi-next-item {
        border-right: 0;
        border-bottom: 1px solid #dfe5ec;
        padding: 10px 5px
    }

    .bgi-next-item:last-child {
        border-bottom: 0
    }
}

@media (max-width: 600px) {
    .bgi-book-detail-inner, .bgi-success-book-details {
        grid-template-columns: 1fr
    }

    .bgi-review-page .bgi-book-cover, .bgi-review-page .bgi-book-cover img, .bgi-success-cover, .bgi-success-cover img {
        width: 145px;
        height: 203px
    }

    .bgi-review-actions, .bgi-success-actions {
        flex-direction: column;
        align-items: stretch
    }

    .bgi-review-actions > *, .bgi-success-actions > * {
        width: 100%;
        text-align: center
    }

    .bgi-success-hero {
        grid-template-columns: 1fr
    }

    .bgi-success-check {
        width: 68px;
        height: 68px;
        font-size: 44px
    }

    .bgi-success-page h1 {
        font-size: 29px
    }

    .bgi-review-page h1 {
        font-size: 29px
    }

    .bgi-review-stepper {
        min-width: 0
    }
}

/* Phase 4.1: credit preview and failure-state refinement. */
.bgi-review-page .bgi-credit-message-copy {
    min-width: 0;
    flex: 1
}

.bgi-review-page .bgi-credit-message-info {
    display: flex;
    align-items: flex-start;
    gap: 13px
}

.bgi-review-page .bgi-after-listing {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid rgba(160, 132, 87, .20);
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: baseline;
    column-gap: 7px;
    color: #34445e;
    font-size: 14px;
    line-height: 1.45
}

.bgi-review-page .bgi-after-listing-label {
    font-weight: 500
}

.bgi-review-page .bgi-after-listing strong {
    color: #243a5e;
    font-weight: 700
}

.bgi-review-page .bgi-after-listing-dot {
    color: #8b7a60
}

.bgi-review-page .bgi-form-notices .woocommerce-error {
    background: #e52f42 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 17px 20px !important;
    box-shadow: none !important
}

.bgi-review-page .bgi-form-notices .woocommerce-error:before {
    color: #fff !important
}

.bgi-review-page .bgi-form-notices .woocommerce-error a,
.bgi-review-page .bgi-form-notices .woocommerce-error a:hover {
    color: #fff !important
}

@media (max-width: 620px) {
    .bgi-review-page .bgi-after-listing {
        grid-template-columns: 1fr;
        row-gap: 2px
    }

    .bgi-review-page .bgi-after-listing-dot {
        display: none
    }
}

```

/* Final My Books button refinements */
.bgi-my-books-page .bgi-list-on-bibliogarden,
.bgi-my-books-page .bgi-outline-green-button,
.bgi-my-books-page .bgi-book-lightning-cell .btn,
.bgi-my-books-page .bgi-buy-button,
.bgi-my-books-page .bgi-edit-button {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    box-sizing: border-box;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Keep the active My Books / In Printing tab text white. */
.bgi-my-books-page .bgi-books-tabs a.is-active,
.bgi-my-books-page .bgi-books-tabs a.is-active:visited,
.bgi-my-books-page .bgi-books-tabs a.is-active:hover,
.bgi-my-books-page .bgi-books-tabs a.is-active:focus,
.bgi-my-books-page .bgi-books-tabs a.is-active:active {
    color: #fff !important;
}

/* Make Get Credits shorter without changing its width/style. */
.bgi-my-books-page .bgi-credit-bottom a {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box;
}
