
/*
 * SRIKAMI Utilities — Shared Stylesheet
 * Version: 2.2.0
 * Shared styles for calculators, utilities and the Home Loan Calculator.
 */

/* =========================================================
   1. SHARED CALCULATOR CARD
   ========================================================= */

.srikami-tool {
    --sr-primary: #2563eb;
    --sr-primary-dark: #1d4ed8;
    --sr-text: #172b3a;
    --sr-muted: #64748b;
    --sr-border: #dbe3ea;
    --sr-surface: #ffffff;

    display: block;
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 680px;
    margin: 32px auto;
    padding: 28px;
    color: var(--sr-text);
    background: var(--sr-surface);
    border: 1px solid var(--sr-border);
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.07);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
}

.srikami-tool *,
.srikami-tool *::before,
.srikami-tool *::after,
.srikami-tool-directory *,
.srikami-tool-directory *::before,
.srikami-tool-directory *::after {
    box-sizing: border-box;
}

/* =========================================================
   2. SHARED HEADINGS AND TEXT
   ========================================================= */

.srikami-tool h1,
.srikami-tool h2,
.srikami-tool h3 {
    color: #14213d;
    line-height: 1.3;
}

.srikami-tool h2 {
    margin: 0 0 12px;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
}

.srikami-tool p {
    margin: 0 0 18px;
}

.srikami-tool label {
    display: block;
    margin: 18px 0 7px;
    color: #243449;
    font-size: 15px;
    font-weight: 600;
}

/* =========================================================
   3. SHARED INPUTS
   ========================================================= */

.srikami-tool input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]),
.srikami-tool select,
.srikami-tool textarea {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    min-height: 52px;
    margin: 0;
    padding: 11px 14px;
    color: #172b3a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.srikami-tool textarea {
    min-height: 130px;
    resize: vertical;
}

.srikami-tool input:focus,
.srikami-tool select:focus,
.srikami-tool textarea:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, 0.15);
    outline-offset: 1px;
}

/* =========================================================
   4. EXISTING INDIAN HOME LOAN CALCULATOR
   ========================================================= */

.srikami-home-loan {
    width: calc(100% - 32px);
    max-width: 1050px;
    margin: 24px auto;
    padding: 24px;
    color: #172b3a;
    background: #ffffff;
    border: 1px solid #dbe3ea;
    border-radius: 16px;
    box-sizing: border-box;
}

.srikami-home-loan *,
.srikami-home-loan *::before,
.srikami-home-loan *::after {
    box-sizing: border-box;
}

.srikami-home-loan-header {
    margin-bottom: 24px;
}

.srikami-home-loan-header h2 {
    margin: 0 0 8px;
    font-size: 26px;
    line-height: 1.3;
}

.srikami-home-loan-header p,
.srikami-home-loan-schedule > p {
    margin: 0;
    color: #5b6b78;
    line-height: 1.6;
}

.srikami-home-loan-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 24px;
    align-items: start;
}

.srikami-home-loan-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
}

.srikami-home-loan-field {
    min-width: 0;
}

.srikami-home-loan-field label {
    display: block;
    margin: 0 0 7px;
    font-size: 14px;
    font-weight: 600;
}

.srikami-home-loan-field input,
.srikami-home-loan-field select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #cbd5df;
    border-radius: 8px;
    background: #fff;
    color: #172b3a;
    font: inherit;
    font-size: 15px;
}

.srikami-home-loan-field small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
}

.srikami-home-loan-results {
    padding: 22px;
    border: 1px solid #dbe3ea;
    border-radius: 12px;
    background: #f7fafc;
}

.srikami-home-loan-eyebrow {
    display: block;
    color: #536779;
    font-size: 14px;
    font-weight: 600;
}

.srikami-home-loan .srikami-home-loan-emi {
    margin: 8px 0 22px;
    color: #087e8b;
    font-size: clamp(27px, 4vw, 36px);
    font-weight: 750;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.srikami-home-loan-result-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e1e8ef;
    font-size: 14px;
}

.srikami-home-loan-result-row span {
    color: #536779;
}

.srikami-home-loan-result-row strong {
    text-align: right;
    overflow-wrap: anywhere;
}

.srikami-home-loan-breakdown {
    margin-top: 20px;
}

.srikami-home-loan-breakdown-bar {
    display: flex;
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 10px;
    background: #e2e8f0;
}

.srikami-home-loan-breakdown-bar span {
    display: block;
    height: 100%;
    transition: width 0.2s ease;
}

