/* ==========================================================================
   Tax Calculator Widget — tax-calculator-widget.css
   ========================================================================== */


/* ── Radio option styling ─────────────────────────────────────────────────── */

#tax-calculator-form .select-field {
    height: 50px;
    color: #202020;
    border: 1px solid #e5e5e5;
    background-color: rgba(241, 247, 248, .5);
    padding: 0px !important;
    width: 100%;
    transition: .5s;
    border-radius: 5px;
}

#tax-calculator-form .form-control {
    border: 1px solid #e5e5e5 !important;
    height: 50px;
    color: #202020;
    background-color: rgba(241, 247, 248, .5);
    padding: 10px 20px;
    width: 100%;
    line-height: 2.8rem;
    font-size: 16px;
}

#tax-calculator-form .form-control:focus {
    border-color: #5c3e98 !important;
    background-color: rgba(241, 247, 248, 1);
    outline: none;
    box-shadow: 0px 0px 8px rgba(74, 144, 226, 0.3);
}

#tax-calculator-form .form-group {
    margin-bottom: 20px !important;
}

#tax-calculator-form .radio label {
    color: #202020 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

#tax-calculator-form .form-group label {
    display: inline-block;
    margin-right: 15px;
    padding: 10px 15px;
    color: #6e6e6e;
    font-size: 16px;
    font-weight: 400;
    border-radius: 5px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

#tax-calculator-form .form-group input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #9469F5;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    line-height: 0 !important;
    padding: 0 !important;
    position: relative;
    margin-right: 10px;
    vertical-align: middle;
}

#tax-calculator-form .form-group input[type="radio"]:checked::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #9469F5;
    position: absolute;
    top: 3px;
    left: 3px;
}

#tax-calculator-form .radio label:hover {
    background: #e0e0e0;
}


/* ── Actual / Average sub-tabs — pill toggle ──────────────────────────────── */

.actual-sub-tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px 0;
}

.actual-sub-tabs-label {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.actual-sub-tabs {
    display: inline-flex;
    background: #f0eaff;
    border-radius: 50px;
    padding: 4px;
    gap: 0;
    border: 1px solid #ddd0ff;
    box-shadow: inset 0 1px 3px rgba(92, 62, 152, 0.08);
}

.actual-tab-btn {
    padding: 9px 28px;
    border: none;
    background: transparent;
    color: #9469F5;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.actual-tab-btn:hover:not(.active) {
    color: #5c3e98;
    background: rgba(92, 62, 152, 0.1);
}

.actual-tab-btn.active {
    background: #5c3e98;
    color: #fff;
    box-shadow: 0 3px 10px rgba(92, 62, 152, 0.40);
    font-weight: 700;
}

.actual-tab-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(148, 105, 245, 0.25);
}

/* Active tab green dot indicator */
.actual-tab-btn.active::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #9ff5a2;
    border-radius: 50%;
    margin-right: 7px;
    vertical-align: middle;
    box-shadow: 0 0 6px rgba(159, 245, 162, 0.8);
}

#simple-calculation-fields .salary-label {
  font-size: 16px;
  font-weight: 600;
  color : #202020;
}
/* ── Mode badge ───────────────────────────────────────────────────────────── */

.calc-mode-banner {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.calc-mode-badge {
    display: inline-block;
    padding: 5px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.calc-mode-badge.mode-simple {
    background-color: #e8f4fd;
    color: #1a6ea8;
    border: 1.5px solid #1a6ea8;
}

.calc-mode-badge.mode-actual {
    background-color: #eef9f0;
    color: #1e7e34;
    border: 1.5px solid #1e7e34;
}

.calc-mode-badge.mode-avg {
    background-color: #f3eeff;
    color: #5c3e98;
    border: 1.5px solid #5c3e98;
}


/* ── Avg rate verification row ────────────────────────────────────────────── */

.avg-rate-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 16px;
    background-color: #f3eeff;
    border: 1px dashed #9469F5;
    border-radius: 6px;
}

.avg-rate-label {
    font-weight: 700;
    font-size: 13px;
    color: #5c3e98;
}

.avg-rate-value {
    font-size: 18px;
    font-weight: 700;
    color: #5c3e98;
}

.avg-rate-hint {
    font-size: 11px;
    color: #9469F5;
    font-style: italic;
}


/* ── History table hint ───────────────────────────────────────────────────── */

.history-hint {
    font-size: 13px;
    color: #6e6e6e;
    background-color: #f8f5ff;
    border-left: 3px solid #9469F5;
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.history-hint strong {
    color: #5c3e98;
}


/* ── Actual calculation table ─────────────────────────────────────────────── */

#actual-calculation-fields table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 18px;
    text-align: left;
}

#actual-calculation-fields table thead tr {
    background-color: #5c3e98;
    color: #ffffff;
    font-size: 14px !important;
    text-align: left;
    font-weight: bold;
}

