/* Physics module stylesheet (plan 08: per-module CSS).
 * Holds the calculator-specific rules extracted from inline <style> blocks in
 * the Physics module views. Loaded only on the pages that need it via the
 * layout's @stack('module-css') + each view's @push('module-css').
 *
 * Left INLINE on purpose (not merged here) -- do not "fix" by re-extracting:
 *  - Any rule with Blade/PHP interpolation in a CSS value (e.g.
 *    dimensional-analysis-calculator's `content: "{{ $lang[4] ... }}"`).
 *  - Generic element/type or attribute selectors that would leak site-wide
 *    once loaded on every Physics page: `img`, `canvas`, `footer`, `label`,
 *    `textarea`, `[type="checkbox"]`.
 *  - `.calculator-box` rules (density/velocity/acceleration/wet-bulb): this
 *    class is the page-global calculator wrapper used well beyond Physics --
 *    same call as Construction's square-meter-calculator number-spinner rule.
 *  - `#onetw` (enthalpy/scale vs. velocity-calculator) and `.katex` /
 *    `.katex-display` / `.katex .katex-html` (cross-product / dot-product /
 *    velocity / instantaneous-rate-of-change): same selector, different rule
 *    bodies across files -- collision if merged.
 *  - `.result-card` / `.step` (dimensional-analysis / dot-product /
 *    projectile-motion): same selector, three different bodies -- collision.
 *  - `.gap-2` (velocity vs. acceleration) and `.input-unit` (dot-product vs.
 *    velocity's `.addedRows .input-unit`): same class, different bodies.
 *  - `.active` (watts-to-amps/density/velocity/acceleration/amps-to-watts):
 *    identical body everywhere it appears, but the class name is a common
 *    Bootstrap/nav state class used well outside these tab widgets -- too
 *    generic to safely load site-wide across all 23 pages.
 *  - resistance-calculator's resistor-color-band rules (`.black`, `.red`,
 *    `.blue`, `.white`, `.gold`, ... ): single-word generic "utility color"
 *    class names, too risky to hoist into a shared file.
 *  - instantaneous-rate-of-change-calculator's `#exampleLoadBtn` rule: only
 *    rendered inside an `@isset($detail) ... @endisset` block, i.e. it's
 *    conditional on runtime data, not a static always-on rule.
 *  - dimensional-analysis-calculator's 5 style blocks as a whole: large,
 *    apparently-shared "AI helper" widget boilerplate (modal/dropdown/toast
 *    style classes) with confirmed selector collisions against other Physics
 *    files (see `.result-card` / `.step` above) -- left fully inline rather
 *    than risk a mis-split.
 */

/* Shared tab widget (.velocitytab / .veloTabs / .v_active) -- identical
 * wherever it appears across: watts-to-amps, scale, density,
 * average-velocity, velocity, wave-period, acceleration, amps-to-watts. */
.velocitytab .v_active {
    border-bottom: 3px solid var(--light-blue);
}
.velocitytab .v_active strong {
    color: var(--light-blue);
}
.velocitytab p {
    position: relative;
    top: 2px;
}
.veloTabs:hover {
    background-color: gainsboro;
}

/* scale-calculator + average-velocity-calculator -- identical */
@media (min-width: 992px) {
    .font-lg-14 {
        font-size: 14px;
    }
}

/* enthalpy-calculator */
.units {
    max-height: 250px;
    overflow: auto;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    padding-left: 10px;
    max-width: 78%;
}

/* amp-hour-calculator (the generic [type="checkbox"] selector from the same
 * rule stays inline in the view -- see note above) */
.radio-btns input,
.radio-btns label {
    cursor: pointer;
}

/* electric-field-calculator -- remove-row button */
.remove-row {
    cursor: pointer;
    color: #d90000;
    position: absolute;
    right: -50px;
    bottom: 25px;
}
@media screen and (max-width: 992px) {
    .remove-row {
        right: 0;
        bottom: 62px;
    }
}

/* beam-deflection-calculator -- inline-editable selects */
#second_select, #first_select {
    background: transparent;
    border: none;
    color: #1670a7;
    outline: none;
}

/* wet-bulb-calculator -- inline-editable result value */
.onetw {
    background: transparent;
    border: none;
    color: #1670a7;
    outline: none;
}

/* heat-index-calculator -- heat index color-coded table */
.rc {
    background-color: #fd0100;
}
.result .tablesx tr td {
    border: 1px solid #ddd;
    padding: 5px;
}
.nela {
    background-color: #e0e9f9;
}
.kc {
    background-color: #fadf52;
}
.oc {
    background-color: #eb8d0f;
}
.kkc {
    background-color: #fdfc86;
}