.srikami-home-loan-breakdown-bar [data-principal-bar] {
    background: #087e8b;
}

.srikami-home-loan-breakdown-bar [data-interest-bar] {
    background: #f0a33a;
}

.srikami-home-loan-legend {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    font-size: 12px;
}

.srikami-home-loan-legend span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.srikami-home-loan-legend span:last-child {
    text-align: right;
}

.srikami-home-loan .srikami-home-loan-button,
.srikami-home-loan .srikami-home-loan-secondary {
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 16px 0 0;
    padding: 11px 16px;
    border: 1px solid #087e8b;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
    cursor: pointer;
}

.srikami-home-loan .srikami-home-loan-button {
    color: #fff;
    background: #087e8b;
}

.srikami-home-loan .srikami-home-loan-secondary {
    margin-top: 10px;
    color: #087e8b;
    background: #fff;
}

.srikami-home-loan button:hover {
    filter: brightness(0.96);
}

.srikami-home-loan button:focus-visible,
.srikami-home-loan input:focus-visible,
.srikami-home-loan select:focus-visible {
    outline: 3px solid #6bbbc2;
    outline-offset: 2px;
}

.srikami-home-loan-error {
    margin: 12px 0 0;
    color: #b42318;
    font-size: 13px;
}

.srikami-home-loan-schedule {
    margin-top: 32px;
}

.srikami-home-loan-schedule h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

.srikami-home-loan-table-wrap {
    width: 100%;
    margin-top: 18px;
    overflow-x: auto;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
}

.srikami-home-loan-table-wrap table {
    width: 100%;
    min-width: 650px;
    margin: 0;
    border-collapse: collapse;
    font-size: 13px;
}

.srikami-home-loan-table-wrap th,
.srikami-home-loan-table-wrap td {
    padding: 12px;
    border-bottom: 1px solid #e5ebf0;
    text-align: right;
    white-space: nowrap;
}

.srikami-home-loan-table-wrap th {
    background: #f1f5f9;
    font-weight: 700;
}

.srikami-home-loan-table-wrap th:first-child,
.srikami-home-loan-table-wrap td:first-child {
    text-align: left;
}

.srikami-home-loan-table-wrap tbody tr:last-child td {
    border-bottom: 0;
}

.srikami-home-loan-disclaimer {
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid #e1e8ef;
    color: #64748b;
    font-size: 12px;
    line-height: 1.7;
}

/* =========================================================
   5. CALCULATOR DIRECTORY
   ========================================================= */

.srikami-tool-directory {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0 40px;
    box-sizing: border-box;
}

.srikami-tool-directory .srikami-tool-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    align-items: stretch;
}

.srikami-tool-directory .srikami-tool-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 26px;
    margin: 0 !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease,
        border-color 0.2s ease;
    box-sizing: border-box;
}

.srikami-tool-directory .srikami-tool-card:hover {
    transform: translateY(-4px);
    border-color: #087e8b;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}

.srikami-tool-directory .srikami-tool-card-title {
    display: block;
    margin: 0 0 12px;
    padding: 0;
    color: #17324d;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

.srikami-tool-directory .srikami-tool-card-title a {
    color: inherit;
    text-decoration: none;
}

.srikami-tool-directory .srikami-tool-card-title a:hover {
    color: #087e8b;
}

.srikami-tool-directory .srikami-tool-card-description {
    margin: 0 0 22px;
    padding: 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
}

.srikami-tool-directory .srikami-tool-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding: 10px 0 0;
    color: #087e8b;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.srikami-tool-directory .srikami-tool-card-link:hover {
    gap: 11px;
    color: #065f66;
    text-decoration: underline;
}

/* =========================================================
   6. HOME LOAN CALCULATOR — CURRENT PHP MARKUP
   Matches .sr-homeloan and .sr-homeloan__... classes.
   ========================================================= */

.sr-homeloan {
    display: block;
    width: calc(100% - 32px);
    max-width: 1050px;
    margin: 32px auto !important;
    padding: clamp(20px, 3vw, 30px);
    box-sizing: border-box;
    color: #172b3a;
    background: #ffffff;
    border: 1px solid #dbe3ea;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.07);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.55;
}

.sr-homeloan *,
.sr-homeloan *::before,
.sr-homeloan *::after {
    box-sizing: border-box;
}

.sr-homeloan__header {
    margin: 0 0 24px;
}

.sr-homeloan__header h2 {
    margin: 0 0 8px;
    color: #14213d;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.3;
}

.sr-homeloan__header p,
.sr-homeloan__schedule-head p {
    margin: 0;
    color: #5b6b78;
    line-height: 1.6;
}

.sr-homeloan__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
}