#actual-calculation-fields table th,
#actual-calculation-fields table td {
    border: 1px solid #dddddd;
    padding: 10px !important;
}

#actual-calculation-fields table tbody tr:hover {
    background-color: #f1f1f1;
}

.btn-table button {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 10px;
    font-size: 16px;
    cursor: pointer;
    color: #fff;
    background-color: #009879;
    border: none;
    border-radius: 5px;
}

/* #actual-calculation-fields button:hover {
    background-color: #007f6800;
} */

.form-group {
    margin-bottom: 0px !important;
}

#actual-calculation-fields label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 16px;
}

#actual-calculation-fields input[type="number"],
#actual-calculation-fields select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#calculation-table {
    display: none;
}


/* ── Add row button ───────────────────────────────────────────────────────── */

.d-flex-btn {
    display: flex;
    justify-content: end;
}
.btn-primary {
  display: inline-block;
      position: relative;
    padding-left: 30px;
  outline: none;
  cursor: pointer;
  text-align: center;
  border: 2px solid #5c3e98;
  background-color: #5c3e98;
  font-family: "BagossCondensed-TRIAL-Medium";
  border-radius:50px !important;
  font-size: 16px;
  padding: .6em 2.5em .5em 2.5em;
  color: #fff;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-primary:hover {
  background-color: #fff;
  border: 2px solid #5c3e98;
  color: #5c3e98;
}


.btn-primary:hover::after {
    color: #5c3e98;
}


/* ── Results card ─────────────────────────────────────────────────────────── */

#tax-calculator-pakistan .sub-heading {
    font-size: 22px !important;
    font-weight: 500;
    text-align: center;
    font-weight: 500 !important;
}

.tax-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: 0 !important;
}

.tax-card .table {
    margin: 10px 0 10px !important;
    border-width: 1px;
    border-style: solid;
}

.tax-card-body {
    flex: 1 1 auto;
    padding: 1rem 1rem;
}

.ntn-status--table table {
    caption-side: bottom;
    border-collapse: collapse;
}

.ntn-status--table tbody,
.ntn-status--table td,
.ntn-status--table tfoot,
.ntn-status--table th,
.ntn-status--table thead,
.ntn-status--table tr {
    border-color: inherit;
    border-style: solid;
    border-width: 0;
}

.tax-card-body .ntn-status--table table {
    width: 100%;
    border-collapse: collapse;
}

.tax-card-body .ntn-status--table table td,
.tax-card-body .ntn-status--table table th {
    border: 1px solid #ddd;
    padding: 10px;
}

.tax-card-body .ntn-status--table table td span {
    display: block;
    text-align: center;
}

.tax-card-body .ntn-status--table table tr:first-child td,
.tax-card-body .ntn-status--table table tr:nth-of-type(3) {
    background-color: #f5f5f5;
    font-weight: 400;
}

.tax-card-body .ntn-status--table table td:hover {
    background-color: #f0f8ff;
}


/* ── Dropdown select arrow ────────────────────────────────────────────────── */

#tax-calculator-pakistan #tax-calculator-form .sel-style:after,
#mainArea .sel-style:after {
    background: #000;
    border-radius: 0 5px 5px 0;
    bottom: 0;
    color: #fff;
    font-size: .9em;
    padding: .8em 1em;
    pointer-events: none;
    position: absolute;
    right: -1px;
    top: 0;
    z-index: 1;
    font-family: "ato-font-family-v2-update", "ato-font-family-v2";
}

#tax-calculator-pakistan #tax-calculator-form .sel-style:after,
#actual-calculation-fields .sel-style:after {
    background-color: #5c3e98 !important;
    display: flex;
    align-items: center;
    content: '⌵' !important;
    width: 50px;
    justify-content: center;
}

#tax-calculator-pakistan #tax-calculator-form .sel-style:hover:after {
    background-color: #3e2b70 !important;
    color: #fff;
}

#tax-calculator-pakistan .tax-calculator-form .sel-style .form-control:focus {
    border: solid 1px #5c3e98 !important;
}

#tax-calculator-pakistan #tax-calculator-form .sel-btn,
#mainArea .sel-btn {
    background: #fff;
    border-radius: 2px 0 0 2px;
}

#tax-calculator-pakistan #tax-calculator-form .sel-style,
#mainArea .sel-style {
    cursor: pointer;
    display: block;
    overflow: hidden;
    position: relative;
}

#tax-calculator-pakistan .form-control::placeholder {
    color: #cdcdce;
    opacity: 1;
}


/* ── Tax slab icons ───────────────────────────────────────────────────────── */

