:root {
    --ray-red: #e31e24;
    --ray-red-hover: #c9181e;
    --ray-charcoal: #202327;
    --ray-black: #111315;
    --ray-page: #f5f6f7;
    --ray-card: #ffffff;
    --ray-border: #dedfe2;
    --ray-text: #24272b;
    --ray-muted: #6f747b;
    --ray-shadow: 0 14px 38px rgba(22, 25, 28, .12);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--ray-page);
    color: var(--ray-text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body {
    min-height: 100vh;
}

button, textarea {
    font: inherit;
}

.public-ray-site-header {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 32px;
    background: linear-gradient(90deg, var(--ray-black), var(--ray-charcoal));
    color: #fff;
}

.public-ray-site-header__brand,
.public-ray-site-header__back {
    color: #fff;
    text-decoration: none;
}

.public-ray-radiant-wordmark {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: .12em;
}

.public-ray-site-header__back {
    color: rgba(255,255,255,.72);
    font-size: .82rem;
}

    .public-ray-site-header__back:hover {
        color: #fff;
    }

.public-ray-page {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 44px;
}

.public-ray-hero {
    display: grid;
    min-height: 225px;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: center;
    gap: 32px;
    overflow: hidden;
    margin-bottom: 20px;
    padding: 28px 36px;
    border-radius: 18px;
    background: radial-gradient(circle at 78% 20%, rgba(227,30,36,.15), transparent 32%), linear-gradient(135deg, #fff, #f2f3f4);
    box-shadow: 0 8px 28px rgba(22,25,28,.06);
}

.public-ray-eyebrow {
    margin-bottom: 8px;
    color: var(--ray-red);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.public-ray-hero h1 {
    margin: 0;
    color: var(--ray-charcoal);
    font-size: clamp(2rem, 4vw, 3.7rem);
    line-height: 1.02;
    letter-spacing: -.045em;
}

    .public-ray-hero h1 span {
        color: var(--ray-red);
    }

.public-ray-hero p {
    max-width: 680px;
    margin: 15px 0 0;
    color: var(--ray-muted);
    font-size: 1rem;
    line-height: 1.55;
}

.public-ray-hero__ray {
    width: 250px;
    max-width: 100%;
    justify-self: end;
    transform: translateY(25px);
}

.public-ray-chat-card {
    display: grid;
    height: min(720px, calc(100vh - 120px));
    min-height: 600px;
    grid-template-rows: auto minmax(0,1fr) auto auto;
    overflow: hidden;
    border: 1px solid var(--ray-border);
    border-radius: 16px;
    background: var(--ray-card);
    box-shadow: var(--ray-shadow);
}

.public-ray-chat-header {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ray-border);
    background: #fafafa;
}

.public-ray-chat-header__identity {
    display: flex;
    align-items: center;
    gap: 11px;
}

.public-ray-avatar {
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,.10);
}

    .public-ray-avatar img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.public-ray-chat-header__identity strong,
.public-ray-chat-header__identity span {
    display: block;
}

.public-ray-chat-header__identity strong {
    font-size: .98rem;
}

.public-ray-chat-header__identity span {
    margin-top: 2px;
    color: var(--ray-muted);
    font-size: .76rem;
}

.public-ray-text-button {
    border: 0;
    background: transparent;
    color: var(--ray-red);
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}

.public-ray-messages {
    min-height: 0;
    overflow-y: auto;
    padding: 22px;
    background: linear-gradient(rgba(245,246,247,.92), rgba(245,246,247,.92)), radial-gradient(circle at top left, rgba(227,30,36,.05), transparent 40%);
}

.public-ray-row {
    display: flex;
    margin-bottom: 14px;
}

.public-ray-row--user {
    justify-content: flex-end;
}

.public-ray-bubble {
    max-width: min(80%, 760px);
    padding: 11px 14px;
    border-radius: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.public-ray-row--ray .public-ray-bubble {
    border: 1px solid var(--ray-border);
    border-bottom-left-radius: 4px;
    background: #fff;
    box-shadow: 0 2px 9px rgba(0,0,0,.04);
}

.public-ray-row--user .public-ray-bubble {
    border-bottom-right-radius: 4px;
    background: var(--ray-red);
    color: #fff;
}

.public-ray-bubble a {
    color: inherit;
    font-weight: 700;
}

.public-ray-store-finder-row {
    display: flex;
    justify-content: flex-start;
    margin: -4px 0 14px;
}

.public-ray-store-finder-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    background: var(--ray-red);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 7px 18px rgba(227, 30, 36, .18);
}

.public-ray-store-finder-button:hover,
.public-ray-store-finder-button:focus-visible {
    background: #c9141b;
    color: #fff;
}

.public-ray-starters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 8px;
    margin: 18px 0 8px;
}