.sr-homeloan__field {
    min-width: 0;
}

.sr-homeloan__field label {
    display: block;
    margin: 0 0 7px;
    color: #243449;
    font-size: 15px;
    font-weight: 600;
}

.sr-homeloan__field input,
.sr-homeloan__field select {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    padding: 10px 12px;
    color: #172b3a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    box-shadow: none;
}

.sr-homeloan__field input:focus,
.sr-homeloan__field select:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, 0.15);
    outline-offset: 1px;
}

.sr-homeloan__field small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
}

.sr-homeloan__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.sr-homeloan__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 11px 18px;
    border: 1px solid #087e8b;
    border-radius: 8px;
    background: #087e8b;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
}

.sr-homeloan__button:hover {
    background: #066b75;
    border-color: #066b75;
}

.sr-homeloan__button--secondary {
    background: #ffffff;
    color: #087e8b;
    border-color: #cbd5e1;
}

.sr-homeloan__button--secondary:hover {
    background: #f0fdfa;
    color: #066b75;
    border-color: #99d5d8;
}

.sr-homeloan__button:focus-visible,
.sr-homeloan input:focus-visible,
.sr-homeloan select:focus-visible {
    outline: 3px solid #6bbbc2;
    outline-offset: 2px;
}

.sr-homeloan__error {
    margin: 14px 0 0;
    padding: 11px 13px;
    color: #b42318;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 14px;
}

.sr-homeloan__results {
    margin-top: 28px;
    padding: 22px;
    background: #f7fafc;
    border: 1px solid #dbe3ea;
    border-radius: 12px;
}

.sr-homeloan__results h3 {
    margin: 0 0 16px;
    color: #14213d;
    font-size: 22px;
    line-height: 1.35;
}

.sr-homeloan__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.sr-homeloan__metric {
    min-width: 0;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #dbe3ea;
    border-radius: 10px;
}

.sr-homeloan__metric span {
    display: block;
    margin-bottom: 7px;
    color: #536779;
    font-size: 13px;
    line-height: 1.45;
}

.sr-homeloan__metric strong {
    display: block;
    color: #172b3a;
    font-size: clamp(15px, 1.7vw, 20px);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.sr-homeloan__metric--primary {
    background: #ecfeff;
    border-color: #a5e3e7;
}

.sr-homeloan__metric--primary strong {
    color: #087e8b;
    font-size: clamp(19px, 2vw, 26px);
}

.sr-homeloan__ratio {
    margin: 16px 0 26px;
    color: #536779;
    font-size: 13px;
}

.sr-homeloan__schedule-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 28px 0 14px;
}

.sr-homeloan__schedule-head h3 {
    margin: 0 0 6px;
    color: #14213d;
    font-size: 22px;
}

.sr-homeloan__schedule-head p {
    margin: 0;
    color: #5b6b78;
}

.sr-homeloan__schedule-head .sr-homeloan__button {
    width: auto;
    flex-shrink: 0;
}

.sr-homeloan__table-wrap {
    width: 100%;
    margin-top: 14px;
    overflow-x: auto;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
}

.sr-homeloan__table {
    width: 100%;
    min-width: 620px;
    margin: 0;
    border-collapse: collapse;
    font-size: 13px;
}

.sr-homeloan__table th,
.sr-homeloan__table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e5ebf0;
    text-align: right;
    white-space: nowrap;
}

.sr-homeloan__table th {
    background: #f1f5f9;
    color: #243449;
    font-weight: 700;
}

.sr-homeloan__table th:first-child,
.sr-homeloan__table td:first-child {
    text-align: left;
}

.sr-homeloan__table tbody tr:last-child td {
    border-bottom: 0;
}

.sr-homeloan__disclaimer {
    margin: 22px 0 0;
    padding-top: 16px;
    border-top: 1px solid #e1e8ef;
    color: #64748b;
    font-size: 12px;
    line-height: 1.7;
}

.sr-homeloan [hidden] {
    display: none !important;
}

/* =========================================================
   7. RESPONSIVE LAYOUT
   ========================================================= */

@media (max-width: 950px) {
    .srikami-tool-directory .srikami-tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .srikami-tool-directory .srikami-tool-card {
        padding: 22px;
    }
}

