﻿/* Inelastic Buckling Calculator
   Inherits 100% of GFRP styling — only overrides the background image */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700;800;900&display=swap');

:root {
    --teal: #11b7b7;
    --teal-dark: #0d9a9a;
    --teal-glow: rgba(17, 183, 183, 0.22);
    --teal-light: rgba(17, 183, 183, 0.08);
    --dark: #111;
    --panel-bg: rgba(255,255,255,0.85);
}

/* ── PAGE ── */
.gfrp-page {
    font-family: "Source Sans 3", Arial, sans-serif !important;
    max-width: 1000px;
    margin: 20px auto 60px auto;
    padding: 40px 20px;
    background-image: none; /* ← ADD THIS — removes the GFRP background */

    position: relative;
}

    .gfrp-page input,
    .gfrp-page select,
    .gfrp-page textarea {
        font-family: "Source Sans 3", Arial, sans-serif !important;
    }

.gfrp-outer {
    max-width: 1000px;
    margin: 20px auto 60px auto;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    isolation: isolate;
}

/* ── BACKGROUND ── */
.gfrp-outer {
    max-width: 1000px;
    margin: 20px auto 60px auto;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    /*background-image: url('/images/elastic-buck-bg.png');*/
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.gfrp-bg {
    display: none;
}


wwwroot/images/Inelastic_Buckling_background.png
/* ── All panels, buttons and header must sit ABOVE the background ── */
.gfrp-header,
.gfrp-panel,
.gfrp-actions {
    position: relative;
    z-index: 1;
}

/* ── MESSAGES ── */
.gfrp-msg {
    font-size: 0.85rem;
    line-height: 1.2;
    min-height: 2.4em;
    margin-top: 8px;
    text-align: center;
}

.gfrp-inputrow .gfrp-msg {
    grid-column: 1 / -1;
    justify-self: center;
}

.gfrp-msg.is-green {
    color: #2e7d32;
}

.gfrp-msg.is-yellow {
    color: #a06b00;
}

.gfrp-msg.is-red {
    color: #b00020;
}

/* ── HEADER ── */
.gfrp-header {
    padding: 20px 0;
    text-align: center;
}

.gfrp-title {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-shadow: 0 1px 6px rgba(0,0,0,0.9), 0 2px 14px rgba(0,0,0,0.7);
}

.gfrp-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 4px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 2px 14px rgba(0,0,0,0.7);
    letter-spacing: 0.3px;
}

/* ── PANELS ── */
.gfrp-panel {
    margin: 20px 0;
    padding: 24px;
    border-radius: 16px;
    background: var(--panel-bg);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    backdrop-filter: blur(5px);
    transition: box-shadow 0.3s ease;
}

.gfrp-panel-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── PROJECT INFO ── */
.gfrp-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.gfrp-row-2 {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 15px;
    align-items: center;
}

.gfrp-label {
    font-weight: 700;
    color: #444;
}

/* ── INPUTS ── */
.gfrp-input,
.gfrp-select {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 2px solid rgba(0,0,0,0.1);
    padding: 0 14px;
    font-size: 15px;
    font-weight: 600;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

    .gfrp-input:focus,
    .gfrp-select:focus {
        border-color: var(--teal);
        outline: none;
        box-shadow: 0 0 0 4px var(--teal-glow);
    }

/* ── UNIT SELECTION / RADIO ── */
.gfrp-unitline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding: 8px 0;
}

.gfrp-unitlabel {
    font-weight: 800;
    color: #333;
}

.gfrp-radio {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    font-weight: 700;
    cursor: pointer;
}

    .gfrp-radio input[type="radio"] {
        accent-color: var(--teal);
        width: 15px;
        height: 15px;
        cursor: pointer;
    }

