@import '../_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';

:root,
body {
    --design-unit: 6 !important;
}

:root {
    --header-height: 56px;
    --footer-height: 3.5rem;
}

:root {
    --agri-space-2xs: 0.25rem;
    --agri-space-xs: 0.375rem;
    --agri-space-sm: 0.5rem;
    --agri-space-md: 0.625rem;
    --agri-space-lg: 0.75rem;
    --agri-space-xl: 1rem;
    --agri-space-2xl: 1.25rem;
    --agri-space-3xl: 1.5rem;
    --agri-space-4xl: 2rem;
    --agri-space-5xl: 2.5rem;
    --agri-icon-size-prominent: 2rem;
    --agri-icon-size-standard: 1.5rem;
    --agri-radius-sm: 0.25rem;
    --agri-radius-md: 0.375rem;
    --agri-radius-lg: 0.5rem;
    --agri-radius-xl: 0.75rem;
    --agri-radius-pill: 62.5rem;
    --agri-card-padding: calc(var(--design-unit) * 0.3125rem);
    --agri-focus-outline: 0.125rem solid var(--accent-fill-rest);
    --agri-font-sm: 0.9375rem;
    --agri-header-action-hover: rgba(255, 255, 255, 0.14);
    --agri-header-action-pressed: rgba(255, 255, 255, 0.22);
    --agri-overlay-scrim: rgba(0, 0, 0, 0.4);
    --agri-hero-scrim: linear-gradient(90deg, rgba(5, 15, 8, 0.8) 20%, rgba(5, 15, 8, 0.65) 40%, rgba(5, 15, 8, 0.4) 60%, rgba(5, 15, 8, 0.2) 100%);
    --agri-hero-scrim-mobile: linear-gradient(90deg, rgba(5, 15, 8, 0.85) 0%, rgba(5, 15, 8, 0.7) 60%, rgba(5, 15, 8, 0.45) 100%);
    --agri-instructions-scrim: linear-gradient(90deg, rgba(5, 15, 8, 0.5) 20%, rgba(5, 15, 8, 0.38) 40%, rgba(5, 15, 8, 0.2) 60%, rgba(5, 15, 8, 0.06) 100%);
    --agri-z-overlay: 998;
    --agri-z-sidebar: 999;
    --agri-z-modal: 1000;
}

.header-actions .header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 3rem;
    min-height: 3rem;
    padding: 0;
    border: 0;
    border-radius: var(--agri-radius-sm);
    background-color: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    line-height: 1;
    transition: background-color 0.15s ease;
}

@media (hover: hover) {
    .header-actions .header-action:hover {
        background-color: var(--agri-header-action-hover);
    }
}

.header-actions .header-action:active {
    background-color: var(--agri-header-action-pressed);
}

.header-actions .header-action:focus-visible {
    outline: 0.125rem solid currentColor;
    outline-offset: 0.125rem;
}

@media (prefers-reduced-motion: reduce) {
    .header-actions .header-action {
        transition: none;
    }
}

body,
.main {
    overflow: visible !important;
}

html,
body {
    max-width: 100%;
    overflow-x: clip !important;
}

body {
    --body-font: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-family: var(--body-font);
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    margin: 0;
}

.navmenu-icon {
    display: none;
}

.main {
    min-height: calc(100dvh - var(--header-height) - var(--footer-height));
    color: var(--neutral-foreground-rest);
    align-items: stretch !important;
    background-color: var(--neutral-layer-2);
    margin: 0 !important;
    padding: 0 !important;
}

.body-content {
    align-self: stretch;
    min-height: calc(100dvh - var(--header-height) - var(--footer-height));
    display: flex;
    overflow-y: auto;
    overflow-x: hidden;
}

.content {
    padding: 1rem 0.75rem;
    min-height: 100%;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.content fluent-grid-item {
    min-width: 0;
    max-width: 100%;
}

img,
svg {
    max-width: 100%;
}

@media (min-width: 37.5rem) {
    .content {
        padding: 2rem 3rem;
        max-width: 90rem;
        margin-inline: auto;
    }
}

footer, .app-footer {
    min-height: var(--footer-height);
    background: var(--neutral-layer-4);
    color: var(--neutral-foreground-rest);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    flex-shrink: 0;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.app-footer-inner,
.app-footer-links {
    min-width: 0;
    max-width: 100%;
}

footer a, .app-footer a {
    color: var(--neutral-foreground-rest);
    text-decoration: none;
    font-size: 0.875rem;
    white-space: nowrap;
}

footer a:focus, .app-footer a:focus {
    outline: 0.0625rem dashed;
    outline-offset: 0.1875rem;
}

footer a:hover, .app-footer a:hover {
    text-decoration: underline;
}

.cookie-preferences-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--neutral-foreground-rest);
    font-size: 0.875rem;
    white-space: nowrap;
    text-align: left;
}