@media (max-width: 760px) {
    .srikami-home-loan {
        padding: 18px;
    }

    .srikami-home-loan-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .srikami-home-loan-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .srikami-home-loan-header h2 {
        font-size: 23px;
    }

    .srikami-home-loan-results {
        padding: 18px;
    }

    .sr-homeloan {
        width: calc(100% - 24px);
        margin: 20px auto !important;
        padding: 18px;
    }

    .sr-homeloan__fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .sr-homeloan__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sr-homeloan__results {
        padding: 16px;
    }

    .sr-homeloan__schedule-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .sr-homeloan__schedule-head .sr-homeloan__button {
        width: 100%;
    }

    .sr-homeloan__actions {
        flex-direction: column;
    }

    .sr-homeloan__actions .sr-homeloan__button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .srikami-tool-directory {
        padding: 0 0 28px;
    }

    .srikami-tool-directory .srikami-tool-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .srikami-tool-directory .srikami-tool-card {
        padding: 21px;
        border-radius: 12px;
    }

    .srikami-tool-directory .srikami-tool-card-title {
        font-size: 19px;
    }

    .srikami-tool-directory .srikami-tool-card-description {
        font-size: 14px;
    }
}

@media (max-width: 420px) {
    .sr-homeloan__summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .sr-homeloan__header h2 {
        font-size: 24px;
    }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
    .srikami-tool *,
    .srikami-tool-directory *,
    .sr-homeloan * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* =========================================
   SRIKAMI HOME LOAN CALCULATOR
   Match button colours with other calculators
   ========================================= */

.sr-homeloan .sr-homeloan__button {
    background-color: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
    border-radius: 12px;
    font-weight: 600;
    transition: background-color 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease,
                transform 0.2s ease;
}

/* Calculate button */
.sr-homeloan .sr-homeloan__button--primary {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Reset button */
.sr-homeloan .sr-homeloan__button--secondary {
    background-color: #ffffff;
    color: #2563eb;
    border-color: #cbd5e1;
}

/* Hover effects */
.sr-homeloan .sr-homeloan__button--primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.20);
    transform: translateY(-1px);
}

.sr-homeloan .sr-homeloan__button--secondary:hover {
    background-color: #eff6ff;
    color: #1d4ed8;
    border-color: #2563eb;
}

/* Keyboard accessibility */
.sr-homeloan .sr-homeloan__button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}

