/* General Layout */
.blc-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    font-family: inherit;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.blc-grid * {
    box-sizing: border-box;
}

/* FORM SIDE */
.blc-form { 
    flex: 1 1 45%; 
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* RESULTS SIDE */
.blc-results {
    flex: 1 1 45%;
    min-width: 300px;
    background: #f9fafb;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 25px;
    height: fit-content;
    display: flex;        /* Added flex to stack table and instructions */
    flex-direction: column;
    justify-content: space-between;
}

/* Form Inputs Styling */
.blc-row-block { width: 100%; }

.blc-row-block label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.2;
}

.blc-row-block input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    height: auto;
}

/* Split Row (Rate & Months) */
.blc-row-split {
    display: flex;
    gap: 20px;
    width: 100%;
}
.blc-col { flex: 1; }
.blc-col label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}
.blc-col input { 
    width: 100%; 
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Checkbox & Button */
.checkbox-row {
    margin-top: 5px;
    margin-bottom: 10px;
}
.blc-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
    position: relative; 
    flex-wrap: wrap;
}
.blc-checkbox input {
    width: auto;
    margin: 0;
}

/* TOOLTIP STYLING */
.blc-tooltip {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px; 
    height: 18px;
    background-color: #999;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    font-family: sans-serif;
    line-height: 1;
    cursor: help;
    flex-shrink: 0;
}

.blc-tooltip .blc-tooltip-text {
    display: none;
    width: 240px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 12px;
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.4;
    white-space: normal;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.blc-tooltip .blc-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.blc-tooltip:hover .blc-tooltip-text {
    display: block;
}

#calc_button {
    background: #87ce4e;
    color: #fff;
    border: none;
    padding: 15px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}
#calc_button:hover {
    background: #76b643;
}

/* Results Table Styling */
.blc-results h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.blc-table { width: 100%; border-collapse: collapse; }
.blc-table th, .blc-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 15px;
}
.blc-table th { color: #555; }
.blc-table td { text-align: right; font-weight: 600; color: #222; }
.highlight td, .highlight th { 
    background: #f1f8e9;
    font-weight: 700; 
    border-bottom: none;
    color: #333;
}

/* --- INSTRUCTIONS SECTION --- */
.blc-instructions {
    margin-top: 30px; /* Pushes it to the bottom */
    padding-top: 20px;
    border-top: 2px dashed #e0e0e0; /* Visual separation */
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.blc-instructions h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blc-instructions ul {
    margin: 0;
    padding-left: 20px; /* Indent bullets */
}

.blc-instructions li {
    margin-bottom: 8px;
}

.blc-instructions strong {
    color: #333;
}

@media (max-width: 768px) {
    .blc-grid { flex-direction: column; gap: 30px; }
}