/* Front-end styles for the foran/* blocks.
   Self-contained: the blocks render correctly under any theme. Loaded on
   the front end and in the editor canvas via the blocks' "style" handle.
   Brand tokens mirror the foranpetcare-2026 theme.json design system. */

:root {
    /* Brand tokens: track the active theme's palette when its presets
       exist, fall back to the brand values when they don't. */
    --fp-pink: var(--wp--preset--color--brand-pink, #ed1270);
    --fp-pink-dark: var(--wp--preset--color--brand-pink-dark, #ce1060);
    --fp-green: var(--wp--preset--color--brand-green, #81a855);
    --fp-green-dark: var(--wp--preset--color--brand-green-dark, #3e8d3e);
    --fp-charcoal: var(--wp--preset--color--charcoal, #404041);
    --fp-ink: var(--wp--preset--color--ink, #313131);
    --fp-border: var(--wp--preset--color--line, #d9d9d7);
    --fp-content-width: 1266px;
}

/* ------------------------------------------------------------------ */
/* Shared primitives                                                    */
/* ------------------------------------------------------------------ */

.fp-contain {
    width: 90%;
    max-width: var(--fp-content-width);
    margin-left: auto;
    margin-right: auto;
}

a.fp-btn {
    display: inline-block;
    background: var(--fp-green);
    border: 1px solid var(--fp-green-dark);
    border-radius: 5px;
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.4;
    padding: 0.4em 1em;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s ease;
}

a.fp-btn:hover {
    background: var(--fp-green-dark);
    color: #fff;
}

a.fp-btn--arrow {
    padding-right: 2.5em;
    position: relative;
}

a.fp-btn--arrow::after {
    content: "\203A";
    position: absolute;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 900;
}

.fp-choice {
    max-width: 25em;
    margin: 1em auto 0;
}

.fp-choice a.fp-btn {
    display: block;
}

.fp-choice--pair {
    display: flex;
}

.fp-choice--pair a.fp-btn {
    flex: 1;
    white-space: nowrap;
    padding-left: 0.5em;
    padding-right: 0.5em;
    min-width: 0;
}

.fp-choice--pair a.fp-btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right-color: #fff;
}

.fp-choice--pair a.fp-btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left-color: #fff;
}

/* ------------------------------------------------------------------ */
/* Hero slider                                                          */
/* ------------------------------------------------------------------ */

.fp-hero {
    position: relative;
    overflow: hidden;
}

.fp-hero__viewport {
    overflow: hidden;
}

.fp-hero__track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.fp-hero__slide {
    flex: 0 0 100%;
    min-width: 100%;
    background-size: cover;
    background-position: center;
    min-height: clamp(300px, 34vw, 475px);
    display: flex;
    align-items: center;
}

.fp-hero__slide > .fp-contain {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
    min-height: inherit;
}

.fp-hero__product {
    align-self: flex-end;
}

.fp-hero__product img {
    max-height: clamp(220px, 26vw, 360px);
    width: auto;
    display: block;
}

.fp-hero__content {
    max-width: 34rem;
    color: #fff;
}

.fp-hero__content h2 {
    color: #fff;
    font-size: clamp(1.6rem, 3.4vw, 2.75rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.15;
    margin: 0 0 1rem;
}

.fp-hero__content h2 a {
    color: #fff;
    text-decoration: none;
}

.fp-hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255, 255, 255, 0.85);
    border: 0;
    border-radius: 3px;
    width: 2.5rem;
    height: 4rem;
    font-size: 2rem;
    line-height: 1;
    color: var(--fp-ink);
    cursor: pointer;
}

.fp-hero__arrow:hover {
    background: #fff;
}

.fp-hero__arrow--prev {
    left: 0;
}

.fp-hero__arrow--next {
    right: 0;
}

.fp-hero__dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 0.5rem;
}

.fp-hero__dot {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}

.fp-hero__dot.is-active {
    background: var(--fp-pink);
}

.fp-hero__toggle {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--fp-ink);
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1;
}

.fp-hero__toggle::before {
    content: "\275A\275A"; /* pause bars */
}

.fp-hero__toggle.is-paused::before {
    content: "\25B6"; /* play triangle */
}

@media (max-width: 700px) {
    .fp-hero__product {
        display: none;
    }

    .fp-hero__slide > .fp-contain {
        justify-content: flex-start;
    }
}

/* ------------------------------------------------------------------ */
/* Product tile grid                                                    */
/* ------------------------------------------------------------------ */

.fp-tile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 1.75rem;
}

@media (max-width: 1000px) {
    .fp-tile-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .fp-tile-grid {
        grid-template-columns: 1fr;
    }
}

.fp-tile {
    background: #fff;
    border: 1px solid var(--fp-border);
    border-radius: 5px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.fp-tile:hover {
    border-color: #ccc;
}

.fp-tile h3 {
    color: var(--fp-pink);
    font-weight: 700;
    text-transform: none;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 0.75rem;
    margin: 0 0 1rem;
}

.fp-tile__image img {
    max-width: 100%;
    height: auto;
}

.fp-tile__copy {
    font-size: 0.923em;
    margin-top: 0.75rem;
}

.fp-tile .fp-choice {
    margin-top: auto;
    padding-top: 1rem;
    width: 100%;
}

/* ------------------------------------------------------------------ */
/* Pod row (CVE academy / article / CTA tiles)                          */
/* ------------------------------------------------------------------ */

.fp-pod-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 1.75rem;
    align-items: stretch;
}

@media (max-width: 1000px) {
    .fp-pod-grid {
        grid-template-columns: 1fr;
    }
}

.fp-cve-pod {
    background-size: cover;
    background-position: center;
    border-radius: 5px;
    overflow: hidden;
    color: #fff;
    text-align: center;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.fp-cve-pod img {
    max-width: 160px;
    height: auto;
    margin-bottom: 1rem;
}

.fp-cve-pod .fp-choice {
    text-shadow: none;
    width: 100%;
}

.fp-article-tile {
    background: #fff;
    border: 1px solid var(--fp-border);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fp-article-tile > a img {
    display: block;
    width: 100%;
    height: auto;
}

.fp-article-tile__entry {
    padding: 1.25rem 1.5rem;
}

.fp-article-tile__entry h3 {
    margin: 0 0 0.5rem;
}

.fp-article-tile__entry h3 a {
    color: var(--fp-pink);
    text-decoration: none;
}

.fp-article-tile__entry p {
    font-size: 0.923em;
    margin: 0;
}

.fp-cta-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fp-cta-tile {
    background: var(--fp-charcoal);
    border-radius: 5px;
    color: #ccc;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    padding: 1.5rem;
    flex: 1;
}

.fp-cta-tile__icon img {
    width: 90px;
    height: auto;
    display: block;
}

.fp-cta-tile__entry h3 {
    color: #fff;
    margin: 0 0 0.5rem;
}

.fp-cta-tile__entry p {
    font-size: 0.923em;
    margin: 0;
}

.fp-cta-tile__entry a {
    color: var(--fp-pink);
}

/* ------------------------------------------------------------------ */
/* Product pages                                                        */
/* ------------------------------------------------------------------ */

.fp-meta-html h3 {
    color: var(--fp-pink);
    margin: 1rem 0 0.25rem;
}

.fp-meta-html ul {
    margin: 0.25rem 0 0.5rem 1.25rem;
}

.fp-accordion .accordion-header {
    color: var(--fp-pink);
    font-size: 1.125rem;
    font-weight: 700;
    border-bottom: 1px dotted #ccc;
    padding: 0.75rem 2rem 0.75rem 0;
    margin: 0;
    cursor: pointer;
    position: relative;
}

.fp-accordion .accordion-header::after {
    content: "+";
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 400;
    color: var(--fp-green-dark);
}

.fp-accordion .accordion-header.is-open::after {
    content: "2";
}

.fp-accordion .accordion-content {
    display: none;
    padding: 0.75rem 0;
}

.fp-accordion .accordion-header.is-open + .accordion-content {
    display: block;
}

.fp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
    margin: 1rem 0;
}

.fp-card {
    background: #fff;
    border: 1px solid var(--fp-border);
    border-radius: 5px;
    padding: 1.25rem;
    text-align: center;
}

.fp-card:hover {
    border-color: #ccc;
}

.fp-card img {
    max-width: 100%;
    height: auto;
}

.fp-card h3 {
    margin: 0.75rem 0 0.5rem;
}

.fp-card h3 a {
    color: var(--fp-pink);
    text-decoration: none;
}

.fp-card p {
    font-size: 0.923em;
    margin: 0;
}


/* ------------------------------------------------------------------ */
/* Forms                                                                */
/* ------------------------------------------------------------------ */

.fp-form,
.fp-form * {
    box-sizing: border-box;
}

.fp-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
    max-width: 44rem;
}

.fp-form__field {
    width: 100%;
    margin: 0 0 1rem;
}

@media (min-width: 600px) {
    .fp-form__field--half {
        width: calc(50% - 0.75rem);
    }
}

.fp-form__field label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.fp-form__field input,
.fp-form__field textarea {
    width: 100%;
    padding: 0.5em 0.75em;
    border: 1px solid var(--fp-border);
    border-radius: 5px;
    font: inherit;
    background: #fff;
    color: var(--fp-ink);
}

.fp-form__hp {
    position: absolute !important;
    left: -9999px;
}

button.fp-form__submit,
span.fp-form__submit {
    display: inline-block;
    background: var(--fp-green);
    border: 1px solid var(--fp-green-dark);
    border-radius: 5px;
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
    padding: 0.4em 1.25em;
    cursor: pointer;
}

button.fp-form__submit:hover {
    background: var(--fp-green-dark);
}

button.fp-form__submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.fp-form__message {
    width: 100%;
    font-weight: 700;
    color: var(--fp-green-dark);
}

.fp-form__message.is-error {
    color: var(--fp-pink-dark);
}

/* Compact variant (footer newsletter): stacked, no labels */
.fp-form--compact {
    display: block;
}

.fp-form--compact .fp-form__field {
    margin-bottom: 0.5rem;
}

.fp-form--compact button.fp-form__submit,
.fp-form--compact span.fp-form__submit {
    font-size: 1rem;
}

/* ------------------------------------------------------------------ */
/* Mega menu item                                                      */
/* The panel positions against the nearest positioned ancestor (the    */
/* theme sets position:relative on its nav row) and the theme sets the */
/* panel width; the open/close mechanics live here with the block.     */
/* ------------------------------------------------------------------ */

.wp-block-navigation .wp-block-navigation-item.fp-mega {
    /* beat core's position:relative on nav items so the panel positions
       against the nav row, not this item */
    position: static;
    display: flex;
    align-items: center;
}

.fp-mega__toggle {
    background: none;
    border: 0;
    padding: 0 0 0 0.25em;
    margin: 0;
    color: currentColor;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.fp-mega__toggle svg {
    stroke: currentColor;
    transition: transform 0.15s;
}

.fp-mega.is-open > .fp-mega__toggle svg {
    transform: rotate(180deg);
}

.fp-mega__panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: none;
    z-index: 98;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.fp-mega.is-open > .fp-mega__panel {
    display: block;
}

/* In the mobile overlay menu the item behaves as a plain link. */
.wp-block-navigation__responsive-container.is-menu-open .fp-mega__toggle,
.wp-block-navigation__responsive-container.is-menu-open .fp-mega__panel {
    display: none;
}

/* ------------------------------------------------------------------ */
/* Product tree (sidebar)                                              */
/* ------------------------------------------------------------------ */

.fp-product-tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fp-product-tree a {
    text-decoration: none;
    color: var(--wp--preset--color--ink, #313131);
}

.fp-product-tree a::before {
    content: "\203A";
    color: var(--wp--preset--color--brand-pink, #ed1270);
    font-weight: 700;
    margin-right: 0.45em;
}

.fp-product-tree > ul > li {
    border-bottom: 2px dotted #c9c9c9;
    padding: 0.6em 0;
    font-weight: 700;
}

.fp-product-tree > ul > li:last-child {
    border-bottom: 0;
}

.fp-product-tree .children {
    display: none;
    margin: 0.5em 0 0;
    padding-left: 1.1em;
    font-weight: 400;
}

.fp-product-tree li.current_page_item > .children,
.fp-product-tree li.current_page_ancestor > .children {
    display: block;
}

.fp-product-tree .children li {
    padding: 0.2em 0;
}

.fp-product-tree li.current_page_item > a,
.fp-product-tree a:hover {
    color: var(--wp--preset--color--brand-pink, #ed1270);
}
