/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

.btn-ghost {
    background-color: transparent;
    color: var(--foreground);
}

.btn-ghost:hover {
    background-color: var(--accent-foreground);
    /* Using light bg for ghost hover */
    background-color: rgba(0, 0, 0, 0.05);
    /* Fallback */
}

/* Icon Button */
.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Card Components */
.card {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background-color: var(--card);
    color: var(--foreground);
    box-shadow: var(--shadow-sm);
}

.card-floating {
    margin-left: 1rem;
    margin-right: 1rem;
    margin-top: -2rem;
    /* The signature floating effect */
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 20;
    background-color: rgba(255, 255, 255, 0.9);
    /* backdrop-blur equivalent fallback */
    backdrop-filter: blur(4px);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: var(--background);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0.5rem 0.25rem;
}

.nav-item.active {
    color: var(--primary);
}

transform: translateY(-1.5rem);
background: var(--card);
color: var(--primary);
border: 4px solid var(--primary);
flex: none;
/* Disable flex-grow from .nav-item */
border-radius: 50%;
width: 4rem;
height: 4rem;
min-width: 4rem;
/* Prevent shrinking */
min-height: 4rem;
flex-shrink: 0;
aspect-ratio: 1 / 1;
box-shadow: var(--shadow-lg);
justify-content: center;
}

.nav-icon {
    font-size: 1.25rem;
}

/* Sponsor Carousel */
.sponsor-carousel {
    position: relative;
    height: 6rem;
    /* h-24 */
    background-color: var(--muted);
    overflow: hidden;
}

@media (min-width: 768px) {
    .sponsor-carousel {
        height: 8rem;
    }
}

.carousel-slide {
    position: absolute;
    inset: 0;
    transition: opacity 500ms ease-in-out;
    opacity: 0;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    display: flex;
    align-items: flex-end;
    padding: 0.75rem;
}

.carousel-content {
    width: 100%;
}

.carousel-title {
    color: white;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.carousel-indicators {
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.indicator {
    height: 0.25rem;
    width: 0.25rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.5);
    transition: all 300ms;
}

.indicator.active {
    width: 1rem;
    background-color: white;
}
/* Docked Bottom Nav with Notch */
.bottom-nav-docked {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: var(--primary);
    color: white;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
}

.bottom-nav-content {
    position: relative;
    height: 4rem; /* 64px */
    width: 100%;
}

.bg-notch-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary);
    /* Cut circle at top center */
    -webkit-mask-image: radial-gradient(circle at 50% 0, transparent 40px, black 40.5px);
    mask-image: radial-gradient(circle at 50% 0, transparent 40px, black 40.5px);
    pointer-events: none;
}

.nav-items-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: space-between;
}

.nav-section-left, .nav-section-right {
    flex: 1;
    display: flex;
    justify-content: space-around; /* Distribute items evenly in their halves */
}

/* Add a spacer in the middle of standard flex if not splitting */
.nav-spacer {
    width: 5rem; /* Space for FAB */
    flex-shrink: 0;
}

.nav-item-docked {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    gap: 0.25rem;
    height: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-item-docked:hover {
    color: rgba(255, 255, 255, 0.9);
}

.nav-item-docked.active {
    color: white;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 500;
}

.scan-fab-container {
    position: absolute;
    top: -1.75rem; /* Half of button height (3.5rem) */
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

.scan-fab {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background-color: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--primary); /* Optional ring */
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.2s;
}

.scan-fab:hover {
    transform: scale(1.05);
}
