/* https://fonts.google.com/share?selection.family=Crimson+Text:ital,wght@0,400;0,700;1,400;1,700|Lato:ital@0;1 */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,700;1,400;1,700&family=Lato:ital@0;1&display=swap');

:root {
    --branding-primary: #007197;
    --branding-primary-light: #579309;
    --branding-primary-light-hover: hsl(86, 88%, 38%);
    --branding-primary-light-accessible: #4b7b0b;
    --branding-primary-light-accessible-hover: hsl(86, 84%, 34%);
    --branding-primary-medium: #2C4712;
    --branding-primary-dark: #1F330C;

    --branding-secondary-medium:  #E77611;
    --branding-secondary-dark:  #B6412E;

    --branding-accent-primary: #773264;
    --branding-accent-secondary: #69412F;
    accent-color: var(--branding-primary);
    --a-field-input-focus-border-color: var(--branding-primary);
    --ut-focus-outline-color: var(--branding-primary);

    /* --branding-surface: hsl(32, 33%, 90%); */
    --branding-surface: hsl(32, 29%, 90%);
    --branding-surface-light: hsl(32, 32%, 95%);
    --branding-surface-light-hover: hsl(32, 32%, 98%);
    --branding-surface-dark: hsl(32, 32%, 85%);

    --heading-family: 'Crimson Text', serif;
    --a-base-font-family-serif: var(--heading-family);
    --ut-content-block-header-font-family: var(--heading-family);

    --body-family: 'Lato', sans-serif;
    --a-base-font-family: var(--body-family);
    --ut-region-text-color: var(--branding-primary-dark);
    
    --ut-base-font-size: 19px;
    font-size: var(--ut-base-font-size);
    --a-alert-message-font-size: 1rem;
    --a-button-font-size: 0.875rem;

    /* line height should be consistent */
    --ut-base-line-height: 1.4;
    
    /* Inputs need borders need the same border as the rest of the inputs */
    --a-field-input-border-color: #989898;
    --a-checkbox-border-color: var(--a-field-input-border-color);
    --a-field-input-state-border-color: var(--a-field-input-border-color);
    --tm-border-radius: 0;

    scroll-behavior: smooth;
}

.bright-green {
    color: white;
    background-color: var(--branding-primary-light);
    font-size: var(--ut-base-font-size);
    &:hover {
        background-color: var(--branding-primary-light-hover);
    }
}
/* defaults */
td {
    transition: background-color 100ms ease-in;
}

a {
    font-weight: bold;
    &:hover:not(.apex-rds-container a):not(.t-Tabs-link) {
        text-decoration: underline from-font solid;
    }
}

p, span, div {
    font-family: var(--body-family);
    text-wrap: balance;
}

address {
    font-style: normal;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--heading-family);
    font-weight: 400;
    margin-block: 0;
}

h1, .h1 {
    --ut-content-block-header-font-size: 3rem;
}
h2, .h2 {
    --ut-content-block-header-font-size: 2rem;
}
h3, .h3 {
    --ut-content-block-header-font-size: 1.5rem;
}
h4, .h4, h5, .h5, h6, .h6 {
    --ut-content-block-header-font-size: 1rem;
}

body .ui-widget.a-DevTools .a-PropertyEditor-propertyGroup-title {
    --ut-content-block-header-font-size: 1rem;
}

@media (min-width: 640px) and (max-width: 767px) {
    .col-sm-12 {
        --ut-grid-gutter-width: 0;
    }
}

/* Utilities */
/* wrench is to manage page content */
.wrench {
    z-index: 9999;
}
/* try to match tailwind when possible */
.absolute {
    position: absolute;
}
.right-2 {
    right: 0.5rem;
}
.right-8 {
    right: 2rem;
}
.right-16 {
    right: 4rem;
}
.center {
    display: flex;
    justify-content: center;
    align-items: center;
}
.font-bold {
    font-weight: 700;
}
.text-base {
    font-size: 1rem;
}
.cursor-not-allowed {
    cursor: not-allowed;
}
.u-margin-inline-xs {
    margin-inline: 0.25rem;
}
.u-margin-inline-end-xs {
    margin-inline-end: 0.25rem;
}

/* apex specific utilities */

/* popup lov shouldn't be round */
.square, 
 /* help buttons at the end of page items */
