/* Shared online tool UI — matches Form-15 / site theme */

.ts-tool,
.ts-tool * {
    box-sizing: border-box;
}

.ts-tool {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    max-width: 100%;
    padding: 0;
    background: transparent;
    overflow-x: clip;
}

.ts-tool__inner {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Hide duplicate in-tool titles (page header already shows the name) */
.ts-tool .elementor-heading-title,
.ts-tool .survey-hero h1,
.ts-tool .calc-container > h1:first-of-type {
    display: none;
}

.ts-tool .survey-tool-page,
.ts-tool .calc-container,
.ts-tool #fmb-calculator,
.ts-tool .tool-panel {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 0;
}

.ts-tool .survey-hero {
    padding: 0 0 1rem;
    margin: 0 0 1rem;
    text-align: left;
}

.ts-tool .survey-hero-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 0 0.75rem;
    box-shadow: var(--shadow-sm);
}

.ts-tool .survey-hero-icon i {
    font-size: 1.35rem;
}

.ts-tool .survey-hero p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--color-text-muted);
}

.ts-tool .survey-container {
    max-width: 100%;
}

.ts-tool .survey-tool,
.ts-tool .tool-card,
.ts-tool .panel,
.ts-tool #results {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: clamp(0.75rem, 2.5vw, 1.25rem);
}

.ts-tool h2,
.ts-tool h3,
.ts-tool h4 {
    font-family: var(--font-display);
    color: var(--color-text);
    line-height: 1.3;
}

.ts-tool label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--color-text);
}

.ts-tool input[type="text"],
.ts-tool input[type="number"],
.ts-tool input[type="email"],
.ts-tool input[type="file"],
.ts-tool input[type="date"],
.ts-tool input[type="time"],
.ts-tool select,
.ts-tool textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.92rem;
    color: var(--color-text);
    background: var(--color-surface);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ts-tool input:focus,
.ts-tool select:focus,
.ts-tool textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(10, 124, 110, 0.15);
}

.ts-tool button,
.ts-tool input[type="button"],
.ts-tool input[type="submit"],
.ts-tool .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.62rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.ts-tool button:hover,
.ts-tool input[type="button"]:hover,
.ts-tool input[type="submit"]:hover,
.ts-tool .btn:hover {
    background: var(--color-primary-hover);
}

.ts-tool button:disabled,
.ts-tool input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ts-tool table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.ts-tool th,
.ts-tool td {
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--color-border);
    text-align: left;
}

.ts-tool th {
    background: var(--color-surface-2);
    font-weight: 600;
}

.ts-tool .responsive-table,
.ts-tool .table-scroll,
.ts-tool .table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ts-tool .bend-table {
    min-width: 540px;
}

.ts-tool #results div:nth-child(odd) {
    background: var(--color-surface-2);
}

.ts-tool #results div:nth-child(even) {
    background: var(--color-surface);
}

.ts-tool #map,
.ts-tool .map-container,
.ts-tool #mapDiv {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ts-tool form {
    max-width: 100%;
}

.ts-tool #surveyForm p {
    margin: 0.65rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.ts-tool #surveyForm input[type="text"] {
    margin-top: 0.35rem;
}

.ts-tool-faq {
    margin-top: 1.75rem;
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface, #fff);
}

.ts-tool-faq__title {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    font-family: 'Source Serif 4', Georgia, serif;
}

.ts-tool-faq__item + .ts-tool-faq__item {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.ts-tool-faq__q {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.ts-tool-faq__a {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--color-text-muted, #5f7168);
}

@media (max-width: 767px) {
    .ts-tool .survey-tool,
    .ts-tool .tool-card,
    .ts-tool .panel,
    .ts-tool #results {
        padding: 0.65rem 0.5rem;
    }

    .ts-tool button,
    .ts-tool input[type="button"],
    .ts-tool input[type="submit"],
    .ts-tool .btn {
        width: 100%;
    }

    .ts-tool-faq {
        padding: 1rem;
    }
}