.public-ray-starter {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border: 1px solid var(--ray-border);
    border-radius: 9px;
    background: #fff;
    color: var(--ray-text);
    text-align: left;
    cursor: pointer;
}

    .public-ray-starter:hover {
        border-color: rgba(227,30,36,.45);
        background: rgba(227,30,36,.035);
    }

.public-ray-suggestions {
    display: flex;
    gap: 7px;
    margin: -4px 0 16px;
    flex-wrap: wrap;
}

.public-ray-suggestion {
    padding: .38rem .68rem;
    border: 1px solid #cfd2d6;
    border-radius: 999px;
    background: #fff;
    color: var(--ray-text);
    font-size: .78rem;
    cursor: pointer;
}

    .public-ray-suggestion:hover {
        border-color: var(--ray-red);
        color: var(--ray-red);
    }

.public-ray-typing {
    display: inline-flex;
    gap: 4px;
}

    .public-ray-typing span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--ray-muted);
        animation: rayPulse 1.05s infinite ease-in-out;
    }

        .public-ray-typing span:nth-child(2) {
            animation-delay: .12s;
        }

        .public-ray-typing span:nth-child(3) {
            animation-delay: .24s;
        }

.public-ray-feedback {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    padding: 4px 16px;
    border-top: 1px solid var(--ray-border);
    color: var(--ray-muted);
    font-size: .73rem;
}

    .public-ray-feedback[hidden] {
        display: none;
    }

    .public-ray-feedback button {
        border: 0;
        background: transparent;
        cursor: pointer;
        font-size: .95rem;
    }

.public-ray-composer {
    padding: 13px 16px 12px;
    border-top: 1px solid var(--ray-border);
    background: #fff;
}

.public-ray-composer__row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.public-ray-composer textarea {
    min-height: 52px;
    max-height: 130px;
    flex: 1 1 auto;
    resize: vertical;
    padding: 13px 14px;
    border: 1px solid #cfd2d6;
    border-radius: 9px;
    outline: none;
    color: var(--ray-text);
}

    .public-ray-composer textarea:focus {
        border-color: var(--ray-red);
        box-shadow: 0 0 0 3px rgba(227,30,36,.10);
    }

.public-ray-send {
    display: inline-flex;
    min-width: 110px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 9px;
    background: var(--ray-red);
    color: #fff;
    font-weight: 750;
    cursor: pointer;
}

    .public-ray-send:hover {
        background: var(--ray-red-hover);
    }

    .public-ray-send:disabled {
        opacity: .55;
        cursor: wait;
    }

.public-ray-composer__hint {
    margin-top: 6px;
    color: var(--ray-muted);
    font-size: .68rem;
}

.public-ray-site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 18px 32px;
    color: var(--ray-muted);
    font-size: .72rem;
}

.public-ray-error-page {
    width: min(720px, calc(100% - 40px));
    margin: 80px auto;
    padding: 36px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--ray-shadow);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

