.calculator-container, .calculator-container * {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* קלאס חדש ל-tooltip שנוצר עם JS */
.tooltiptext-global {
    position: absolute; /* המיקום יחושב ע"י JS */
    z-index: 1000; /* שיהיה תמיד הכי למעלה */
    min-width: 220px;
    max-width: 300px; /* מומלץ להוסיף */
    background-color: #111827;
    color: #fff;
    text-align: start;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    line-height: 1.4;
    box-shadow: 0 8px 16px rgba(0,0,0,.15);
    font-size: .85rem;
    /* אין צורך יותר ב-visibility, opacity וכו' כי JS שולט בזה */
}

/* מסתירים את ה-tooltip המקורי מבוסס ה-CSS */
.tooltip .tooltiptext {
    display: none;
}

.tooltip {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.calculator-container {
    direction: rtl;
}

.calculator-container .calc-updated-label {
    font-size: 0.85rem;
    color: rgb(100 116 139);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.calculator-container .no-salary-prompt {
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    color: rgb(146 64 14);
    background-color: rgb(255 251 235);
    border: 1px solid rgb(253 230 138);
    border-radius: 0.5rem;
}

.calculator-container .credit-points-summary {
    display: block;
}

.calculator-container .credit-points-breakdown {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgb(199 210 254);
}

.calculator-container .credit-points-breakdown-row {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgb(55 48 163);
    padding: 0.15rem 0;
}

.calculator-container .credit-points-breakdown-label {
    flex: 0 1 auto;
    min-width: 0;
}

.calculator-container .credit-points-breakdown-dots {
    flex: 1 1 auto;
    min-width: 0.75rem;
    border-bottom: 1px dotted rgb(165 180 252);
    margin-bottom: 0.2rem;
}

.calculator-container .credit-points-breakdown-value {
    flex: 0 0 auto;
    font-weight: 500;
    white-space: nowrap;
}

.calculator-container .pension-contributions {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.calculator-container .pension-group {
    padding: 0.75rem 0 0;
    border-top: 1px solid #e2e8f0;
}

.calculator-container .pension-group:first-child {
    border-top: none;
    padding-top: 0;
}

.calculator-container .pension-group-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #4338ca;
}

.calculator-container .ltr {
    direction: ltr;
}

.calculator-container .input-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .calculator-container .input-group {
        grid-template-columns: repeat(2, 1fr);
    }
}

.calculator-container .input-group-full {
    grid-column: 1 / -1;
}

.calculator-container label {
    font-weight: 500;
}

.calculator-container input, .calculator-container select {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    width: 100%;
    transition: all 0.2s;
    background: white;
}

.calculator-container input:focus, .calculator-container select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px #c7d2fe;
}

.calculator-container .card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.calculator-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.calculator-container .result-table th, .calculator-container .result-table td {
    padding: 0.75rem 1rem;
    text-align: right;
}

/* Modal Styles */
.calculator-container .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.calculator-container .modal-content {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.calculator-container .modal-overlay:not([style*="display: none"]) .modal-content {
    transform: scale(1);
}

.calculator-container .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.calculator-container .modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.calculator-container .close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.calculator-container .benefit-category h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.calculator-container .benefit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

#benefitsList .benefit-item {
    display: flex;
    gap: 10px;
    margin-bottom: 3px;
    justify-content: flex-start;
}

.calculator-container .benefit-item:nth-child(even) {
    background-color: #f8fafc;
}

.calculator-container .benefit-item label {
    flex-grow: 1;
}

.calculator-container .benefit-item input {
    width: 70px;
    text-align: center;
}

/* Tooltip Styles */
/*.calculator-container .tooltip {*/
/*    position: relative;*/
/*    cursor: pointer;*/
/*}*/


.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background-color: #fff;
    border-radius: 1rem;
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    height: 95vh;
    overflow: scroll;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
    animation: fadeInScale 0.3s ease-out;
    direction: rtl;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.close-button {
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: #666;
    transition: color 0.2s;
}

.close-button:hover {
    color: #000;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#childrenBenefitsModalContainer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.benefit-category h4 {
    font-weight: bold;
    margin-bottom: 3px;
}

.benefit-item-number input {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    width: 100%;
    transition: all 0.2s;
}

.benefit-item-number label {
    font-size: 16px;
}

.benefit-item-number {
    display: flex;
    flex-direction: column-reverse;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
	body.trigger-position-left #enable-toolbar-trigger {
    top: -76px !important;
}
    .modal-content {
        overflow: scroll;
        height: 95vh;
        padding: 10px;
    }

    .calculator-container label {
        overflow: hidden;
    }

    .calculator-container input, .calculator-container select {
        font-size: 18px;
    }

    .sticky-mobile {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
        padding: 10px;
        z-index: 999;
    }

    .sticky-mobile.stuck {
        position: static;
    }

    .mobileRelative {
        position: relative;
    }

    .calculator-container h2 {
        font-size: 1.3rem !important;
    }
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 22px;
}

