/* Panels that show another page in an iframe (Calculator, Livestock, Farm Results, Farm Tools, Field Data, Admin).
   Part of dashboard.html; loaded in number order (01 first). See server/public/dashboard/README.md. */
/* Iframe-embedded modules (calculator, livestock, field data) fill
   .dash-main's full height edge-to-edge, cancelling out its normal
   content padding just for these panels -- see the comment on
   .dashboard__body above for why this is height:100% of an
   already-exact parent box, not a viewport-relative calculation. */
.dash-panel--iframe {
    margin: -2rem calc(-1 * clamp(20px, 3vw, 2.5rem)) -3rem;
    height: calc(100% + 2rem + 3rem);
}
.dash-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
@media (max-width: 860px) {
    .dash-panel--iframe {
        margin: -1.25rem -20px -2rem;
        height: calc(100% + 1.25rem + 2rem);
    }
}
@media (max-width: 860px) {
    .dash-shell {
        flex-direction: column;
    }
    .dash-main {
        order: 2;
        flex: 1 1 auto;
        height: auto;
        padding: 1.25rem 20px 2rem;
    }
    /* Phones: the rail is a list that opens from the menu button (it shows where you are) and
       closes again when you pick something. */
    .dash-rail-menu {
        order: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        min-height: 48px;
        margin: 0;
        padding: 0 20px;
        border: 0;
        border-bottom: 1px solid var(--border);
        background: var(--surface);
        color: var(--text);
        font: inherit;
        font-weight: 600;
        text-align: left;
        cursor: pointer;
    }
    .dash-rail {
        order: 1;
        width: 100%;
        height: auto;
        max-height: 70vh;
        flex: 0 0 auto;
        display: none;
        padding: 0.5rem 12px 0.75rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .dash-rail.open {
        display: flex;
    }
}