@keyframes rayPulse {
    0%,80%,100% {
        opacity: .3;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

@media (max-width: 820px) {
    .public-ray-page {
        width: min(100% - 24px, 760px);
        padding-top: 18px;
    }

    .public-ray-site-header {
        padding: 0 16px;
    }

    .public-ray-hero {
        min-height: 180px;
        grid-template-columns: 1fr 150px;
        padding: 22px;
    }

    .public-ray-hero__ray {
        width: 170px;
    }

    .public-ray-starters {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .public-ray-chat-card {
        height: calc(100vh - 90px);
        min-height: 580px;
    }
}

@media (max-width: 560px) {
    .public-ray-site-header__back {
        font-size: .72rem;
    }

    .public-ray-hero {
        display: block;
        min-height: auto;
        padding: 20px;
    }

    .public-ray-hero__ray {
        display: none;
    }

    .public-ray-starters {
        grid-template-columns: 1fr;
    }

    .public-ray-chat-card {
        height: calc(100vh - 82px);
        min-height: 540px;
        border-radius: 12px;
    }

    .public-ray-messages {
        padding: 14px;
    }

    .public-ray-bubble {
        max-width: 92%;
    }

    .public-ray-composer__row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .public-ray-send {
        min-height: 44px;
    }

    .public-ray-site-footer {
        display: block;
        padding: 14px 16px;
        text-align: center;
    }

        .public-ray-site-footer span {
            display: block;
            margin: 2px 0;
        }
}

@media (prefers-reduced-motion: reduce) {
    .public-ray-typing span {
        animation: none;
    }
}


/* C2.1 — responsive single-viewport Ask Ray */
@media (min-width: 821px) {
    body {
        height: 100vh;
        min-height: 0;
        overflow: hidden;
        display: grid;
        grid-template-rows: 56px minmax(0, 1fr) 34px;
    }

    .public-ray-site-header {
        min-height: 56px;
    }

    body > main {
        min-height: 0;
        overflow: hidden;
    }

    .public-ray-page {
        display: grid;
        width: min(1180px, calc(100% - 32px));
        height: 100%;
        min-height: 0;
        grid-template-columns: minmax(260px, 31%) minmax(0, 1fr);
        gap: 18px;
        margin: 0 auto;
        padding: 18px 0;
    }

    .public-ray-hero {
        display: flex;
        height: 100%;
        min-height: 0;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        gap: 14px;
        margin: 0;
        padding: clamp(22px, 3vh, 34px);
    }

        .public-ray-hero h1 {
            font-size: clamp(2rem, 3.2vw, 3.35rem);
        }

        .public-ray-hero p {
            font-size: .94rem;
            line-height: 1.5;
        }

    .public-ray-hero__ray {
        width: min(360px, 118%);
        max-width: none;
        max-height: 54vh;
        align-self: center;
        object-fit: contain;
        transform: none;
    }

    .public-ray-chat-card {
        height: 100%;
        min-height: 0;
    }

    .public-ray-chat-header {
        min-height: 62px;
    }

    .public-ray-messages {
        min-height: 0;
        padding: 18px;
    }

    .public-ray-composer {
        padding: 10px 14px 9px;
    }

        .public-ray-composer textarea {
            min-height: 46px;
        }

    .public-ray-site-footer {
        min-height: 34px;
        align-items: center;
        padding: 0 32px;
    }
}

@media (min-width: 821px) and (max-height: 760px) {
    body {
        grid-template-rows: 50px minmax(0, 1fr) 28px;
    }

    .public-ray-page {
        gap: 12px;
        padding: 10px 0;
    }

    .public-ray-hero {
        padding: 20px;
    }

        .public-ray-hero h1 {
            font-size: clamp(1.8rem, 3vw, 2.7rem);
        }

        .public-ray-hero p {
            margin-top: 10px;
            font-size: .86rem;
        }

    .public-ray-hero__ray {
        width: min(280px, 102%);
        max-height: 42vh;
    }

    .public-ray-chat-header {
        min-height: 56px;
    }

    .public-ray-avatar {
        width: 42px;
        height: 42px;
    }

    .public-ray-messages {
        padding: 14px 16px;
    }

    .public-ray-composer__hint {
        margin-top: 4px;
        font-size: .64rem;
    }

    .public-ray-site-footer {
        min-height: 28px;
        font-size: .66rem;
    }
}

@media (min-width: 561px) and (max-width: 820px) {
    body {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        display: grid;
        grid-template-rows: 54px minmax(0, 1fr);
    }

    .public-ray-site-header {
        min-height: 54px;
    }

    body > main {
        min-height: 0;
        overflow: hidden;
    }

    .public-ray-page {
        display: grid;
        width: min(100% - 20px, 760px);
        height: 100%;
        min-height: 0;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 10px;
        padding: 10px 0;
    }

    .public-ray-hero {
        display: block;
        min-height: 0;
        margin: 0;
        padding: 14px 18px;
    }

        .public-ray-hero h1 {
            font-size: 1.7rem;
        }

            .public-ray-hero h1 br,
            .public-ray-hero__ray {
                display: none;
            }

        .public-ray-hero p {
            margin-top: 6px;
            font-size: .82rem;
            line-height: 1.4;
        }

    .public-ray-chat-card {
        height: 100%;
        min-height: 0;
    }

    .public-ray-site-footer {
        display: none;
    }
}

@media (max-width: 560px) {
    body {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        display: grid;
        grid-template-rows: 50px minmax(0, 1fr);
    }

    .public-ray-site-header {
        min-height: 50px;
        padding: 0 12px;
    }

    body > main {
        min-height: 0;
        overflow: hidden;
    }

    .public-ray-page {
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 0;
    }

    .public-ray-hero {
        display: none;
    }

    .public-ray-chat-card {
        height: 100%;
        min-height: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .public-ray-chat-header {
        min-height: 58px;
        padding: 7px 12px;
    }

    .public-ray-avatar {
        width: 42px;
        height: 42px;
    }

    .public-ray-messages {
        min-height: 0;
        padding: 12px;
    }

    .public-ray-composer {
        padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
    }

    .public-ray-composer__row {
        display: flex;
        grid-template-columns: none;
    }

    .public-ray-composer textarea {
        min-height: 46px;
        max-height: 96px;
        resize: none;
    }

    .public-ray-send {
        min-width: 52px;
        width: 52px;
        min-height: 46px;
        padding: 0;
    }

        .public-ray-send span:first-child {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip: rect(0,0,0,0);
            white-space: nowrap;
        }

        .public-ray-send span:last-child {
            font-size: 1.35rem;
        }

    .public-ray-composer__hint,
    .public-ray-site-footer {
        display: none;
    }
}

/* FH1 — reusable left-hand workflow context panel */
.public-ray-context {
    width: 100%;
    min-height: 0;
    margin-top: auto;
}

.public-ray-context__idle {
    display: flex;
    width: 100%;
    justify-content: center;
}

    .public-ray-context__idle[hidden],
    .public-ray-context__workflow[hidden] {
        display: none !important;
    }

.public-ray-context__workflow {
    width: 100%;
    padding-top: 18px;
    border-top: 1px solid rgba(32,35,39,.10);
}

.public-ray-context__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
}

.public-ray-context__icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 9px;
    background: rgba(227,30,36,.10);
    color: var(--ray-red);
    font-size: 1.05rem;
    font-weight: 800;
}

.public-ray-context__eyebrow {
    color: var(--ray-red);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.public-ray-context__heading h2 {
    margin: 2px 0 0;
    color: var(--ray-charcoal);
    font-size: .94rem;
    line-height: 1.2;
}

.public-ray-context__facts {
    display: grid;
    gap: 5px;
    margin-bottom: 15px;
}

.public-ray-context-fact {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 7px;
    background: rgba(255,255,255,.62);
    font-size: .72rem;
}

    .public-ray-context-fact span {
        color: var(--ray-muted);
    }

    .public-ray-context-fact strong {
        color: var(--ray-text);
        text-align: right;
    }

.public-ray-context__section + .public-ray-context__section {
    margin-top: 14px;
}

.public-ray-context__section h3 {
    margin: 0 0 8px;
    color: var(--ray-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.public-ray-context__steps {
    display: grid;
    gap: 4px;
}

.public-ray-context-step {
    display: grid;
    grid-template-columns: 22px minmax(0,1fr);
    align-items: center;
    gap: 7px;
    min-height: 28px;
    color: #969aa0;
    font-size: .75rem;
}

.public-ray-context-step__marker {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 1px solid #cfd2d6;
    border-radius: 50%;
    background: #fff;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
}

.public-ray-context-step.is-complete {
    color: var(--ray-text);
}

    .public-ray-context-step.is-complete .public-ray-context-step__marker {
        border-color: #348a53;
        background: #348a53;
    }

.public-ray-context-step.is-current {
    color: var(--ray-text);
    font-weight: 750;
}

    .public-ray-context-step.is-current .public-ray-context-step__marker {
        border: 5px solid rgba(227,30,36,.20);
        background: var(--ray-red);
        box-shadow: inset 0 0 0 2px #fff;
    }

.public-ray-context__files {
    display: grid;
    gap: 5px;
}

.public-ray-context-file {
    display: block;
    padding: 7px 8px;
    border: 1px solid rgba(32,35,39,.10);
    border-radius: 7px;
    background: rgba(255,255,255,.72);
    color: var(--ray-text);
    font-size: .72rem;
    text-decoration: none;
}

@media (min-width: 821px) and (max-height: 760px) {
    .public-ray-context__workflow {
        padding-top: 11px;
    }

    .public-ray-context__heading {
        margin-bottom: 8px;
    }

    .public-ray-context__facts {
        margin-bottom: 9px;
    }

    .public-ray-context-step {
        min-height: 24px;
    }
}

@media (min-width: 561px) and (max-width: 820px) {
    .public-ray-context {
        display: none;
    }
}

@media (max-width: 560px) {
    .public-ray-context {
        display: none;
    }
}


/* FH2 — Floor Heating plan upload */
.public-ray-context__upload p {
    margin: 0 0 10px;
    color: var(--ray-muted);
    font-size: .76rem;
    line-height: 1.45;
}

.public-ray-context__upload-actions {
    display: grid;
    gap: 7px;
}

.public-ray-context__upload-button {
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: var(--ray-red);
    color: #fff;
    font-size: .78rem;
    font-weight: 750;
    cursor: pointer;
}

    .public-ray-context__upload-button:hover {
        background: var(--ray-red-hover);
    }

.public-ray-context__upload-button--secondary {
    border: 1px solid var(--ray-border);
    background: #fff;
    color: var(--ray-text);
}

    .public-ray-context__upload-button--secondary:hover {
        border-color: var(--ray-red);
        background: #fff;
        color: var(--ray-red);
    }

.public-ray-attach {
    display: grid;
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    place-items: center;
    align-self: stretch;
    border: 1px solid #cfd2d6;
    border-radius: 9px;
    background: #fff;
    color: var(--ray-red);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
}

    .public-ray-attach[hidden] {
        display: none !important;
    }

    .public-ray-attach:hover {
        border-color: var(--ray-red);
        background: rgba(227,30,36,.04);
    }

.public-ray-attach--camera {
    display: none;
}

@media (max-width: 560px) {
    .public-ray-attach {
        width: 44px;
        min-width: 44px;
        min-height: 46px;
    }

    .public-ray-attach--camera:not([hidden]) {
        display: grid;
    }
}

/* FH3 — generated plan preview/editor */
.public-ray-context__plan {
    min-width: 0;
}

.public-ray-plan-preview-button {
    width: 100%;
    padding: 0;
    border: 1px solid var(--ray-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

    .public-ray-plan-preview-button img {
        display: block;
        width: 100%;
        aspect-ratio: 1.35/1;
        object-fit: contain;
        background: #f7f8f9;
    }

    .public-ray-plan-preview-button span {
        display: block;
        padding: 8px 10px;
        color: var(--ray-red);
        font-size: .78rem;
        font-weight: 750;
    }

.public-ray-context__area {
    margin-top: 7px;
    color: var(--ray-muted);
    font-size: .72rem;
}

.public-ray-plan-modal[hidden] {
    display: none;
}

.public-ray-plan-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(16,18,20,.72);
}

.public-ray-plan-modal__dialog {
    display: grid;
    grid-template-rows: auto minmax(0,1fr) auto;
    width: min(1100px,96vw);
    height: min(850px,94vh);
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0,0,0,.28);
}

.public-ray-plan-modal__header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--ray-border);
}

    .public-ray-plan-modal__header h2 {
        margin: 0;
    }

    .public-ray-plan-modal__header p {
        margin: 5px 0 0;
        color: var(--ray-muted);
        font-size: .82rem;
    }

.public-ray-plan-modal__close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: #f1f2f3;
    font-size: 1.5rem;
    cursor: pointer;
}

.public-ray-plan-editor-wrap {
    min-height: 0;
    padding: 14px;
    background: #eef0f2;
}

.public-ray-plan-editor {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #fff;
    border-radius: 10px;
    touch-action: none;
}

.public-ray-plan-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 18px;
    border-top: 1px solid var(--ray-border);
}

.public-ray-plan-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--ray-muted);
    font-size: .72rem;
}

    .public-ray-plan-legend span {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .public-ray-plan-legend i {
        width: 18px;
        height: 12px;
        border: 1px solid #aaa;
    }

    .public-ray-plan-legend .is-heatable {
        background: #dff3e4;
    }

    .public-ray-plan-legend .is-exclusion {
        background: #f6cfd1;
        border-color: #e31e24;
    }

    .public-ray-plan-legend .is-fixture {
        background: #fff;
        border-color: #555;
    }

.public-ray-plan-modal__actions {
    display: flex;
    gap: 8px;
}

body.is-plan-modal-open {
    overflow: hidden;
}

@media (max-width:700px) {
    .public-ray-plan-modal {
        padding: 0;
    }

    .public-ray-plan-modal__dialog {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
    }

    .public-ray-plan-modal__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .public-ray-plan-modal__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}


/* FH3.1 — prioritise the active plan in the Floor Heating context */
@media (min-width: 821px) {
    .public-ray-hero {
        min-height: 0;
        overflow: hidden;
    }

    .public-ray-context {
        display: flex;
        min-height: 0;
        flex: 1 1 auto;
        overflow: hidden;
        margin-top: 14px;
    }

    .public-ray-context__workflow {
        min-height: 0;
        max-height: 100%;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-right: 6px;
        scrollbar-gutter: stable;
    }

        .public-ray-context__workflow::-webkit-scrollbar {
            width: 8px;
        }

        .public-ray-context__workflow::-webkit-scrollbar-thumb {
            border-radius: 999px;
            background: rgba(32,35,39,.22);
        }

    .public-ray-context__plan {
        margin-top: 4px !important;
        padding: 10px;
        border: 1px solid rgba(227,30,36,.16);
        border-radius: 10px;
        background: rgba(255,255,255,.62);
    }

        .public-ray-context__plan h3 {
            color: var(--ray-red);
        }

    .public-ray-plan-preview-button img {
        max-height: 300px;
    }
}


/* FH3.5 — plan-first editor with live calculation */
.public-ray-plan-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    min-height: 0;
    padding: 14px;
    gap: 12px;
    background: #eef0f2;
}

    .public-ray-plan-workspace .public-ray-plan-editor-wrap {
        padding: 0;
        background: transparent;
    }

