/**
 * Bond Manager Pro - Frontend Styles (IndiaBonds Inspired Redesign)
 */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --bmp-color-dark: #172E44; /* Dark Navy */
    --bmp-color-primary: #163E71; /* Medium Blue */
    --bmp-color-accent: #CBA128; /* Gold */
    --bmp-color-danger: #C00000; /* Red */
    --bmp-color-white: #FFFFFF;
    --bmp-color-black: #000000;
    
    --bmp-color-bg: #F4F5F7;
    --bmp-color-surface: #FFFFFF;
    --bmp-color-border: #E8EBF0;
    --bmp-color-text: #4A5568;
    --bmp-color-text-muted: #718096;
    
    --bmp-radius-sm: 6px;
    --bmp-radius-md: 12px;
    --bmp-radius-lg: 16px;
    --bmp-shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --bmp-shadow-md: 0 8px 16px rgba(23, 46, 68, 0.08);
    
    --bmp-font-sans: 'DM Sans', sans-serif;
    --bmp-space-1: 4px;
    --bmp-space-2: 8px;
    --bmp-space-3: 12px;
    --bmp-space-4: 16px;
    --bmp-space-5: 24px;
    --bmp-space-6: 32px;
}

.bmp-container {
    max-width: 95%;
    margin: 0 auto;
    padding: var(--bmp-space-5);
    font-family: var(--bmp-font-sans);
    color: var(--bmp-color-text);
}

/* ---------- Typography & Base ---------- */
.bmp-prose { line-height: 1.6; }
h1, h2, h3, h4 { color: var(--bmp-color-black); font-family: var(--bmp-font-sans); }

/* ---------- Badges ---------- */
.bmp-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: #E8F5E9;
    color: #2E7D32;
    text-transform: uppercase;
}
.bmp-badge--status-active { background: #E8F5E9; color: #2E7D32; }
.bmp-badge--status-upcoming { background: #FFF8E1; color: var(--bmp-color-accent); }
.bmp-badge--status-matured, .bmp-badge--status-closed { background: #F1F3F5; color: var(--bmp-color-text-muted); }
.bmp-badge--status-suspended { background: #FFEBEE; color: var(--bmp-color-danger); }

/* ---------- Top Header (Dark Strip) ---------- */
.bmp-bond-header {
    background: linear-gradient(45deg, black, #ad0000);
    color: var(--bmp-color-white);
    padding: var(--bmp-space-5) var(--bmp-space-6);
    border-radius: var(--bmp-radius-lg) var(--bmp-radius-lg) 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--bmp-space-4);
}
.bmp-bond-header__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bmp-color-white);
    line-height: 1.2;
}
.bmp-bond-header__meta {
    display: flex;
    gap: var(--bmp-space-3);
    align-items: center;
}
.bmp-badge--category { background: var(--bmp-color-white); color: var(--bmp-color-dark); }

.bmp-bond-layout__aside .bmp-bond-header, .bmp-bond-layout__aside .bmp-highlights{
    display: none;
}
.bmp-bond-layout__main .bmp-bond-header, .bmp-bond-layout__main .bmp-highlights{
    display: block;
}

/* ---------- Highlights Box ---------- */
.bmp-highlights {
    background: #fcf8f8;
    border: 1px solid var(--bmp-color-border);
    border-top: none;
    border-radius: 0 0 var(--bmp-radius-lg) var(--bmp-radius-lg);
    padding: var(--bmp-space-5) var(--bmp-space-6);
    margin-bottom: var(--bmp-space-6);
}
.bmp-highlights__title { display: none; } /* Hidden to match reference */
.bmp-highlights__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--bmp-space-4);
}
.bmp-highlight { display: flex; flex-direction: column; gap: 4px; }
.bmp-highlight__label {
    font-size: 0.9rem;
    color: #676767;
    font-weight: 500;
}
.bmp-highlight__value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
    text-transform: inherit;
    
}
.bmp-quantity {
    display: flex;
    align-items: center;
}
.bmp-field input[type="date"] {
    background-color: transparent !important;
    color: #fff !important;
    border: none !important;
    text-align: left;
    padding: 0;
    font-size: 1.2rem;
}
.bmp-quantity .bmp-minus,
.bmp-quantity .bmp-plus {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #a00606;
    background: #a00606;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.bmp-quantity .bmp-minus {
    border-radius: 4px 0 0 4px;
}

.bmp-quantity .bmp-plus {
    border-radius: 0 4px 4px 0;
}