/* instantaneous-rate-of-change-calculator */
.icon_animation {
    display: inline-block;
    position: relative;
    width: 100%;
    height: 80px;
}
.icon_animation samp {
    display: inline-block;
    position: absolute;
    left: 0;
    background: #EEF1F5;
    animation: icon_animation 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;
    height: 8px;
}
.main_area .icon_sty:hover .icon_animation samp {
    background: #fff;
}
.icon_animation samp:nth-child(1) {
    top: 10px;
    animation-delay: -0.24s;
}
.icon_animation samp:nth-child(2) {
    top: 28px;
    left: 0;
    animation-delay: -0.12s;
}
.icon_animation samp:nth-child(3) {
    top: 47px;
    animation-delay: 0s;
}
.icon_animation samp:nth-child(4) {
    top: 66px;
    animation-delay: 0.12s;
}
.icon_animation samp:nth-child(5) {
    top: 85px;
    animation-delay: 0.24s;
}
@keyframes icon_animation {
    0% {
        left: 0;
        width: 0;
    }
    50%, 100% {
        left: 0;
        width: 100%;
    }
}
#responseContainer {
    line-height: 2
}
#responseContainer ol, #responseContainer ul {
    padding-left: 20px
}
.mere_li p, .mere_li li:not(:has(p)) {
    font-size: 17px;
    letter-spacing: .5px;
    line-height: 1.5;
    color: #000000;
}
.mere_li p:not(:first-child), .mere_li ol p, .mere_li ul p, .mere_li li:not(:has(p)) {
    margin-top: 12px;
}
#responseContainer h3, #responseContainer h2 {
    font-size: 18px;
    font-weight: 600 !important;
    margin-top: 12px;
    letter-spacing: .5px;
    line-height: 1.5;
    color: #1670a7;
}
.own_katex {
    display: inline-block;
    padding: 2px;
    border-radius: 8px;
    border: 1px solid transparent;
    width: fit-content;
    position: relative;
}
.own_katex:hover {
    border: 1px solid #1670a7;
    cursor: pointer;
}
.own_katex:hover::after {
    background: #add8e6;
    border-radius: 4px;
    bottom: 130%;
    content: "Click to Copy";
    display: block;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px;
    position: absolute;
    width: 100px;
    z-index: 1;
    font-size: 14px;
    text-align: center;
}

/* instantaneous-velocity-calculator (the generic `textarea` rule from the
 * same style block stays inline in the view -- see note above) */
@media (max-width: 450px) {
    #loading {
        top: 50% !important;
        left: 40% !important;
    }
    .loader-text {
        top: 43% !important;
        left: 28% !important;
    }
}
#loading {
    position: absolute;
    top: 50%;
    left: 46%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: 70px;
    height: 70px;
    border: 10px solid #b1cff1;
    border-radius: 50%;
    border-top: 10px solid #036bd3;
    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
}
@-webkit-keyframes spin {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.animate-bottom {
    position: relative;
    -webkit-animation-name: animatebottom;
    -webkit-animation-duration: 1s;
    animation-name: animatebottom;
    animation-duration: 1s
}
@-webkit-keyframes animatebottom {
    from { bottom:-100px; opacity:0 }
    to { bottom:0px; opacity:1 }
}
@keyframes animatebottom {
    from{ bottom:-100px; opacity:0 }
    to{ bottom:0; opacity:1 }
}
#myTable {
    visibility: hidden;
}
.loader-text {
    margin-top: 10px;
    font-size: 16px;
    color: #333;
    position: absolute;
    top: 43%;
    left: 39%;
}

/* dot-product-calculator (.input-unit and .katex from the same style blocks
 * stay inline in the view -- see collision notes above) */
.gap-3 {
    gap: 3px;
}
.output-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.07);
    padding: 25px;
    max-width: 750px;
    margin: 20px auto;
    border: 1px solid #e3eef5;
    animation: fadeIn 0.6s ease-in-out;
}
@keyframes fadeIn {
    from {opacity: 0; transform: translateY(15px);}
    to {opacity: 1; transform: translateY(0);}
}
.output-header {
    text-align: center;
    color: #1670a7;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 15px;
    margin-bottom: 9px;
}
.result-title {
    font-weight: 600;
    color: #1670a7;
    margin-bottom: 9px;
    font-size: 15px;
}
.result-value {
    font-size: 18px;
    color: #111;
    font-weight: 600;
}
.highlight {
    color: #1670a7;
}
.step-section {
    margin-top: 25px;
    background: #f9fcff;
    border: 1px solid #dbeaf5;
    border-radius: 10px;
    padding: 20px;
}
.step-section h3 {
    color: #1670a7;
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 700;
}
.interpretation {
    margin-top: 25px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    background: #e8f9f2;
    color: #00916d;
    border-radius: 8px;
    padding: 12px 0;
    border: 1px solid #c8f0df;
}
@media (max-width: 768px) {
    .output-container {
        padding: 15px;
        margin: 15px auto;
    }
    .result-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .step-section {
        padding: 15px;
    }
    .output-header {
        font-size: 20px;
    }
    .result-value {
        font-size: 16px;
    }
}
@media (max-width: 480px) {
    .output-container {
        padding: 12px;
        margin: 10px auto;
    }
    .step-section {
        padding: 12px;
    }
    .interpretation {
        font-size: 14px;
        padding: 10px 0;
    }
}

/* projectile-motion-calculator (.result-card family, `canvas` and `footer`
 * from the same style block stay inline in the view -- see notes above) */
.results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.plot-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stepbox {
    margin-top: 12px;
    padding: 12px;
    background: #fbfeff;
    border-radius: 10px;
    border: 1px dashed #dcecf9;
    font-size: 13px;
    color: #123;
    overflow: auto;
}
.stepbox ol {
    list-style-position: inside;
    margin-left: 1rem;
    margin-top: 1rem;
    font-size: 16px;
}
.stepbox ol li {
    padding: 5px 0;
}

/* acceleration-calculator -- inline-editable unit select */
#acel_unit {
    background: transparent;
    border: none;
    color: #1670a7;
    outline: none;
    width: 65px;
}