.public-ray-plan-properties {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    overflow-y: auto;
    border: 1px solid var(--ray-border);
    border-radius: 10px;
    background: #fff;
}

.public-ray-plan-properties__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

    .public-ray-plan-properties__heading strong {
        font-size: .9rem;
    }

#publicRayPlanLiveArea {
    color: var(--ray-red);
    font-size: .76rem;
    font-weight: 750;
    text-align: right;
}

.public-ray-plan-selection {
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--ray-border);
}

.public-ray-plan-selection__title {
    color: var(--ray-muted);
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.public-ray-plan-selection label {
    display: grid;
    gap: 5px;
    color: var(--ray-muted);
    font-size: .72rem;
}

.public-ray-plan-selection input {
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid var(--ray-border);
    border-radius: 7px;
    background: #fff;
    color: var(--ray-text);
}

.public-ray-plan-selection__dimensions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.public-ray-plan-properties__hint {
    margin: auto 0 0;
    color: var(--ray-muted);
    font-size: .7rem;
    line-height: 1.45;
}

@media (max-width: 850px) {
    .public-ray-plan-workspace {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .public-ray-plan-editor-wrap {
        min-height: 58vh;
    }

    .public-ray-plan-properties {
        overflow: visible;
    }
}

.public-ray-plan-selection__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 8px;
}

/* Header/footer shell styles now load from https://www.radiant.com.au/css/radiant-shell.css (via the shared header). */

/* Keep Ask Ray as a full working viewport; the full Radiant footer follows below it. */
body {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

    body > main {
        min-height: 0 !important;
        overflow: visible !important;
    }

.finishiq-nav-button {
    position: relative;
    overflow: visible;
}

/* ==========================================================
   finishIQ header button – "THE ORIGINAL" / "COLOUR MATCHING"
   ========================================================== */

.finishiq-nav-button {
    position: relative;
    overflow: visible;
}

    /* Shared tab styling */
    .finishiq-nav-button::before,
    .finishiq-nav-button::after {
        position: absolute;
        left: 0;
        right: 0;
        box-sizing: border-box;
        text-align: center;
        color: #fff;
        border: 1px solid #fff;
        font-family: inherit;
        font-size: 8px;
        line-height: 1;
        letter-spacing: 0.05em;
        padding: 3px 2px;
        white-space: nowrap;
        pointer-events: none;
    }

    /* Top tab – THE ORIGINAL */
    .finishiq-nav-button::before {
        content: "THE ORIGINAL";
        top: -10px;
        background: #e31e24;
        font-weight: 700;
        border-radius: 0;
        border-top-left-radius: inherit;
        border-top-right-radius: inherit;
        z-index: 3;
    }

    /* Bottom tab – COLOUR MATCHING */
    .finishiq-nav-button::after {
        content: "COLOUR MATCHING";
        bottom: -10px;
        background: #5a5a5a;
        font-weight: 600;
        border-radius: 0;
        border-bottom-left-radius: inherit;
        border-bottom-right-radius: inherit;
        z-index: 2;
    }

/* Make sure nav wrappers don't clip the tabs */
.navbar-item {
    overflow: visible;
}

/* Smaller screens */
@media (max-width: 989px) {
    .finishiq-nav-button::before,
    .finishiq-nav-button::after {
        font-size: 7px;
        padding: 2px 1px;
    }

    .finishiq-nav-button::before {
        top: -8px;
    }

    .finishiq-nav-button::after {
        bottom: -8px;
    }
}

@media (min-width: 821px) {
    .public-ray-page {
        height: calc(100vh - 72px);
        height: calc(100dvh - 72px);
        min-height: 620px;
    }
}

@media (max-width: 980px) {
    .public-ray-page {
        height: calc(100dvh - 64px) !important;
        min-height: 580px;
    }
}

@media (max-width: 560px) {
    .public-ray-page {
        height: calc(100dvh - 64px) !important;
        min-height: 0;
    }
}