/* Disabled state */
.sr-homeloan .sr-homeloan__button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive buttons */
@media (max-width: 600px) {
    .sr-homeloan .sr-homeloan__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .sr-homeloan .sr-homeloan__button {
        min-height: 48px;
        padding: 12px 20px;
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sr-homeloan .sr-homeloan__button {
        transition: none;
    }
}


/* =========================================================
   SRIKAMI FRACTION CALCULATOR
   Uses existing shared .srikami-tool styles
   ========================================================= */

.srikami-tool.sr-fraction {
    max-width: 900px;
    padding: 28px;
}

.sr-fraction > header {
    margin-bottom: 24px;
}

.sr-fraction > header h2 {
    margin: 0 0 10px;
}

.sr-fraction__card {
    display: block;
    width: 100%;
    max-width: 760px;
    margin: 0 auto 22px;
    padding: 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.sr-fraction__card h3 {
    margin: 0 0 8px;
    color: #14213d;
    font-size: 20px;
    line-height: 1.4;
}

.sr-fraction__card h4 {
    margin: 18px 0 10px;
    color: #14213d;
    font-size: 18px;
}

.sr-fraction__card p {
    line-height: 1.6;
}

.sr-fraction__card label,
.sr-fraction__mixed-fields legend {
    display: block;
    margin: 14px 0 7px;
    color: #243449;
    font-size: 14px;
    font-weight: 600;
}

.sr-fraction__card input,
.sr-fraction__card select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #172b3a;
    font: inherit;
}

.sr-fraction__operation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.sr-fraction__operation > label {
    display: none;
}

.sr-fraction__fraction {
    min-width: 0;
}

.sr-fraction__bar {
    display: block;
    height: 2px;
    margin: 4px 0 12px;
    background: #14213d;
}

.sr-fraction__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.sr-fraction__actions button,
.sr-fraction__card button[data-fr-copy] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 11px 18px;
    border: 1px solid #2563eb;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.sr-fraction__actions button:hover,
.sr-fraction__card button[data-fr-copy]:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.sr-fraction__actions button[data-fr-reset] {
    background: #fff;
    color: #2563eb;
    border-color: #cbd5e1;
}

.sr-fraction__actions button[data-fr-reset]:hover {
    background: #eff6ff;
    border-color: #2563eb;
}

.sr-fraction__mixed-fields {
    min-width: 0;
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #dbe3ea;
    border-radius: 10px;
}

.sr-fraction__card [data-fr-error] {
    margin-top: 12px;
    padding: 10px 12px;
    color: #b42318;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.sr-fraction__card [data-fr-result] {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    overflow-wrap: anywhere;
}

.sr-fraction__card [data-fr-answer] {
    color: #14213d;
    font-size: 20px;
    font-weight: 700;
}

.sr-fraction__card [hidden] {
    display: none !important;
}

.sr-fraction__note {
    color: #64748b;
    font-size: 13px;
}

/* Mobile layout */
@media (max-width: 600px) {
    .srikami-tool.sr-fraction {
        width: calc(100% - 24px);
        padding: 16px;
    }

    .sr-fraction__card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .sr-fraction__operation {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .sr-fraction__operation > label {
        display: block;
        margin: 4px 0;
        font-weight: 700;
    }

    .sr-fraction__actions {
        gap: 8px;
    }

    .sr-fraction__actions button,
    .sr-fraction__card button[data-fr-copy] {
        max-width: 100%;
    }
}

/* Health Calculator Cards — Volume Calculator style */
.sr-health-tools {
    width: 100%;
    max-width: 900px;
    margin: 24px auto;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(20, 40, 70, 0.06);
    box-sizing: border-box;
}

.sr-health-tools *,
.sr-health-tools *::before,
.sr-health-tools *::after {
    box-sizing: border-box;
}

.sr-health-tools__heading {
    margin: 0 0 8px;
    color: #172b4d;
    font-size: 28px;
    line-height: 1.3;
}

.sr-health-tools__intro {
    margin: 0 0 20px;
    color: #5f6b7a;
    font-size: 14px;
    line-height: 1.6;
}

.sr-health-tools__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.sr-health-tools__card {
    min-width: 0;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(20, 40, 70, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sr-health-tools__card:hover {
    box-shadow: 0 6px 18px rgba(20, 40, 70, 0.10);
    transform: translateY(-2px);
}

.sr-health-tools__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    background: #eaf2ff;
    border-radius: 10px;
    color: #2563eb;
    font-size: 26px;
}

.sr-health-tools__card h3 {
    margin: 0 0 8px;
    color: #172b4d;
    font-size: 19px;
    line-height: 1.4;
}

.sr-health-tools__card p {
    margin: 0 0 14px;
    color: #5f6b7a;
    font-size: 14px;
    line-height: 1.6;
}

.sr-health-tools__link {
    display: inline-block;
    padding: 10px 16px;
    background: #2864e8;
    border: 1px solid #2864e8;
    border-radius: 6px;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
}

.sr-health-tools__link:hover,
.sr-health-tools__link:focus {
    background: #1d4fc4;
    border-color: #1d4fc4;
    color: #ffffff !important;
}

@media (max-width: 640px) {
    .sr-health-tools {
        padding: 16px;
    }

    .sr-health-tools__heading {
        font-size: 23px;
    }

    .sr-health-tools__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .sr-health-tools__card {
        padding: 16px;
    }
}

/* Calorie Calculator — Volume Calculator style */
.sr-calorie {
    width: 100%;
    max-width: 900px;
    margin: 24px auto;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(20, 40, 70, 0.06);
    box-sizing: border-box;
}

.sr-calorie *,
.sr-calorie *::before,
.sr-calorie *::after {
    box-sizing: border-box;
}

.sr-calorie h2 {
    color: #172b4d;
    font-size: 26px;
    line-height: 1.35;
    margin: 0 0 10px;
}

.sr-calorie h3 {
    color: #172b4d;
    font-size: 19px;
    line-height: 1.4;
    margin: 20px 0 8px;
}

.sr-calorie p {
    color: #5f6b7a;
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 14px;
}

.sr-calorie label {
    display: block;
    margin: 12px 0 6px;
    color: #344054;
    font-size: 13px;
    font-weight: 600;
}

.sr-calorie input,
.sr-calorie select {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #d9e0e8;
    border-radius: 7px;
    color: #344054;
    font-size: 14px;
}

.sr-calorie input:focus,
.sr-calorie select:focus {
    border-color: #2864e8;
    outline: 2px solid rgba(40, 100, 232, 0.12);
}

.sr-calorie button {
    min-height: 40px;
    margin: 8px 6px 8px 0;
    padding: 10px 16px;
    background: #2864e8;
    border: 1px solid #2864e8;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.sr-calorie button:hover {
    background: #1d4fc4;
    border-color: #1d4fc4;
}

.sr-calorie button:focus-visible {
    outline: 2px solid #172b4d;
    outline-offset: 2px;
}

.sr-calorie fieldset {
    margin: 10px 0 14px;
    padding: 12px;
    border: 1px solid #d9e0e8;
    border-radius: 7px;
}

.sr-calorie fieldset label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.sr-calorie fieldset input[type="radio"] {
    width: auto;
    min-height: auto;
    margin: 0;
}

.sr-calorie details {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid #e5eaf0;
    border-radius: 8px;
}

.sr-calorie summary {
    color: #344054;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.sr-calorie [role="status"],
.sr-calorie [aria-live] {
    line-height: 1.6;
}

@media (max-width: 640px) {
    .sr-calorie {
        padding: 16px;
        margin: 16px auto;
    }

    .sr-calorie h2 {
        font-size: 23px;
    }

    .sr-calorie h3 {
        font-size: 18px;
    }

    .sr-calorie button {
        margin-right: 4px;
    }
}

/* Calorie Calculator: individual cards matching Volume Calculator */
.sr-calorie .sr-calorie__card {
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(20, 40, 70, 0.05);
}

.sr-calorie .sr-calorie__card h3 {
    margin-top: 0;
    color: #172b4d;
    font-size: 19px;
}

.sr-calorie .sr-calorie__education {
    margin-top: 24px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
}

.sr-calorie .sr-calorie__education h2 {
    margin-top: 0;
}

.sr-calorie .sr-calorie__education h3 {
    margin-top: 22px;
}

.sr-calorie .sr-calorie__number {
    padding: 14px;
    background: #eaf2ff;
    border-radius: 8px;
    color: #172b4d;
}

.sr-calorie .sr-calorie__number strong {
    color: #2563eb;
    font-size: 24px;
}

.sr-calorie .sr-calorie__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.sr-calorie .sr-calorie__actions button {
    margin: 0;
}

@media (max-width: 640px) {
    .sr-calorie .sr-calorie__card,
    .sr-calorie .sr-calorie__education {
        padding: 16px;
    }
}
/* =========================================================
   SRIKAMI BODY FAT CALCULATOR
   Clear US Units / Metric Units selection
   ========================================================= */

/* Unit selector container */
.srikami-tool [data-srk-body-fat-calculator] [data-srk-body-fat-unit],
[data-srk-body-fat-calculator] [data-srk-body-fat-unit] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0 8px 12px 0 !important;
    padding: 10px 20px !important;
    border: 2px solid #2563eb !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    color: #1d4ed8 !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700 !important;
    line-height: 1.4;
    cursor: pointer;
    box-shadow: none !important;
    opacity: 1 !important;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

/* Selected unit: blue background and white text */
[data-srk-body-fat-calculator]
[data-srk-body-fat-unit].is-active,
[data-srk-body-fat-calculator]
[data-srk-body-fat-unit][aria-pressed="true"] {
    background: #2563eb !important;
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.22) !important;
}

/* Unselected unit */
[data-srk-body-fat-calculator]
[data-srk-body-fat-unit][aria-pressed="false"] {
    background: #ffffff !important;
    color: #1d4ed8 !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
}

/* Hover on the unselected unit */
[data-srk-body-fat-calculator]
[data-srk-body-fat-unit][aria-pressed="false"]:hover {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #2563eb !important;
}

/* Keyboard accessibility */
[data-srk-body-fat-calculator]
[data-srk-body-fat-unit]:focus-visible {
    outline: 3px solid #f59e0b !important;
    outline-offset: 3px;
}

/* Small-screen layout */
@media (max-width: 480px) {
    [data-srk-body-fat-calculator]
    [data-srk-body-fat-unit] {
        min-height: 42px;
        padding: 9px 14px !important;
        margin-right: 5px !important;
        font-size: 14px;
    }
}

/* Respect reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
    [data-srk-body-fat-calculator]
    [data-srk-body-fat-unit] {
        transition: none !important;
    }
}