/* ── INPUT TABLE ── */
.gfrp-inputtable {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.gfrp-inputrow {
    display: grid;
    grid-template-columns: 40px 1.5fr 2fr 80px 100px;
    gap: 15px;
    align-items: center;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(0,0,0,0.04);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

    .gfrp-inputrow.is-focused {
        background: rgba(17, 183, 183, 0.07);
        box-shadow: 0 0 0 2px rgba(17, 183, 183, 0.2);
    }

.gfrp-num {
    font-weight: 900;
    color: #999;
    font-size: 18px;
}

.gfrp-unit {
    font-weight: 800;
    color: #666;
}
/* Reserve space for chart panel so background doesn't jump */
#BucklingChart {
    min-height: 320px;
    display: block;
}

/* ── TRAFFIC LIGHTS ── */
.gfrp-lights {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.gfrp-light {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    background: #e0e0e0;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

    .gfrp-light.is-off {
        background: #e0e0e0;
    }

    .gfrp-light.is-green {
        background: #18c964;
        box-shadow: 0 0 8px rgba(24,201,100,0.4);
    }

    .gfrp-light.is-yellow {
        background: #f5c542;
        box-shadow: 0 0 8px rgba(245,197,66,0.4);
    }

    .gfrp-light.is-red {
        background: #ff3b30;
        box-shadow: 0 0 8px rgba(255,59,48,0.4);
    }

/* ── BUTTONS ── */
.gfrp-actions {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.gfrp-btn {
    width: fit-content;
    padding: 12px 24px;
    border-radius: 50px;
    border: 3px solid var(--teal);
    background: #000;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Source Sans 3", Arial, sans-serif;
}

    .gfrp-btn:hover {
        background: var(--teal);
        transform: translateY(-3px);
        box-shadow: 0 10px 20px var(--teal-glow);
    }

    .gfrp-btn:active {
        transform: translateY(-1px);
    }

/* ── RESULTS ── */
.gfrp-results {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.gfrp-resultcard {
    flex: 1;
    min-width: 220px;
    max-width: 320px;
    border-radius: 16px;
    padding: 20px;
    background: rgba(17, 183, 183, 0.08);
    border: 1px solid rgba(17, 183, 183, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 130px;
}

    .gfrp-results.single-result {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }

.gfrp-resultcard {
    border-radius: 16px;
    padding: 20px;
    background: rgba(17, 183, 183, 0.08);
    border: 1px solid rgba(17, 183, 183, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 130px;
}

    .gfrp-resultcard.is-final {
        background: rgba(17, 183, 183, 0.18);
        border: 2px solid var(--teal);
        box-shadow: 0 4px 16px var(--teal-glow);
    }

.gfrp-resultvalue {
    font-size: 42px;
    font-weight: 900;
    color: var(--teal);
    margin: 5px 0;
}

.gfrp-resulttitle {
    font-weight: 700;
    color: #555;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.gfrp-resultunit {
    font-weight: 600;
    color: #888;
    font-size: 13px;
}

.gfrp-code-note {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 16px;
    font-style: italic;
}

/* ── CURVES IMAGE ── */
.ib-curves-img {
    text-align: center;
    padding: 8px 0;
}

    .ib-curves-img img {
        max-width: 100%;
        border-radius: 10px;
    }

/* ── RESPONSIVE ── */
@media (max-width: 850px) {
    .gfrp-inputrow {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .gfrp-num {
        display: none;
    }

    .gfrp-lights {
        justify-content: center;
    }

    .gfrp-results {
        grid-template-columns: 1fr;
    }

    .gfrp-row-2 {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 900px) {
    /* ── RESULTS PANEL (CENTERED) ── */
    .gfrp-results {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 15px !important;
    }

    .gfrp-resultcard {
        width: 100% !important;
        max-width: 320px !important;
        min-height: 100px !important;
        margin: 0 auto !important;
        padding: 14px 10px !important;
    }

    .gfrp-resultvalue {
        font-size: 28px !important;
    }

    .gfrp-resulttitle {
        font-size: 11px !important;
        min-height: unset !important;
    }

    .gfrp-resultunit {
        font-size: 11px !important;
    }

    /* ── SUPER BULLETPROOF 3-COLUMN GRID FIX ── */
    .gfrp-inputrow {
        display: grid !important;
        grid-template-columns: 24px 1fr auto !important;
        grid-template-rows: auto auto auto !important;
        /* The Magic Map: Assigns physical zones to elements */
        grid-template-areas:
            "num   label  lights"
            ".     in     unit"
            "msg   msg    msg" !important;
        gap: 8px 10px !important;
        padding: 14px 12px !important;
        min-height: unset !important;
        height: auto !important;
        text-align: left !important;
        align-items: center !important;
    }

        /* 1. Default ALL unrecognized direct children (like sneaky input wrappers) into the middle "in" slot */
        .gfrp-inputrow > * {
            grid-area: in !important;
            width: 100% !important;
            margin: 0 !important;
        }

        /* 2. Explicitly map the known classes to their proper grid zones */
        .gfrp-inputrow > .gfrp-num {
            grid-area: num !important;
            display: block !important;
            font-size: 13px !important;
            align-self: start !important;
            margin-top: 2px !important;
        }

        .gfrp-inputrow > .gfrp-label {
            grid-area: label !important;
            font-size: 13px !important;
            font-weight: 700 !important;
            line-height: 1.3 !important;
            color: #222 !important;
            align-self: start !important;
        }

        .gfrp-inputrow > .gfrp-lights {
            grid-area: lights !important;
            justify-self: end !important;
            align-self: start !important;
        }

        .gfrp-inputrow > .gfrp-unit {
            grid-area: unit !important;
            font-size: 12px !important;
            justify-self: start !important;
        }

        .gfrp-inputrow > .gfrp-msg {
            grid-area: msg !important;
            font-size: 11px !important;
            margin-top: 4px !important;
        }

        /* 3. Force the actual inputs to stretch perfectly inside that wrapper zone */
        .gfrp-inputrow input,
        .gfrp-inputrow select {
            width: 100% !important;
            height: 40px !important;
            font-size: 14px !important;
            padding: 0 10px !important;
            border-radius: 8px !important;
            border: 1.5px solid rgba(0,0,0,0.1) !important;
            box-sizing: border-box !important;
            background: #fff !important;
        }

    @media (max-width: 600px) {
        .ib-interp-grid {
            grid-template-columns: 1fr !important;
        }

        .ib-theory-grid {
            grid-template-columns: 1fr !important;
        }

        .ib-theory-2col {
            grid-template-columns: 1fr !important;
        }
    }
}