.bmp-quantity .bmp-input {
    width: 70px;
    height: 40px;
    margin: 0;
    padding: 0 5px;
    border: 1px solid #ddd;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    text-align: center;
}

/* Hide browser's default number arrows */
.bmp-quantity .bmp-input::-webkit-inner-spin-button,
.bmp-quantity .bmp-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bmp-quantity .bmp-input {
    -moz-appearance: textfield;
}
/* ---------- Archive (IndiaBonds Inspired Cards) ---------- */
.bmp-bond-archive {
    background: var(--bmp-color-bg);
    padding: var(--bmp-space-7) 0;
    font-family: var(--bmp-font-sans);
}
.bmp-archive-header { margin-bottom: var(--bmp-space-6); }
.bmp-archive-header h1 {
    margin: 0 0 var(--bmp-space-2);
    font-size: 2.7rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #ed1b24;
    line-height: 1.2;
}
.bmp-archive-header {
    margin-top: 50px;
}
.bmp-archive-header p { color: var(--bmp-color-text-muted); margin: 0; }

.bmp-bond-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--bmp-space-5);
}

.bmp-bond-card {
    background: var(--bmp-color-surface);
    border: 1px solid var(--bmp-color-border);
    border-radius: var(--bmp-radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bmp-bond-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bmp-shadow-md);
    border-color: #d1d5db;
}

/* Card Header: Logo & Title */
.bmp-bond-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--bmp-space-3);
}
.bmp-bond-card__issuer-info {
    display: flex;
    align-items: center;
    gap: 16px;
}
.bmp-bond-card__logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ed1b240d;
    border: 1px solid #ed1b24;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.bmp-bond-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.bmp-bond-card__issuer-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bmp-color-dark);
    margin: 0;
    line-height: 1.3;
}
.bmp-bond-card__share {
    color: #ed1b24;
    cursor: pointer;
    padding: 4px;
}
.bmp-bond-card__share:hover { color: var(--bmp-color-dark); }

/* Card Body: Stats Grid */
.bmp-bond-card__stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 12px;
}
.bmp-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bmp-stat__label {
    font-size: 0.75rem;
    color: var(--bmp-color-text-muted);
    font-weight: 500;
}
.bmp-stat__value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bmp-color-dark);
}
.bmp-stat__value--highlight {
    color: #0d9488; /* Teal color matching the reference yield highlight */
}

/* Card Footer: Button */
.bmp-bond-card__footer {
    margin-top: auto;
    text-align: center;
    display: flex;
    justify-content: center;
}
.bmp-bond-card__footer .bmp-button {
        width: auto;
    min-width: 100%;
    padding: 5px 32px;
    margin: 0;
    border-radius: 5px;
    font-size: 1rem;
}

/* Pagination */
.bmp-pagination {
    display: flex;
    gap: var(--bmp-space-2);
    margin-top: var(--bmp-space-6);
    justify-content: center;
}
.bmp-pagination a, .bmp-pagination span {
    padding: var(--bmp-space-2) var(--bmp-space-3);
    border: 1px solid var(--bmp-color-border);
    border-radius: var(--bmp-radius-sm);
    text-decoration: none;
    color: var(--bmp-color-text);
    font-size: 0.88rem;
}
.bmp-pagination a:hover {
    border-color: var(--bmp-color-primary);
    color: var(--bmp-color-primary);
}
.bmp-pagination .current {
    background: var(--bmp-color-dark);
    color: #fff;
    border-color: var(--bmp-color-dark);
}
.bmp-empty {
    color: var(--bmp-color-text-muted);
    font-style: italic;
}
@media (max-width: 768px) {
    .bmp-highlights__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Main Layout ---------- */
.bmp-bond-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: var(--bmp-space-6);
    align-items: start;
}
@media (max-width: 992px) {
    .bmp-bond-layout { grid-template-columns: 1fr; }
}
.bmp-bond-layout__aside {
    position: sticky;
    top: var(--bmp-space-5);
}

/* ---------- Accordion-style Cards (Left Column) ---------- */
.bmp-card {
    background: var(--bmp-color-surface);
    border-radius: var(--bmp-radius-md);
    padding: var(--bmp-space-5);
    margin-bottom: var(--bmp-space-4);
    box-shadow: var(--bmp-shadow-sm);
    border: 1px solid var(--bmp-color-border);
}
.bmp-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 var(--bmp-space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--bmp-color-black);
    line-height: 1.2;
}
.bmp-calculator h2.bmp-calculator__title {
    color: #fff !important;
    line-height: 1.2;
}