.t-Form-helpButton {
    --a-button-border-radius: 2px;
}
.content-block-header-margin-none {
    --ut-content-block-header-margin: 0 !important;
}
.content-block-header-font-weight-normal {
    --ut-content-block-header-font-weight: 400 !important;
}
.region-block-padding-none {
    --ut-region-body-padding-y: 0 !important;
}
.region-border-none {
    --ut-region-border-width: 0 !important;
}
.w100p:has(.apex-item-image) {
    width: 100%;
    .apex-item-image {
        width: 100%;
    }
}
.hidden-label {
    --ut-field-padding-y: 0;
    .t-Form-labelContainer {
        display: none;
    }
    a-file-upload,
    img {
        --ut-field-fl-label-offset: 0;
    }
    .t-Form-itemWrapper {
        justify-content: center;
        --ut-field-fl-label-offset: 0;
    }
}

/* per feedback from josie 4/17/2024 */
.t-Button--hot {
    --a-button-font-weight: 400;
    /* font-weight: bold; */
    /* font-size: 19px; */
}

.t-Button--primary, .accessible-btn {
    /* font-weight: bold; */
    /* font-size: 19px; */
}

.t-Tabs-item {
    font-size: 19px;
}


/* nav bar */
/* floating bar */
.t-Body-nav {
    position: fixed;
    top: var(--js-sticky-top, 0);
    /* bottom: ; */
}
/* set font sizes to scale */
.t-Header-navBar {
    --a-button-font-size: clamp(12px, -1.6rem + 4.2545vw, 0.875rem)
}
/* login buton needs to be white */
.t-NavigationBar-item.loginButton {
    --a-button-icon-spacing: 0;
    a {
        padding-inline: 1rem;
        background-color: white;
        color: var(--branding-primary-medium);
        border: 1px solid var(--branding-primary-medium);
        &:hover {
            text-decoration: none;
            outline: 2px solid var(--branding-primary-medium);
        }
    }
}
/* hide top or left nav at certain screensizes */
@media (max-width: 767px) {
    /* .t-NavigationBar .t-NavigationBar-item:nth-child(7), .t-NavigationBar .t-NavigationBar-item:nth-child(8) {
        display: none;
    } */
    #t_TreeNav_5 .fa-file-o {
        display: none;
    }
    .t-Header .t-Header-branding .t-Header-navBar .t-NavigationBar-item:not(.customSearch) {
        display: none;
    }

    .customSearch {
        .t-Button-label {
            display: none;
        }

        .fa.fa-search {
            -webkit-margin-end: 0;
            margin-inline-end: 0;
        }
    }

    .a-TreeView-node.a-TreeView-node--leaf.a-TreeView-node--topLevel .a-TreeView-content:has(.fa-external-link) {
        display: flex;
        .fa-external-link {
            order: 2;
        }

        .a-TreeView-label[href="https://seedsavers.org/learn/"] {
            padding-left: var(--ut-treeview-icon-container-width);
        }
    }

    .search-overlay__help{
        display: none;
    }
}
@media (min-width: 768px) {
    .t-Header-controls {
        display: none;
    }
    .t-Body-nav {
        display: none;
    }
}
/* search button */
.t-Body {

    .t-Body-nav {
        background-color: var(--branding-primary);
        .a-TreeView .a-TreeView-node.a-TreeView-node--leaf.a-TreeView-node--topLevel, .a-TreeView-node.is-expandable.a-TreeView-node--topLevel {
            span.fa:not(.fa-external-link) {
                display: none;
            }
        }
    }
}
/* others? */
/* .t-NavigationBar-item .t-Icon[aria-hidden="true"]:not(.fa-external-link) {
    position: absolute;
} */
.t-NavigationBar-item a span.t-Icon:empty:not(.fa) {
    display: none;
}
.t-NavigationBar-item .t-Button.t-Button--icon.t-Button--header.t-Button--navBar:has(.fa-external-link) {
    display: flex;
    .fa-external-link {
        margin: 0;
        order: 2;
        margin-inline-start: 7.125px;
    }
}

.t-Header-branding.search-is-active {
    background: none;
    border: none;
    box-shadow: none;
}

