/**
 * Project Filters Block Styles
 * Matches interior-nav look and feel
 *
 * @package Lake Superior Consulting
 */

/* Block container — flex row with wrapping */
.wp-block-lakesuperior-project-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 0;
    padding: 0;
    color: inherit;
}

/* Individual filter buttons — matches interior-nav styling */
.project-filter-item {
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    border-right: 1px solid currentColor;
    border-top: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    margin-top: -1px;
    padding: var(--wp--preset--spacing--40);
    display: flex;
    align-items: center;
    color: inherit;
    font-family: var(--wp--preset--font-family--neue-haas-grotesk, sans-serif);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    -webkit-font-smoothing: antialiased;
    white-space: nowrap;
    position: relative;
    transition: color 0.3s ease;
}

/* Label wraps + icon and text — pseudo-elements here to match interior-nav structure */
.project-filter-label {
    position: relative;
    display: inline-block;
}

/* + icon inside accent square — matches interior-nav */
.project-filter-label::before {
    content: '+';
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5em;
    color: currentColor;
    background: var(--wp--preset--color--accent-1);
    width: 1em;
    height: 1em;
    line-height: 1em;
    font-size: inherit;
    text-align: center;
    font-weight: 400;
    z-index: 1;
    transition: height 0.3s ease, transform 0.3s ease 0.3s;
}

/* Background bar for hover — matches interior-nav */
.project-filter-label::after {
    content: '';
    display: block;
    width: 1em;
    height: 1em;
    background: var(--wp--preset--color--accent-1);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    transform: scaleY(1);
    transform-origin: left center;
    transition: transform 0.3s, width 0.3s ease 0.3s;
}

/* Hover state */
.project-filter-item:hover .project-filter-label::after {
    transform: scaleY(2);
    width: calc(100% + 0.75em);
    transition: transform 0.3s, width 0.3s ease 0.3s;
}

.project-filter-item:hover .project-filter-label::before {
    transform: translateX(0.25em);
    transition: transform 0.3s ease 0.3s;
}

.project-filter-item:hover {
    color: white;
    transition: color 0.3s ease 0.3s;
}

/* Active state */
.project-filter-item.is-active {
    color: white;
}

.project-filter-item.is-active .project-filter-label::after {
    transform: scaleY(2);
    width: calc(100% + 0.75em);
}

.project-filter-item.is-active .project-filter-label::before {
    transform: translateX(0.25em);
}

/* Responsive */
@media (max-width: 768px) {
    .wp-block-lakesuperior-project-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .project-filter-item {
        font-size: var(--wp--preset--font-size--x-small);
        padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
    }
}
