/* ================================================================
   SB Bathroom Remodel Calculator — Frontend Styles v1.1.0
   All rules scoped to .sb-calc-widget to prevent theme conflicts.
================================================================ */

/* ── Box-sizing reset (scoped) ── */
.sb-calc-widget,
.sb-calc-widget *,
.sb-calc-widget *::before,
.sb-calc-widget *::after {
    box-sizing: border-box;
}

/* ── Widget wrapper ── */
.sb-calc-widget {
    font-family: inherit;
    font-size: inherit;
    color: #333;
    max-width: 700px;
    line-height: 1.55;
    margin: 0;
    padding: 0;
}

/* ── Main heading ── */
.sb-calc-widget .sbc-heading {
    font-size: 1.5em;
    font-weight: 600;
    color: #222;
    margin: 0 0 26px 0;
    padding: 0;
    border: none;
    background: none;
    line-height: 1.3;
}

/* ── Form groups ── */
.sb-calc-widget .sbc-group {
    margin-bottom: 22px;
}

/* ── Labels ── */
.sb-calc-widget .sbc-label {
    display: block;
    font-size: 0.93em;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    cursor: default;
}

/* ── Select dropdown ── */
.sb-calc-widget .sbc-select {
    display: block;
    width: 100%;
    max-width: 360px;
    padding: 9px 12px;
    font-size: 0.88em;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    border: 1px solid #bbb;
    border-radius: 3px;
    cursor: pointer;
    -webkit-appearance: auto;
    -moz-appearance: auto;
    appearance: auto;
    /* Reset any theme overrides */
    box-shadow: none;
    outline: none;
}

.sb-calc-widget .sbc-select:focus {
    outline: 2px solid #5a5a5a;
    outline-offset: 1px;
    border-color: #5a5a5a;
}

/* ── Number input ── */
.sb-calc-widget .sbc-input {
    display: block;
    width: 100%;
    max-width: 360px;
    padding: 9px 12px;
    font-size: 0.88em;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    border: 1px solid #bbb;
    border-radius: 3px;
    box-shadow: none;
    outline: none;
}

.sb-calc-widget .sbc-input:focus {
    outline: 2px solid #5a5a5a;
    outline-offset: 1px;
    border-color: #5a5a5a;
}

/* Remove browser spinner arrows on number input */
.sb-calc-widget .sbc-input::-webkit-outer-spin-button,
.sb-calc-widget .sbc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.sb-calc-widget .sbc-input[type="number"] {
    -moz-appearance: textfield;
}

/* ── Checkboxes: 3-column grid matching demo ── */
.sb-calc-widget .sbc-checks {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 10px 20px;
    max-width: 600px;
    align-items: start;
}

@media (max-width: 560px) {
    .sb-calc-widget .sbc-checks {
        grid-template-columns: repeat(2, auto);
    }
}

@media (max-width: 340px) {
    .sb-calc-widget .sbc-checks {
        grid-template-columns: 1fr;
    }
}

.sb-calc-widget .sbc-check-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.88em;
    color: #333;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

.sb-calc-widget .sbc-check-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    min-width: 14px;
    flex-shrink: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
    accent-color: #3a6fc4;
    /* reset any theme border/background on checkboxes */
    border: 1px solid #999;
    border-radius: 2px;
}

/* ── Validation error messages ── */
.sb-calc-widget .sbc-error {
    display: none;
    font-size: 0.8em;
    color: #cc0000;
    margin-top: 5px;
    font-weight: 500;
}

.sb-calc-widget .sbc-error.sbc-show {
    display: block;
}

/* ── Calculate button ── */
.sb-calc-widget .sbc-btn {
    display: inline-block;
    margin-top: 26px;
    padding: 12px 30px;
    background-color: #5f5f5f;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9em;
    font-weight: 700;
    letter-spacing: 0.4px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    /* prevent theme styles from overriding */
    text-decoration: none;
    line-height: normal;
    box-shadow: none;
    outline: none;
}

.sb-calc-widget .sbc-btn:hover {
    background-color: #3d3d3d;
    color: #fff;
    text-decoration: none;
}

.sb-calc-widget .sbc-btn:focus {
    outline: 2px solid #3d3d3d;
    outline-offset: 2px;
}

.sb-calc-widget .sbc-btn:active {
    background-color: #2a2a2a;
}

/* ── Result container (hidden by default) ── */
.sb-calc-widget .sbc-result {
    display: none;
    margin-top: 34px;
}

.sb-calc-widget .sbc-result.sbc-show {
    display: block;
}

/* ── "Estimated Project Cost" heading ── */
.sb-calc-widget .sbc-result-heading {
    font-size: 1.35em;
    font-weight: 600;
    color: #222;
    margin: 0 0 10px 0;
    padding: 0;
    border: none;
    background: none;
    line-height: 1.3;
}

/* ── Total dollar amount ── */
.sb-calc-widget .sbc-total {
    font-size: 0.95em;
    color: #333;
    margin: 0 0 24px 0;
    padding: 0;
    font-weight: normal;
}

/* ── "Cost Breakdown" heading ── */
.sb-calc-widget .sbc-breakdown-heading {
    font-size: 1.35em;
    font-weight: 600;
    color: #222;
    margin: 0 0 12px 0;
    padding: 0;
    border: none;
    background: none;
    line-height: 1.3;
}

/* ── Breakdown bullet list ── */
.sb-calc-widget .sbc-breakdown-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0 0 8px 0;
}

.sb-calc-widget .sbc-breakdown-list li {
    font-size: 0.88em;
    color: #333;
    margin-bottom: 5px;
    padding: 0;
    list-style: disc;
}

/* ── Footer notes ── */
.sb-calc-widget .sbc-notes {
    margin-top: 28px;
    font-size: 0.8em;
    color: #666;
    line-height: 1.65;
}

.sb-calc-widget .sbc-notes p {
    margin: 0 0 4px 0;
    padding: 0;
}

.sb-calc-widget .sbc-notes a {
    color: #3a6fc4;
    text-decoration: underline;
}

.sb-calc-widget .sbc-notes a:hover {
    color: #1a4a8a;
}