.ss-main .ss-deselect {
    display: none;
}

/* הצג את האיקס רק אם יש בחירה */
.ss-main.has-selection .ss-deselect {
    display: flex;
}
.ss-main{
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
}
.ss-content .ss-search input{
    text-align: right !important;
}
.btn-reset{
    display: flex;
    justify-content: center;
    margin-top: 10px;
}
.btn-reset button{
    background-color: gray;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* === Static CSS replacing Tailwind CDN (pure CSS, no external load) === */
.hidden { display: none; }
.block { display: block; }
.grid { display: grid; }
.flex { display: flex; }
.sticky { position: sticky; }
.w-full { width: 100%; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.whitespace-nowrap { white-space: nowrap; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-8 { gap: 2rem; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.border-none { border-style: none; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.border-l-4 { border-left-width: 4px; }
.border-indigo-400 { border-color: rgb(129 140 248); }
.border-green-500 { border-color: rgb(34 197 94); }
.bg-slate-50 { background-color: rgb(248 250 252); }
.bg-slate-100 { background-color: rgb(241 245 249); }
.bg-slate-200 { background-color: rgb(226 232 240); }
.bg-indigo-50 { background-color: rgb(238 242 255); }
.bg-indigo-600 { background-color: rgb(79 70 229); }
.bg-gray-50 { background-color: rgb(249 250 251); }
.bg-gray-200 { background-color: rgb(229 231 235); }
.bg-green-50 { background-color: rgb(240 253 244); }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.top-8 { top: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-white { color: rgb(255 255 255); }
.text-indigo-600 { color: rgb(79 70 229); }
.text-indigo-700 { color: rgb(67 56 202); }
.text-indigo-800 { color: rgb(55 48 163); }
.text-slate-700 { color: rgb(51 65 85); }
.text-slate-800 { color: rgb(30 41 59); }
.text-gray-400 { color: rgb(156 163 175); }
.text-gray-500 { color: rgb(107 114 128); }
.text-gray-800 { color: rgb(31 41 55); }
.text-green-700 { color: rgb(21 128 61); }
.text-green-800 { color: rgb(22 101 52); }
.text-red-600 { color: rgb(220 38 38); }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.hover\:bg-slate-300:hover { background-color: rgb(203 213 225); }
.hover\:bg-gray-300:hover { background-color: rgb(209 213 219); }
.hover\:bg-indigo-700:hover { background-color: rgb(67 56 202); }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgb(59 130 246 / 0.5); }
.focus\:ring-offset-2:focus { outline-offset: 2px; }
.focus\:ring-slate-500:focus { box-shadow: 0 0 0 2px rgb(100 116 139 / 0.5); }
.focus\:ring-gray-500:focus { box-shadow: 0 0 0 2px rgb(107 114 128 / 0.5); }

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
}