/* =========================================================
   GALLERIA PER FOTOGRAFO - Per il Frantoio

   A row of buttons, one per photographer, above the gallery
   they choose between. The show pages are light — black Arial
   on the site's #EEEEEE — so a button at rest is an outline in
   the page's own ink, and the chosen one is filled with the
   #1C1C1C the site's cards are made of. The gold #D19100 is
   what answers a pointer or a keyboard.

   Everything is a custom property on .frantoio-gallery-tabs,
   so each of them is an Elementor colour control.

   The theme styles every <button> on the site, hover and focus
   included, which is why each state below says what its
   background, border and colour are instead of leaving one of
   them to be inherited.
   ========================================================= */

.frantoio-gallery-tabs {
    --frantoio-gtabs-text: #000000;
    --frantoio-gtabs-border: rgba(0, 0, 0, 0.28);
    --frantoio-gtabs-accent: #D19100;
    --frantoio-gtabs-active-bg: #1C1C1C;
    --frantoio-gtabs-active-text: #EEEEEE;
    --frantoio-gtabs-radius: 999px;
    --frantoio-gtabs-space: 18px;

    width: 100%;
}

/* ---------------------------------------------------------------- the row */

.frantoio-gallery-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    margin: 12px 0 var(--frantoio-gtabs-space);
    padding: 0 10px;
}

.frantoio-gallery-tabs .frantoio-gallery-tab {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 0 22px;
    border: 1px solid var(--frantoio-gtabs-border);
    border-radius: var(--frantoio-gtabs-radius);
    background: transparent;
    color: var(--frantoio-gtabs-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-transform: none;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.frantoio-gallery-tabs .frantoio-gallery-tab:hover,
.frantoio-gallery-tabs .frantoio-gallery-tab:focus {
    background: transparent;
    border-color: var(--frantoio-gtabs-accent);
    color: var(--frantoio-gtabs-text);
}

.frantoio-gallery-tabs .frantoio-gallery-tab:focus {
    outline: none;
}

.frantoio-gallery-tabs .frantoio-gallery-tab:focus-visible {
    outline: 2px solid var(--frantoio-gtabs-accent);
    outline-offset: 2px;
}

/* The chosen one stays chosen under a pointer: there is nothing to press. */
.frantoio-gallery-tabs .frantoio-gallery-tab.is-active,
.frantoio-gallery-tabs .frantoio-gallery-tab.is-active:hover,
.frantoio-gallery-tabs .frantoio-gallery-tab.is-active:focus {
    background: var(--frantoio-gtabs-active-bg);
    border-color: var(--frantoio-gtabs-active-bg);
    color: var(--frantoio-gtabs-active-text);
    cursor: default;
}

/* ------------------------------------------------------------ the galleries */

/* Said out loud, because a theme rule giving the panel a display of its own
   would otherwise beat the attribute and show every gallery at once. */
.frantoio-gallery-panel[hidden] {
    display: none;
}

/* The gallery drops in from just above where it lands. Only a starting frame
   is declared: the animation ends on the panel's own style, so no transform is
   left behind for SimpLy's lightbox to be positioned against. */
@keyframes frantoio-gallery-drop {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }
}

.frantoio-gallery-panel.is-entering {
    animation: frantoio-gallery-drop 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
    .frantoio-gallery-tabs .frantoio-gallery-tab {
        transition: none;
    }

    .frantoio-gallery-panel.is-entering {
        animation: none;
    }
}

/* ------------------------------------------------------------ narrow phone */

@media (max-width: 600px) {
    .frantoio-gallery-tabs-bar {
        gap: 8px;
    }

    .frantoio-gallery-tabs .frantoio-gallery-tab {
        padding: 0 16px;
        font-size: 0.95rem;
    }
}
