/* Container */
.bb-container {
    max-width: 750px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 0px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Header */
.bb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.bb-header__title {
    font-size: 32px;
    font-weight: 400;
    margin: 0;
    color: var(--accent);
    font-family: 'Space Grotesk', sans-serif;
}

button#bb_add_action {
    padding: 5px 25px;
    font-size: 16px;
    outline: none;
    border-radius: 0px;
    border: 1px solid;
    color: var(--accent);
    background: var(--bg-body);
    text-transform: capitalize;
    cursor: pointer;
}

.bb-balance {
    margin: 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.bb-balance__value {
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.positive {
    color: #4caf50;
}

.negative {
    color: #f44336;
}

.bb-btn--add {
    padding: 10px 25px;
    border: 0;
    font-size: 16px;
    text-transform: uppercase;
    background: #1e73be;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.bb-btn--add:hover {
    background: #135e9e;
}

/* Modal Overlay */
.bb-modal__overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.bb-modal__overlay.active {
    display: flex;
}

.bb-modal {
    background: #000;
    padding: 30px 25px;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: fadeInUp 0.3s ease-out;
    margin: auto;
    overflow: scroll;
    max-height: 570px;
    border: 1px solid var(--accent);
}

.bb-transation_modal__close,
.bb-plan_modal__close,
.bb-report_modal__close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
}

.bb-transation_modal__close:hover,
.bb-plan_modal__close:hover,
.bb-report_modal__close:hover {
    color: #000;
}

.bb-modal__heading {
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-top: 0;
}

/* Form inside modal */
.bb-form label {
    display: block;
    font-weight: 400;
    font-size:14px;
    margin: 5px 0 0;
    color: #fff;
}

.bb-form__input {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    background: #121212;
    color: #fff;
}

.bb-form__input::placeholder {
    color: #fff !important;
    opacity: 1; /* for Safari */
}

/* Vendor-specific fallbacks */
.bb-form__input::-webkit-input-placeholder {
    color: #fff !important;
}

.bb-form__input::-moz-placeholder {
    color: #fff !important;
}

.bb-form__input:-ms-input-placeholder {
    color: #fff !important;
}

.bb-form__input:-moz-placeholder {
    color: #fff !important;
}

.bb-form__submit {
    margin-top: 15px;
    width: 100%;
}

.bb-form__checkbox-group {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bb-form__checkbox {
    width: auto;
    margin: 0;
}

.bb-form__submit:hover {
    background: #135e9e;
}

/* Transaction History */
.bb-history__heading {
    font-size: 22px;
    margin-bottom: 0;
    font-weight: 600;
}

.bb-history__table-head {
    display: flex;
    font-weight: bold;
    background: transparent;
    padding: 10px 0px;
    border-bottom: 1px solid var(--accent);
    margin-bottom: 15px;
}

.bb-history__column {
    flex: 1;
    padding: 5px;
}

.bb-month {
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.bb-month__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bb-month__title {
    font-weight: bold;
    font-size: 18px;
}

.bb-alert {
    margin-top: 20px;
    padding: 15px;
    border-left: 5px solid #46b450;
    background: #ecf9ec;
    color: #2e7d32;
    border-radius: 4px;
    transition: opacity 0.5s ease-out;
}


.bb-month__plan-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}

.bb-month__plan-label {
    font-style: italic;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.bb-container button,
.bb-container button:focus,
.bb-container button:active {
    outline: none;
    box-shadow: none;
    border: none;
    padding: 4px 5px;
    background-image: none;
    border-radius: 10px;
    cursor:pointer;
}


button.bb-month__plan-btn, button.bb-month__report-btn, .bb-form__submit,  button.bb-toggle-plan {
    padding: 5px 10px;
    border: 0;
    font-size: 16px;
    text-transform: uppercase;
    background: #1e73be;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    line-height: normal;
    transition: background 0.3s;
}

/* Transactions */
.bb-transaction {
    padding: 5px 10px;
}

.bb-transaction__main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.bb-transaction__date {
    font-weight: 400;
    font-size: 18px;
    background: #000000;
    border-radius: 10px;
    padding: 5px 10px;
    color: #ffffff;
    border: 1px solid var(--accent);
}

.bb-transaction__amount-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    flex: 1;
}

.bb-transaction__amount {
    font-weight: 500;
    margin: 0;
}


.bb-expand-btn {
    background-color: transparent;
    border: none !important;
    cursor: pointer;
    background-image: none;
}

button.bb-expand-btn.Collapse {
    transform: rotate(180deg);
}

.bb-expand-btn:hover {
    background-color: transparent;
}


/* Transaction Details */
.bb-transaction__details {
    margin-top: 10px;
    padding: 15px;
    background: #000;
    border-radius: 10px;
}

/* Delete Button */
.bb-delete-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.bb-delete-btn:hover {
    background-color: #d32f2f;
}

/* No Data Message */
.bb-no-data {
    padding: 30px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Notification Message */
.updated {
    background-color: #d4edda;
    color: #155724;
    padding: 15px 13px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 4px solid #28a745;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bb-plan-list {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.bb-plan-item {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #000;
    border-left: 4px solid #1e73be;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bb-plan-content {
    display: flex;
    align-items: center;
}

.bb-add-plan-form {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.bb-add-plan-form input[type="text"] {
    flex: 1;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.bb-btn.small {
    padding: 6px 12px;
    font-size: 14px;
}


.bb-month__plan-summary {
    margin: 10px 0;
    font-weight: 600;
    background: #f1f1f1;
    padding: 10px;
    border-radius: 4px;
    color: #333;
}


/* Report Modal Styles */
.bb-report-content {
    margin-bottom: 20px;
}

.bb-report-loading {
    text-align: center;
    padding: 20px 0;
    font-style: italic;
    color: #666;
}

.bb-report-header {
    text-align: center;
    margin-bottom: 20px;
}

.bb-report-title {
    font-size: 24px;
    font-weight: bold;
    color: #1e73be;
    margin-bottom: 5px;
}

.bb-report-subtitle {
    font-size: 16px;
    color: #666;
}

.bb-report-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.bb-report-card {
    flex: 1;
    min-width: 120px;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bb-report-card.income {
    background-color: green;
}

.bb-report-card.expense {
    background-color: red;
}

.bb-report-card.loan {
    background-color: yellow;
}

.bb-report-card.net {
    background-color: rgb(30 115 190 / 95%);
}

.bb-report-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.bb-report-value {
    font-size: 22px;
    font-weight: bold;
}

.positive {
    color: #fff;
}

.negative {
    color: #fff;
}

.bb-report-actions {
    text-align: right;
    margin-top: 20px;
}

@media print {
    .bb-modal {
        box-shadow: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
    }
    
    .bb-report_modal__close,
    .bb-report-actions {
        display: none;
    }
    
    body * {
        visibility: hidden;
    }
    
    .bb-modal, .bb-modal * {
        visibility: visible;
    }
}

.bb-transaction {
    transition: opacity 0.3s ease;
}

.bb-alert {
    transition: opacity 0.5s ease;
}

.bb-transaction.bb-transaction--expense {
    border-left: 5px solid red;
}

.bb-transaction.bb-transaction--expense p.bb-transaction__amount {
    color:red;
}

.bb-transaction.bb-transaction--income {
    border-left: 5px solid green;
}

.bb-transaction.bb-transaction--income p.bb-transaction__amount {
    color:green;
}

.bb-transaction.bb-transaction--loan {
    border-left: 5px solid yellow;
}

.bb-transaction.bb-transaction--loan p.bb-transaction__amount {
    color:yellow;
}


.bb-report-card.loan * {
    color: #000;
}

.bb-report-details * {
    color: #000;
}

button#bb-print-report {
        padding: 10px 25px;
        font-size: 16px;
        outline: none;
        border-radius: 0px;
        border: 1px solid;
        color: var(--accent);
        background: var(--bg-body);
        text-transform: capitalize;
        cursor: pointer;
}


button.bb-percent-button {
    padding: 5px 25px;
    font-size: 16px;
    outline: none;
    border-radius: 0px;
    border: 1px solid;
    background: transparent;
    text-transform: capitalize;
    color: #000;
    cursor: pointer;
}


button.bb-percent-button.active,
button.bb-percent-button:hover{
    background: var(--bg-body);
    color: var(--accent);
}

.bb-percentage-buttons {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

fieldset.budget-class > legend {
    color: #000;
}

.budget-class-type {
    display: flex;
    gap: 10px;
    align-items: center;
    border: 2px solid var(--accent);
    padding: 5px 17px;
}

.budget-class-type > label {
    margin: 0;
}

fieldset.budget-class {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 5px 10px 5px;
}

fieldset.budget-class > legend {
    color: #fff;
    font-size: 14px;
}

.budget-class-type > input {
    display: none;
}

.budget-class-type {
    margin-bottom: 10px;
}


.budget-class-type.active {
    background: var(--accent);
}

.budget-class-type.active > label {
    color: #000;
}

.budget-class-type label {
    cursor: pointer;
    margin-left: 5px;
}

button.status-pending {
    border: none;
    border-color: transparent;
    border-radius: 0;
    text-decoration-color: transparent;
    background: transparent;
}

form.bb-plan-status-form {
    background: transparent;
}

li.bb-plan-item hr {
    height: 30px;
    width: 1px;
    margin: 0 10px;
}
.bb-plan-item span.status-text {
    width: 100px;
    text-align: center;
}

.bb-plan-item span.text-red * {
    color: red !important;
}

.bb-plan-item span.text-green {color: green;}

.bb-plan-item .bb-plan-action {
    display: flex;
    gap: 10px;
}

@media(max-width:768px) {

    li.bb-plan-item hr{
        display:none;
    }
    
    .bb-plan-item{
        flex-direction:column;
        align-items:start;
        border-bottom: 1px solid #1e73be;
        position:relative;
    }
    
    .bb-plan-action{
        margin-top:25px;
        width: 100%;
        justify-content: space-around;
    }

    .bb-plan-item span.status-text{
        position:absolute;
        right:0;
        z-index:1;
    }
}