/* Freedom TJM Simulator – Elementor widget styles.
 * Shares the design language (and CSS custom property names) of the
 * revenue simulator so both widgets look consistent on the same page.
 */

.freedom-tjm {
    --fs-accent: #F57D4A;
    --fs-accent-2: #E45C2E;
    --fs-panel-bg: #0B1B2B;
    --fs-panel-bg-2: #14283D;
    --fs-text: #1A2A3A;
    --fs-muted: #8A98A8;
    --fs-border: #E6E9EE;
    --fs-radius: 18px;

    font-family: inherit;
    color: var(--fs-text);
    box-sizing: border-box;
}

.freedom-tjm *,
.freedom-tjm *::before,
.freedom-tjm *::after {
    box-sizing: inherit;
}

.freedom-tjm__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

@media (max-width: 960px) {
    .freedom-tjm__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ---------- Form column ---------- */
.freedom-tjm__eyebrow {
    display: inline-block;
    background: rgba(245, 125, 74, 0.12);
    color: var(--fs-accent);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 24px;
}

.freedom-tjm__heading {
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--fs-text);
    margin: 0 0 28px;
}

.freedom-tjm__field {
    margin-bottom: 20px;
}

.freedom-tjm__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--fs-text);
    margin-bottom: 10px;
}

.freedom-tjm__control {
    background: #fff;
    border: 1px solid var(--fs-border);
    border-radius: 12px;
}

/* Category select */
.freedom-tjm__control--select {
    position: relative;
}

.freedom-tjm select.freedom-tjm__select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--fs-text);
    padding: 14px 44px 14px 18px;
    border-radius: inherit;
    cursor: pointer;
    line-height: 1.3;
    box-shadow: none;
}

.freedom-tjm select.freedom-tjm__select:focus {
    outline: 2px solid var(--fs-accent);
    outline-offset: -2px;
}

.freedom-tjm__select-caret {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fs-muted);
    pointer-events: none;
}

/* Profile segmented control */
.freedom-tjm__segments {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: #F2F4F7;
    border: 1px solid var(--fs-border);
    border-radius: 12px;
    padding: 5px;
}

.freedom-tjm button.freedom-tjm__segment {
    appearance: none;
    border: 0;
    margin: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--fs-muted);
    padding: 10px 8px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: none;
    line-height: 1.2;
}

.freedom-tjm button.freedom-tjm__segment:hover {
    color: var(--fs-text);
    background: rgba(255, 255, 255, 0.7);
}

.freedom-tjm button.freedom-tjm__segment.is-active {
    background: #fff;
    color: var(--fs-accent-2);
    box-shadow: 0 2px 8px rgba(11, 27, 43, 0.10);
}

.freedom-tjm button.freedom-tjm__segment:focus-visible {
    outline: 2px solid var(--fs-accent);
    outline-offset: -2px;
}

/* Numeric fields container — 'stacked' (default flow, one per line)
   or 'inline' (3-up grid, collapses to one column on small screens). */
.freedom-tjm__fields--inline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.freedom-tjm__fields--inline .freedom-tjm__field {
    margin-bottom: 0;
}

.freedom-tjm__fields {
    margin-bottom: 20px;
}

.freedom-tjm__fields .freedom-tjm__field:last-child {
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .freedom-tjm__fields--inline {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Number input group */
.freedom-tjm__num {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--fs-border);
    border-radius: 12px;
    padding: 13px 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.freedom-tjm__num:focus-within {
    border-color: var(--fs-accent);
    box-shadow: 0 0 0 3px rgba(245, 125, 74, 0.15);
}

/* High-specificity selector to outrank theme-level input resets. */
.freedom-tjm input[type="number"].freedom-tjm__num-input {
    -moz-appearance: textfield;
    appearance: textfield;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    color: var(--fs-text);
    text-align: left;
    padding: 0;
    margin: 0;
    box-shadow: none;
    outline: none;
    line-height: 1.2;
}

.freedom-tjm input[type="number"].freedom-tjm__num-input::-webkit-outer-spin-button,
.freedom-tjm input[type="number"].freedom-tjm__num-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.freedom-tjm__num-suffix {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--fs-muted);
    white-space: nowrap;
}

/* CTA */
.freedom-tjm__cta-wrap {
    margin-top: 28px;
}

.freedom-tjm a.freedom-tjm__cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--fs-accent) 0%, var(--fs-accent-2) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    padding: 16px 28px;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(228, 92, 46, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.freedom-tjm a.freedom-tjm__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(228, 92, 46, 0.45);
    color: #fff;
}

/* ---------- Results panel ---------- */
.freedom-tjm__panel {
    background: linear-gradient(160deg, var(--fs-panel-bg) 0%, var(--fs-panel-bg-2) 100%);
    border-radius: var(--fs-radius);
    padding: 36px 32px;
    color: #fff;
    position: sticky;
    top: 24px;
}

.freedom-tjm__hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    margin-bottom: 20px;
}

.freedom-tjm__hero-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 8px;
}

.freedom-tjm__hero-value {
    font-size: clamp(40px, 4.5vw, 56px);
    font-weight: 800;
    line-height: 1;
    color: var(--fs-accent);
}

.freedom-tjm__hero-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 8px;
}

.freedom-tjm__rows {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.freedom-tjm__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 14px;
}

.freedom-tjm__row:last-child {
    border-bottom: 0;
}

.freedom-tjm__row-label {
    color: rgba(255, 255, 255, 0.65);
}

.freedom-tjm__row-value {
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
}

/* Verdict badge — color shifts with data-verdict */
.freedom-tjm__verdict {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.freedom-tjm__verdict-icon {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    background: #9AA7B5;
}

.freedom-tjm__verdict[data-verdict="ok"] .freedom-tjm__verdict-icon    { background: #3DCC8E; }
.freedom-tjm__verdict[data-verdict="above"] .freedom-tjm__verdict-icon { background: var(--fs-accent); }
.freedom-tjm__verdict[data-verdict="below"] .freedom-tjm__verdict-icon { background: #FFC53D; }

.freedom-tjm__verdict-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.freedom-tjm__hypothesis {
    margin: 16px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.freedom-tjm__hypothesis strong {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
}

.freedom-tjm__data {
    display: none;
}