#tax-slab-block .fa-plus:before {
    content: "\f067" !important;
    background-color: #DCD9D2 !important;
    padding: 10px !important;
    border-radius: 5px !important;
}

#tax-slab-block .fa-plus:active:before,
#tax-slab-block .fa-plus:hover:before {
    background-color: #9469F5 !important;
    color: #fff !important;
}

#tax-slab-block .fa-minus:before {
    content: "\f067" !important;
    background-color: #DCD9D2 !important;
    padding: 10px !important;
    border-radius: 5px;
}

#tax-calculator-pakistan .m-5-5 {
    margin-top: 5px;
    margin-bottom: 5px;
}

#tax-calculator-pakistan .mt-50 {
    margin-top: 50px;
}


/* ── Checkbox ─────────────────────────────────────────────────────────────── */

input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #5c3e98;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    background-color: white;
}

input[type="checkbox"]::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    top: 2px;
    left: 6px;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s;
}

input[type="checkbox"]:checked {
    background-color: #5c3e98;
    border-color: #5c3e98;
}

input[type="checkbox"]:checked::after {
    opacity: 1;
}

.checkbox-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}


/* ── Delete row button ────────────────────────────────────────────────────── */

.del-btn.delete-row {
    background-color: #ff4c4c;
    position: relative;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    padding: 0;
}

.tax-row td.del-icon-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center !important;
    vertical-align: middle !important;
}
.del-btn.delete-row::before {
    content: "×";
    font-size: 18px;
    color: white;
}
.del-btn.delete-row:hover {
    background-color: #ff5252 !important;
    transform: scale(1.05);
}

.del-btn.delete-row:active {
    background-color: #ff3d3d !important;
    transform: scale(0.95);
}

.del-btn.delete-row:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.4);
}

 tr td span.sub-heading{
        font-weight: 600 !important;
        }

.del-icon-flex {
    display: flex;
    justify-content: center;
    border: none !important;
}


/* ── Current month block ──────────────────────────────────────────────────── */

.current-month-block .col-md-6 {
    padding: 15px 0px;
    flex: 0 0 auto;
    width: 49%;
}

.current-month-block .col-md-12 {
    padding: 15px 0px !important;
    flex: 0 0 auto;
    width: 100%;
}

.current-month-block select.form-control,
.current-month-block input.form-control {
    background-color: #ffffff;
}

.current-month-block label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500 !important;
    color: #8f8f8f;
}

.flex-block {
    display: flex;
    justify-content: center;
    column-gap: 15px;
}


/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (min-width: 768px) {
    .p-md-5 { padding: 2rem !important; }
    .col-md-8 { flex: 0 0 auto; width: 66.6666666667%; }
    .col-md-6 { flex: 0 0 auto; width: 50%; }

    #tax-calculator-pakistan #tax-calculator-form .sel-style,
    #tax-calculator-form .sel-style .form-control {
        height: 50px !important;
        background-color: #F8F2FF !important;
    }
}

@media (max-width: 768px) {
    #tax-calculator-form .form-control {
        padding: 10px 0px !important;
    }

    .current-month-block .col-md-6 {
        width: 48% !important;
    }

    .actual-sub-tabs-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .actual-sub-tabs {
        width: 100%;
        justify-content: center;
    }

    .actual-tab-btn {
        flex: 1;
        text-align: center;
        padding: 9px 16px;
    }

    .avg-rate-row {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
}

.margin-top-50 { margin-top: 50px; }
/* ── Mobile typography improvements for results table ───────────────────── */

@media (max-width: 768px) {

    /* Table span text */
    #tax-calculator-pakistan table span {
        font-size: 14px !important;
        line-height: 1.5 !important;
        display: block;
    }

    /* Form input font size */
    #tax-calculator-form .form-control {
        font-size: 12px !important;
    }

    /* Monthly & Yearly values (h2) */
    #tax-calculator-pakistan .sub-heading {
        font-size: 18px !important;
        line-height: 1.4 !important;
    }




    .ntn-status--table .sub-heading{
        font-size: 16px !important;
        line-height: 1.3 !important;
        text-align: center;
        margin-bottom: 10px !important;
        margin-top: 10px !important;
        color: #202020 !important;
    }

    /* Extra tightening for very small screens */
    @media (max-width: 480px) {
        #tax-calculator-pakistan .sub-heading {
            font-size: 16px !important;
            font-weight: 500 !important;
        }
    }
}

@keyframes ri-calc-flash {
    0% { background-color: rgba(148, 105, 245, 0.28); }
    100% { background-color: transparent; }
}

#tax-calculator-pakistan .ri-calc-flash,
.ntn-status--table .ri-calc-flash {
    animation: ri-calc-flash 0.7s ease-out;
}