/* HTML: <div class="loader"></div> */
.loader {
  width: 40px;
  aspect-ratio: 2;
  --_g: no-repeat radial-gradient(circle closest-side,#ccc 90%,#ccc0);
  background: 
    var(--_g) 0%   50%,
    var(--_g) 50%  50%,
    var(--_g) 100% 50%;
  background-size: calc(100%/4) 50%;
  animation: l3 1.5s infinite linear;
}
@keyframes l3 {
    20%{background-position:0%   0%, 50%  50%,100%  50%}
    40%{background-position:0% 100%, 50%   0%,100%  50%}
    60%{background-position:0%  50%, 50% 100%,100%   0%}
    80%{background-position:0%  50%, 50%  50%,100% 100%}
}


.search-overlay__searching {
    display: flex;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    align-items: center;
    justify-content: center;
    color: #ccc;
    gap: 4px;
    &.is-active {
        opacity: 1;
    }
}

.search-overlay__help {
    color: rgba(255, 255, 255, 0.5);
    height: fit-content!important;
    font-size: 14px;
    text-align: right;

    kbd {
        background-color: #eee;
        border-radius: 3px;
        border: 1px solid #b4b4b4;
        box-shadow:
            0 1px 1px rgba(0, 0, 0, 0.2),
            0 2px 0 0 rgba(255, 255, 255, 0.7) inset;
        color: #333;
        display: inline-block;
        font-size: 0.85em;
        font-weight: 700;
        line-height: 1;
        padding: 2px 4px;
        white-space: nowrap;
    }
}

.search-overlay__view_all {
    color: #fff;
    opacity: 0.5;
    display: flex;
    align-items: center;
    height: fit-content!important;
    cursor: pointer;
    justify-content: flex-end;
    margin-top: 8px;
    &:hover {
        text-decoration: underline;
        opacity: 1;
    }
}

.search-overlay {
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateY(-86%); 
    -webkit-transition: visibility 0s linear 0s, opacity .5s ease-in-out, -webkit-backdrop-filter .5s ease-in-out, transform .5s ease-in-out;
    transition: visibility 0s linear 0s, opacity .5s ease-in-out, -webkit-backdrop-filter .5s ease-in-out, transform .5s ease-in-out;
    transition: visibility 0s linear 0s, opacity .5s ease-in-out, backdrop-filter .5s ease-in-out, transform .5s ease-in-out;
    transition: visibility 0s linear 0s, opacity .5s ease-in-out, backdrop-filter .5s ease-in-out, -webkit-backdrop-filter .5s ease-in-out, transform .5s ease-in-out;
    z-index: 799;
    height: 100vh;
    width: 100vw;
    /* background-color: var(--branding-primary); */
    opacity: 0;
    background: #007197E6;
    &.is-active {
        top: 0;
        opacity: 1;
        backdrop-filter: blur(10px);
        transform: translateY(0);

        .search-overlay__content {
            opacity: 1;
        }
    }

    &.is-visible {
        visibility: visible;
    }

    &.is-transitioning {
        transform: translateY(-86%);
    }


    .search-overlay__content {
        width: 80%;
        height: 15%;
        opacity: 0;
        transition: opacity 1.5s ease;
        & div, & input {
            height: 100%;
        }
    }
}

.search-overlay__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.search-overlay__content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    @media (max-width: 767px) {
        top: 25%;
        transform: translate(-50%, -25%);
    }
}

.search-overlay__close {
    position: absolute;
    top: 0;
    right: 0;
}

.search-overlay__body {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(0, 115, 151, .5);
}

.search-overlay__input {
    width: 100%;
}

.search-overlay__input input {
    width: 100%;
    border: none;
    outline: none;
    padding: 0 3rem .5rem 0;
    font-family: "Crimson Text", Georgia, serif;
    font-weight: 400;
    font-style: italic;
    color: #fff;
    font-size: min(8vw, 2.75rem)!important;
    letter-spacing: -.015em;
    appearance: none;
    background: none;
}

.search-overlay__body .search-overlay__icon {
    display: flex;
    .t-Icon {
        align-content: center;
    }

}
.search-overlay__body .t-Icon::before {
    color: #fff;
    font-size: 1.75rem;
    letter-spacing: -.015em;
    opacity: .45;
}

.search-overlay__input input:focus {
    outline: none;
}

.search-overlay__input input::placeholder {
    color: #ccc;
}

/* Breadcrumbs */
.t-Breadcrumb-label {
    font-weight: 400;
}

/* Interactive Reports / Interactive Grid */
:root {
    /* interactive reports should use surface light, then surface dark on hover */
    --a-gv-background-color: var(--branding-surface-light);
    --a-gv-row-hover-background-color: #fff;
    /* --a-gv-row-hover-background-color: var(--branding-surface-dark); */
}
.a-IRR-header {
  background-color: var(--branding-surface-light);
}
.a-IRR-header:hover {
  background-color: var(--branding-surface-light-hover);
}
.a-IRR-header.is-active,
.a-GV-header.is-active {
  background-color: var(--a-menu-background-color);
  color: var(--a-menu-text-color);
}
.a-IRR-header--group {
  background-color: var(--branding-surface-light);
}

