.ocs-budget-percent-note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-right: 4px solid var(--ocs-primary);
    border-radius: 8px;
    background: rgba(255, 255, 255, .76);
    line-height: 1.55;
}

/* מונע מהיחידה הארוכה "שיעורים" להיצמד לחיצי שדה המספר. */
.ocs-input {
    position: relative;
}

.ocs-input b {
    position: absolute !important;
    top: 50%;
    left: 38px;
    z-index: 1;
    min-width: 72px;
    padding: 0 !important;
    text-align: right;
    pointer-events: none;
    transform: translateY(-50%);
}

.ocs-input input[type="number"] {
    padding-left: 124px !important;
}

/* תצוגה ברורה ואחידה לכל הגרפים. */
.ocs-calculator .ocs-chart-block {
    position: relative;
    width: min(100%, 820px) !important;
    min-height: 420px;
    margin-top: 28px;
    margin-bottom: 28px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ocs-calculator .ocs-chart-block[data-ocs178-align="right"] {
    margin-right: 0;
    margin-left: auto;
}

.ocs-calculator .ocs-chart-block[data-ocs178-align="center"] {
    margin-right: auto;
    margin-left: auto;
}

.ocs-calculator .ocs-chart-block[data-ocs178-align="left"] {
    margin-right: auto;
    margin-left: 0;
}

.ocs-calculator .ocs-chart-block canvas {
    width: 100% !important;
    height: 340px !important;
    max-height: 340px !important;
}

.ocs-calculator .ocs-chart-legend {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px 18px;
    width: 100%;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(24, 48, 39, .14);
    line-height: 1.55;
    text-align: right;
}

.ocs-calculator .ocs-chart-legend > * {
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .66);
    border-radius: 7px;
}

.ocs-calculator .ocs178-axis-mask {
    position: absolute;
    z-index: 2;
    height: 64px;
    background: var(--ocs-background, #fff);
    pointer-events: none;
}

@media (max-width: 640px) {
    .ocs-calculator .ocs-chart-block {
        min-height: 350px;
        padding: 14px;
    }
    .ocs-calculator .ocs-chart-block canvas {
        height: 260px !important;
        max-height: 260px !important;
    }
    .ocs-calculator .ocs-chart-legend {
        grid-template-columns: 1fr;
    }
}
