/*!
 * Grids CSS - Shared by all grid components
 * Version: 1.0
 * Based on h-scrolls.css but displays as CSS Grid instead of horizontal scroll
 */

/* Design tokens are loaded directly by the component */

/* Base Grid Styles */
.grid-section {
    margin: 0 0 40px 0;
    position: relative;
}


/* Grid Section Headers */
.grid-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0;
    position: relative;
}

.grid-section-title-link {
    text-decoration: none;
    transition: all 0.3s ease;
}

.grid-section-title-link:hover {
    transform: translateY(-2px);
}

.grid-section-title {
    /* All styling handled by design system H2 styles */
    transition: all 0.3s ease;
    cursor: pointer;
    margin-left: 10px; /* Add 5px more left */
}

.grid-section-title-link:hover .grid-section-title {
    /* Hover effects handled by design system H2 styles */
    transform: scale(1.05);
}

/* Search Container - Handled by search component */
.grid-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Grid Cards Container - CSS Grid Layout */
.grid-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 0;
    justify-items: center;
    width: 100%;
    max-width: none;
}

/* Fallback for when JavaScript is disabled */
.no-js .grid-cards-container {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-rows: 35vh;
}

/* Card Size Override - CSS Grid Controls Sizing */
.grid-cards-container .performer-card,
.grid-cards-container .scene-card,
.grid-cards-container .studio-card {
    width: 200px;
    height: auto; /* Let aspect-ratio calculate height */
    position: relative;
}


/* Card Styling - Ensure cards work well in grid */
.grid-cards-container .performer-card,
.grid-cards-container .scene-card,
.grid-cards-container .studio-card {
    margin: 0;
    position: relative;
}

/* Card dimensions handled by JavaScript - cards maintain their natural aspect ratios */

/* No Results Message */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--hms-text-white);
    font-size: 1.2rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin: 2rem 0;
}

/* Loading State */
.grid-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--hms-text-white);
    font-size: 1.2rem;
    padding: 2rem;
}

/* Empty State */
.grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--hms-text-gray);
    font-size: 1.2rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin: 2rem 0;
}

/* Mobile Responsiveness - CSS Grid Mobile Layout */
@media (max-width: 768px) {
    .grid-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(calc(45dvw - 20px), 1fr));
        gap: 15px;
        padding: 0;
    }
    
    .grid-cards-container .performer-card,
    .grid-cards-container .scene-card,
    .grid-cards-container .studio-card {
        width: calc(45dvw - 20px);
    }
}