/* ---------- Calculator Box (Right Column) ---------- */
.bmp-calculator {
    background: linear-gradient(45deg, black, #ad0000);
    color: var(--bmp-color-white);
    border: none;
}
.bmp-calculator__title { display: none; }
.bmp-calculator__inputs {
    display: flex;
    flex-direction: row;
    gap: var(--bmp-space-4);
    margin-bottom: var(--bmp-space-5);
}
.bmp-field {
    display: flex;
    justify-content: space-between;
    align-items: start;
    background: rgba(0,0,0,0.2);
    padding: 10px 14px;
    border-radius: var(--bmp-radius-sm);
        flex-direction: column;
        width: 100%;
}
.bmp-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--bmp-color-white);
}
.bmp-field__hint { display: none; }
.bmp-input {
    background: transparent;
    border: none;
    color: var(--bmp-color-white);
    font-family: var(--bmp-font-sans);
    font-weight: 700;
    font-size: 1rem;
    text-align: right;
    width: 120px;
}
.bmp-input:focus { outline: none; }
.bmp-input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }

/* Calculator Results */
.bmp-calculator__results {
    background: rgba(255,255,255,0.05);
    border-radius: var(--bmp-radius-sm);
    padding: var(--bmp-space-4);
}
.bmp-result {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1rem;
}
.bmp-result:last-child { margin-bottom: 0; }
.bmp-result__label { color: rgba(255,255,255,0.9); }
.bmp-result__value { font-weight: 700; }
.bmp-result__value--accent { color: #ffd866; }

/* Primary Settlement Result */
.bmp-result--primary {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--bmp-space-5);
    padding-top: var(--bmp-space-4);
    border-top: 1px dashed rgba(255,255,255,0.2);
    text-align: center;
}
.bmp-result--primary .bmp-result__label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--bmp-color-white);
}
.bmp-result--primary .bmp-result__value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--bmp-color-white);
}

/* CTA Button */
.bmp-calculator__download {
    display: block;
    width: 100%;
    background: var(--bmp-color-white);
    color: #940000;
    text-align: center;
    padding: 14px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    margin-top: var(--bmp-space-5);
    transition: 0.2s;
}
.bmp-calculator__download:hover, .bmp-calculator__download:focus {
    background: #ec1113;
    color: var(--bmp-color-white);
}

/* Loading/Status */
.bmp-calculator__status { color: #FFF; font-size: 0.8rem; text-align: center; margin-top: 10px; }
.bmp-calculator--loading { opacity: 0.7; pointer-events: none; }

/* ---------- Cashflow Table (Preserving core structure) ---------- */
.bmp-table-scroll { overflow-x: auto; }
.bmp-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.bmp-table th, .bmp-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #7a0606; border-color: #7a0606;}
.bmp-table td{
    font-size: 14px;
    color: #000;
}
table.bmp-table tr {
    border-color: #7a0606;
}
.bmp-table thead th { 
    color: #ffffff;
    font-weight: 600;
    background: linear-gradient(45deg, #960101, #ad0000);
    font-size: 16px;
    
}
.bmp-table__num { text-align: right; font-variant-numeric: tabular-nums; }
.bmp-table__num--strong { font-weight: 700; color: var(--bmp-color-dark); }
.bmp-table tfoot td { font-weight: 700; border-top: 2px solid var(--bmp-color-border); }

/* ---------- Documents (Pill Buttons) ---------- */
.bmp-documents__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bmp-space-3);
    list-style: none;
    padding: 0; margin: 0;
}
.bmp-documents__item { display: inline-block; }
.bmp-documents__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--bmp-color-primary);
    border-radius: 20px;
    text-decoration: none;
    color: var(--bmp-color-primary);
    font-weight: 600;
    font-size: 0.85rem;
    transition: 0.2s;
}
.bmp-documents__link:hover {
    background: var(--bmp-color-primary);
    color: var(--bmp-color-white);
}
.bmp-documents__icon, .bmp-documents__type { display: none; } /* Simplified to match reference */