.cookie-preferences-link:hover {
    text-decoration: underline;
}

.cookie-preferences-link:focus-visible {
    outline: 0.0625rem dashed;
    outline-offset: 0.1875rem;
}

.footer-brand {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.footer-copyright {
    font-size: 0.875rem;
    opacity: 0.8;
    white-space: nowrap;
}

@media (max-width: 50rem) {
    .footer-copyright {
        display: none;
    }
}

.alert {
    border: 0.0625rem dashed var(--accent-fill-rest);
    padding: 0.3125rem;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -0.0625rem 0.125rem rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    margin: 1.25rem 0;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyY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jI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::before {
    content: "An error has occurred. "
}

.loading-screen{
    position:fixed;
    inset:0;
    display:flex;
    justify-content:center;
    align-items:center;

    background: #107C10;
    font-family: var(--body-font);
    overflow:hidden;
    z-index:99999;
}

.loading-screen-content {
    text-align: center;
    color: white;
    animation: fadeInUp .8s ease-out both;
}

.loading-title {
    margin-top: 2.75rem;
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: 0.03125rem;
    text-shadow: 0 0.125rem 0.75rem rgba(0,0,0,.15);
}

.loading-subtitle {
    margin-top: 0.375rem;
    opacity: .85;
    font-size: .95rem;
    letter-spacing: 0.0625rem;
}

.loading-dots {
    display: inline-block;
    min-width: 1.5em;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1.125rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
code {
    color: #c02d76;
}

.calc-warning {
    margin-top: 1rem;
}

.calc-warning fluent-label {
    font-family: var(--body-font);
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: contents;
}

@media (max-width: 37.499rem) {

    .mobile-only {
        display: contents;
    }

    .desktop-only {
        display: none;
    }

    .calc-layout {
        flex-direction: column;
    }

    .col-sx,
    .col-dx {
        width: 100%;
        flex: auto;
    }

    .header-gutters {
        margin: 0.5rem 1.5rem 0.5rem 1.5rem !important;
    }

    [dir="rtl"] .header-gutters {
        margin: 0.5rem 1.5rem 0.5rem 3rem !important;
    }

    .main {
        position: relative;
        flex-direction: column !important;
        row-gap: 0 !important;

        min-height: calc(100dvh - var(--header-height) - 4.875rem);
    }

    .body-content {
        min-height: calc(100dvh - var(--header-height) - 4.875rem);
    }

    nav.sitenav {
        width: 100%;
        height: 100%;
    }

    #main-menu {
        width: 100% !important;
    }

    .navmenu {
        width: 100%;
    }

    #navmenu-toggle {
        appearance: none;
    }

    #navmenu-toggle~nav {
        display: none;
    }

    #navmenu-toggle:checked~nav {
        display: block;
    }

    .navmenu-icon {
        cursor: pointer;
        z-index: 10;
        display: block;
        position: absolute;
        top: 0.9375rem;
        left: unset;
        right: 1.25rem;
        width: 1.25rem;
        height: 1.25rem;
        border: none;
    }

    [dir="rtl"] .navmenu-icon {
        left: 1.25rem;
        right: unset;
    }

    footer,
    .app-footer {
        height: auto;
        padding: 0.75rem 1rem;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .app-footer-inner {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        row-gap: 0.5rem;
    }

    .app-footer-inner > * {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }

    .footer-brand,
    .footer-copyright,
    footer a,
    .app-footer a,
    .cookie-preferences-link {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    fluent-breadcrumb {
        display: none !important;
    }

    h1.fluent-typography,
    h1[typo="h1"],
    .fluent-typography[typo="h1"] {
        font-size: 1.375rem !important;
        line-height: 1.75rem !important;
        margin-block: 0.25rem !important;
        text-wrap: balance;
    }

    .page-header-subtitle.fluent-typography,
    .page-header-subtitle,
    .home-hero-subtitle.fluent-typography,
    .home-hero-subtitle {
        font-size: var(--agri-font-sm) !important;
        line-height: 1.375rem !important;
        margin-block: 0 !important;
        text-wrap: pretty;
    }

    .page-header-icon,
    .page-header-icon svg,
    .page-404-icon,
    .page-404-icon svg {
        width: 2rem !important;
        height: 2rem !important;
        min-width: 2rem !important;
    }

    .icon-content-uc,
    .icon-content-uc svg {
        max-width: 2rem !important;
        max-height: 2rem !important;
    }

}

.loading-bar-container {
    width: 15rem;
    height: 0.375rem;
    background: rgba(255,255,255,.25);
    border-radius: 0.1875rem;
    margin: 1.75rem auto 0;
    overflow: hidden;
}

.loading-bar {
    width: 40%;
    height: 100%;
    background: rgba(255,255,255,.9);
    border-radius: 0.1875rem;
    animation: loading-bar-slide 1.2s ease-in-out infinite;
}

@keyframes loading-bar-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

@media (min-width: 37.5rem) {
    footer,
    .app-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
    }

    .main {
        min-height: calc(100dvh - var(--header-height));
    }

    .body-content {
        height: calc(100dvh - var(--header-height)) !important;
        padding-bottom: var(--footer-height);
    }
}

