/* Crates Navigation Pills - Frontend Styles */

.wp-block-crates-navigation-pills {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    padding: 0 1rem;
}

.crates-nav-pills__container {
    display: inline-block;
    background: rgba(15, 41, 34, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(26, 42, 37, 1);
    box-shadow: 0 0 20px rgba(243, 154, 118, 0.05);
}

.crates-nav-pills__wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.crates-nav-pills__button {
    background: #163832;
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    outline: none;
    position: relative;
    overflow: hidden;
}

.crates-nav-pills__button:hover {
    background: #1D4640;
    color: #F39A76;
    box-shadow: 0 0 15px rgba(243, 154, 118, 0.2);
    transform: translateY(-1px);
}

.crates-nav-pills__button:focus {
    outline: 2px solid #F39A76;
    outline-offset: 2px;
}

.crates-nav-pills__button:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (min-width: 768px) {
    .crates-nav-pills__wrapper {
        gap: 0.75rem;
    }

    .crates-nav-pills__button {
        font-size: 1rem;
        padding: 0.625rem 1.25rem;
    }
}

@media (max-width: 767px) {
    .wp-block-crates-navigation-pills {
        padding: 0 1rem;
    }

    .crates-nav-pills__wrapper {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .crates-nav-pills__button {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        min-width: auto;
    }
}

/* Highlight animation for scroll targets */
.crates-nav-highlight {
    animation: crates-highlight 2s ease-in-out;
}

@keyframes crates-highlight {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(243, 154, 118, 0.1);
        border-radius: 8px;
    }
}

/* Loading animation */
.crates-nav-pills__button {
    opacity: 0;
    transform: translateY(-10px);
    animation: crates-slide-in 0.3s ease forwards;
}

@keyframes crates-slide-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark theme compatibility */
.dark-theme .crates-nav-pills__container {
    background: rgba(15, 41, 34, 0.8);
    border-color: rgba(26, 42, 37, 1);
}

.dark-theme .crates-nav-pills__button {
    background: #163832;
    color: #ffffff;
}

.dark-theme .crates-nav-pills__button:hover {
    background: #1D4640;
    color: #F39A76;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .crates-nav-pills__button {
        transition: none;
        animation: none;
    }

    .crates-nav-pills__button:hover {
        transform: none;
    }

    .crates-nav-highlight {
        animation: none;
        background-color: rgba(243, 154, 118, 0.1);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .crates-nav-pills__container {
        border: 2px solid #ffffff;
        background: #000000;
    }

    .crates-nav-pills__button {
        background: #000000;
        color: #ffffff;
        border: 1px solid #ffffff;
    }

    .crates-nav-pills__button:hover {
        background: #ffffff;
        color: #000000;
    }
}