/* ---------- FAQ ---------- */
.bmp-faq__item {
    border-bottom: 1px solid var(--bmp-color-border);
    padding: var(--bmp-space-3) 0;
}
.bmp-faq__item:last-child { border-bottom: none; }
.bmp-faq__item summary {
    font-weight: 600;
    cursor: pointer;
    color: var(--bmp-color-dark);
}
.bmp-faq__item p {
    margin-top: 10px;
    color: var(--bmp-color-text);
}
.bmp-field {
    font-size: 0.95rem;
}
@media (max-width:1440px){
    .bmp-container {
    max-width: 100%;
}
    .bmp-bond-layout{
        grid-template-columns: minmax(0, 1fr) 360px;
    }
    .bmp-quantity .bmp-input {
    width: 50px;
    height: 30px;
    padding: 0 3px;
}
.bmp-field label {
    font-size: 0.75rem;
}
.bmp-result {
    margin-bottom: 6px;
}
.bmp-field {
    font-size: 0.85rem;
}
.bmp-quantity .bmp-minus, .bmp-quantity .bmp-plus {
    width: 25px;
    height: 30px;
}
.bmp-table thead th {
    font-size: 14px;
    line-height: 1.2;
}
.bmp-table td {
    font-size: 12px;
    line-height: 1.2;
    padding: 7px;
    letter-spacing: -0.3px;
}
}
@media (max-width:1200px){
    .bmp-bond-layout {
    display: flex;
    flex-direction: column-reverse;
}
.bmp-bond-layout__aside {
    position: relative;
    width: 100%;
}
 .bmp-calculator {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding-top: 0;
}   
.bmp-calculator h2.bmp-calculator__title {
    line-height: 1.2;
    width: 100%;
    order: 1;
}
.bmp-calculator__inputs {
    width: 48%;
    order: 2;
    margin: 0;
}
.bmp-calculator__results {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    order: 4;
}
a.bmp-calculator__download {
    order: 3;
    width: 35%;
    margin: 0;
    align-self: center;
}
.bmp-result {
    display: flex;
    flex-direction: column;
    width: 20%;
    justify-content: center;
}
.bmp-calculator {
    border: none;
    display: flex;
    flex-wrap: wrap;
}
.bmp-result--primary {
    padding-left: var(--bmp-space-4);
    border-left: 1px dashed rgba(255,255,255,0.2);
    margin: 0;
    border-top: none;
    padding-top: 0;
}
.bmp-container {
    padding-top: 0;
}
}
@media (max-width:991px){
    .bmp-calculator__inputs {
    width: 55%;
}
.bmp-result {
    width: 25%;
}
.bmp-result--primary {
    padding: var(--bmp-space-4);
    border: 1px dashed rgba(255,255,255,0.2);
    margin-top: 20px;
    width: 100%;
    border-top: 1px dashed rgba(255,255,255,0.2);
    padding-top: var(--bmp-space-4);
}
a.bmp-calculator__download {
    width: 42%;
}
.bmp-bond-layout__aside .bmp-bond-header, .bmp-bond-layout__aside .bmp-highlights{
    display: block;
}
.bmp-bond-layout__main .bmp-bond-header, .bmp-bond-layout__main .bmp-highlights{
    display: none;
}
}
@media (max-width:767px){
    a.bmp-calculator__download {
    order: 5;
    width: 100%;
}
.bmp-result {
    width: 49%;
}
.bmp-calculator__inputs {
    width: 100%;
}
.bmp-bond-layout__main {
    max-width: 100%;
}
.bmp-calculator__inputs {
    gap: 9px;
}
.bmp-calculator h2.bmp-calculator__title {
    margin: 0;
}
.bmp-highlights {
    padding: 10px 20px;
}
.bmp-highlight__value {
    font-size: 0.9rem;
}
.bmp-highlight__label {
    font-size: 0.75rem;
    line-height: 1.2;
}
.bmp-bond-header__title {
    font-size: 1.2rem;
}
.bmp-bond-header {
    padding: 20px 20px 10px;
}
.elementor-kit-7 p {
    margin-block-end: 0;
}
.bmp-calculator {
    padding-left: 18px;
    padding-right: 18px;
}
.bmp-field {
    font-size: 0.75rem;
}
}
.bmp-button--secondary {
    background: var(--primary-color-1);
    color:white;
}
.bmp-button--secondary:hover {
    background: var(--primary-color-1);
    color:white;
}
/* ==========================================================================
   Bond Summary Highlight Cards Grid
   ========================================================================== */

.bmp-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.bmp-summary-card {
    padding: 20px;
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.bmp-summary-card__label {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.bmp-summary-card__value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

/* Variant Accent Colors */
.bmp-summary-card__value--interest {
    color: #16a34a;
}

.bmp-summary-card__value--total {
    color: #0f5c46;
}