.splash-logo {
    width: 6.5rem;
    height: auto;
    display: block;
    margin: 0 auto;
    overflow: visible;
    filter: drop-shadow(0 0.125rem 0.75rem rgba(0, 0, 0, 0.15));
}

.logo-leaf {
    transform-box: fill-box;
    transform-origin: 80% 90%;
    animation: logo-sway 3.6s ease-in-out infinite alternate;
    will-change: transform;
}

.logo-leaf-b {
    animation-duration: 4.4s;
    animation-delay: -0.9s;
}

@keyframes logo-sway {
    from {
        transform: rotate(-2.2deg) translateX(0);
    }
    to {
        transform: rotate(2.4deg) translateX(0.0375rem);
    }
}

.logo-cursor {
    animation: logo-blink 1s steps(2, jump-none) infinite;
}

@keyframes logo-blink {
    50% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .logo-leaf,
    .logo-cursor {
        animation: none;
    }
}

.loading-dots::after {
    content: "";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0% { content: ""; }
    25% { content: "."; }
    50% { content: ".."; }
    75% { content: "..."; }
}

#farmingcalculator-consent-banner {
    --consent-bg: #e0e0e0;
    --consent-fg: #1a1a1a;
    --consent-border: #efefef;
    --consent-cat-bg: #f3f3f3;
    --consent-accent: #20781b;
    --consent-stealth: #fbfbfb;
    --consent-shadow: 0 0.625rem 1.5625rem rgba(0, 0, 0, .3);

    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
    max-width: 35rem;
    margin: 0 auto;
    padding: 1.25rem;
    z-index: 999999;
    color: var(--consent-fg);
    background: var(--consent-bg);
    border: 0.0625rem solid var(--consent-border);
    border-radius: var(--agri-radius-xl);
    box-shadow: var(--consent-shadow);
    font: var(--agri-font-sm)/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#farmingcalculator-consent-banner h2 { margin: 0 0 0.5rem; font-size: 1.125rem; }
#farmingcalculator-consent-banner p { margin: 0 0 0.875rem; opacity: .85; }
#farmingcalculator-consent-banner .farmingcalculator-consent-category {
    margin: 0 0 1rem;
    padding: 0.625rem 0.75rem;
    background: var(--consent-cat-bg);
    border-radius: var(--agri-radius-lg);
}
#farmingcalculator-consent-banner .farmingcalculator-consent-actions { display: flex; gap: 0.625rem; flex-wrap: wrap; }
#farmingcalculator-consent-banner button {
    padding: 0.5625rem 0.9375rem;
    border: 0;
    border-radius: var(--agri-radius-md);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}
#farmingcalculator-consent-banner .farmingcalculator-accept { background: var(--consent-accent); color: #fff; }
#farmingcalculator-consent-banner .farmingcalculator-reject { background: var(--consent-stealth); color: inherit; }
#farmingcalculator-consent-banner button:focus-visible { outline: 0.1875rem solid var(--consent-accent); outline-offset: 0.125rem; }

body {
    --type-ramp-base-font-size: 1rem;
    --type-ramp-base-line-height: 1.5rem;
    --type-ramp-minus-1-font-size: 0.8125rem;
    --type-ramp-minus-1-line-height: 1.125rem;
    --type-ramp-plus-1-font-size: 1.25rem;
    --type-ramp-plus-1-line-height: 1.75rem;
}

.agri-dark header.header,
.agri-dark footer,
.agri-dark .app-footer,
.agri-dark .custom-card-header {
    background-color: var(--neutral-layer-2, #262626);
    background-color: color-mix(in srgb, var(--neutral-layer-2) 70%, var(--neutral-layer-3) 30%);
}

.agri-dark header.header,
.agri-dark .custom-card-header {
    color: var(--neutral-foreground-rest);
}

.agri-dark div.calc-warning.fluent-messagebar.intent-info {
    background-color: #141414;
    border-color: #666;
}

.agri-dark div.calc-warning.fluent-messagebar.intent-warning {
    background-color: #411200;
    border-color: #DA3B01;
}

.agri-dark div.calc-warning.fluent-messagebar.intent-error {
    background-color: #3F1011;
    border-color: #D13438;
}

.agri-dark div.calc-warning.fluent-messagebar.intent-success {
    background-color: #052505;
    border-color: #107C10;
}