/* row selection on interactive report */
.a-Toolbar-selectList[data-action="change-report"],
.a-IRR-rowSelector .a-IRR-selectList, 
.a-IRR-savedReports .a-IRR-selectList {
    border-radius: var(--a-button-border-radius, 24px)
}

/* faceted search */
.a-FS-listFooter button {
    color: var(--branding-primary-light);
    font-size: 1rem;
}
.a-FS-label {
    font-weight: 400;
    font-size: 1.4rem;
}
.apex-item-option label .label {
    text-transform: capitalize;
    font-size: 1rem;
}
input:checked+label {
    font-weight: 400;
    --a-base-font-weight-bold: 400;
}

/* inputs */
.post-label-link {
    position: absolute;
    
    top: 54px;
    left: var(--ut-field-padding-x, 0.5rem);

    .apex-item-wrapper--rich-text-editor & {
        top: unset;
        bottom: -0.7rem;
    }
    .apex-item-wrapper--text-field & {
        top: unset;
        bottom: -1.2rem;
        left: 2px;
    }
    a&:hover {
        text-decoration: underline from-font solid;
    }
}
.t-Form-itemWrapper:has(a-rich-text-editor) {
    border: 1px solid var(--a-field-input-border-color);
}
.a-Button.a-Button--calendar {
    border-color: var(--a-field-input-border-color);
}
.a-Button.a-Button--popupLOV {
    --a-button-border-color: var(--a-field-input-border-color);
}
.t-Form-fieldContainer.t-Form-fieldContainer--stacked.apex-item-wrapper--rich-text-editor .t-Form-label {
    --ut-field-label-font-size: 0.875rem;
}
.col-12 .apex-item-group--textarea {
    width: 100%;
    textarea {
        width: 100%;
    }
}
.apex-item-text.apex-page-item-error,
.apex-item-select.apex-page-item-error,
.apex-item-textarea.apex-page-item-error,
.u-TF-item--text.apex-page-item-error,
.u-TF-item--select.apex-page-item-error,
select.listmanager.apex-page-item-error,
select.group_selectlist.apex-page-item-error,
.apex-item-multi.apex-page-item-error,
.datetimepicker_newMonth.apex-page-item-error,
.apex-item-wrapper--combobox-many .apex-item-comboselect.apex-page-item-error,
.apex-item-combobox.apex-page-item-error {
    outline: 2px solid var(--a-field-input-state-border-color);
}
/*  plugins */
/* phone number inputs */

/* these are on the global page, so the string replacement works correctly */
/* .iti__flag {
    background-image: url("#APP_FILES#flags.png");
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .iti__flag {background-image: url("#APP_FILES#flags@2x.png");}
} */

/* dialog */
.ui-dialog--notification {
    width: fit-content !important;
    max-width: clamp(50vw, 100% - 2rem, 88vw) !important;
    .a-AlertMessage-details {
        text-wrap: pretty!important;
    }
    .a-AlertMessage-title {
        font-size: var(--a-alert-message-title-font-size,22px);
    }
}

.sse-tooltip-link {
    width: fit-content;
    display: flex;
    gap: 0.25rem;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--branding-primary-medium);
    &:hover {
        color: var(--branding-primary);
    }
}
.tippy-content {
    a {
        color: white;
        /* font-weight: 700; */
        text-decoration: underline from-font solid;
        &:hover {
            text-decoration: none;
        }
    }
}

/* organic badge */
.t-Badge--organic {
    background: var(--branding-accent-primary);
    color: white;
    --ut-badge-font-weight: 400;
}

/* checkbox group */
@media (max-width: 639px) {
    .apex-item-group--rc .apex-item-option {
        margin-right: .5rem;
    }
}

/* Alert boxes */
.a-AlertMessage-details {
    line-height: 1.1;
}


/* Ensure safari mobile doesn't zoom */
@media (max-width: 767px) {
    input, textarea {
        font-size: 16px !important;
    }
}

/** Responsive Video Embeds */
.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; }
.embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

.a-IRR-tableContainer {
    /* any links in the table header */
    .a-IRR-header.u-tL a, .a-IRR-header.u-tR a {
        color: #4b7b0b;
        cursor: pointer;
    }

    td[headers] a,
    td[headers] a {
        color: #4b7b0b;
    }

    a.action-view {
        background-color: #4b7b0b;
        --a-button-gap-x: 0;
    }

    a.action-edit {
        color: var(--ut-body-text-color, black) !important;
    }
}


.no-drawer-header .ui-dialog-titlebar {
    display:none !important;
}