/**
 * Genre Selection - Optimized CSS
 * Modern transparent design for ghost production marketplace
 */

.genre-selection-container {
    color: #fff;
    border-radius: 32px;
    padding: 25px 20px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    position: relative;
    max-width: 900px;
}

.genre-selection-inner {
    width: 100%;
    position: relative;
    z-index: 1;
}

.genre-selection-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 25px;
    font-weight: 500;
    color: #fff;
    letter-spacing: -0.5px;
}

.genre-selection-title:after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #8e2de2, #4a00e0);
    margin: 12px auto 0;
    border-radius: 4px;
}

.genre-selection-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

/* Responsive grid adjustments */
@media (max-width: 1024px) {
    .genre-selection-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 768px) {
    .genre-selection-grid { 
        grid-template-columns: repeat(4, 1fr); 
    }
    .genre-selection-container { padding: 20px 15px; }
    .genre-selection-title { font-size: 22px; margin-bottom: 20px; }
}

@media (max-width: 480px) {
    .genre-selection-grid {
        display: grid;
        grid-template-rows: repeat(3, 1fr);
        grid-auto-flow: column;
        grid-auto-columns: auto;
        overflow-x: scroll;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* For Firefox */
        -ms-overflow-style: none; /* For IE and Edge */
        gap: 8px;
        margin: 0 -10px 15px;
        padding: 5px 10px 15px;
        scroll-snap-type: x proximity;
        scroll-behavior: smooth;
    }
    
    .genre-selection-grid::-webkit-scrollbar {
        display: none; /* For Chrome, Safari, and Opera */
    }
    
    .genre-item {
        width: auto;
        min-width: 130px;
        max-width: 160px;
        scroll-snap-align: start;
    }
    
    .genre-checkbox {
        white-space: nowrap;
        padding: 8px 10px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        box-sizing: border-box;
    }
    
    .genre-name {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    /* Remove potentially problematic animations and indicators */
    .genre-selection-inner:after,
    .genre-selection-grid.show-scroll-hint {
        display: none;
    }
}

/* Genre item styling */
.genre-item {
    position: relative;
}

.genre-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
    margin: 0;
    cursor: pointer;
}

.genre-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 10px 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    min-height: 20px;
}

.genre-checkbox:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.genre-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 2px;
}

/* Checked state styling */
.genre-item input[type="checkbox"]:checked + .genre-checkbox {
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
    border-color: rgba(255, 255, 255, 0.15);
}

.genre-item input[type="checkbox"]:checked + .genre-checkbox .genre-name {
    color: #fff;
    font-weight: 500;
}

.genre-item label {
    display: block;
    width: 100%;
    height: 100%;
}

/* Ensure no style leakage to Elementor */
.elementor-widget-button .elementor-button,
.elementor-button,
.elementor-button.elementor-size-xs,
.elementor-button.elementor-size-sm,
.elementor-button.elementor-size-md,
.elementor-button.elementor-size-lg,
.elementor-button.elementor-size-xl {
    /* Override any potential inheritance */
    background-image: var(--e-button-background-image, none);
    background-color: var(--e-button-background-color, #818a91);
    color: var(--e-button-text-color, #fff);
    border-radius: var(--e-button-border-radius, 3px);
    padding: var(--e-button-padding, 12px 24px);
    font-size: var(--e-button-font-size, 14px);
    font-weight: var(--e-button-font-weight, 500);
    line-height: var(--e-button-line-height, 1);
    text-transform: var(--e-button-text-transform, none);
    letter-spacing: var(--e-button-letter-spacing, 0);
    transition: var(--e-button-transition, all 0.3s);
}

/* Button styling */
.genre-selection-footer {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.genre-selection-container .genre-selection-footer .genre-selection-button {
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
    color: white;
    border: none;
    border-radius: 999px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.genre-selection-container .genre-selection-footer .genre-selection-button:hover:not(:disabled) {
    box-shadow: 0 4px 8px rgba(74, 0, 224, 0.2);
}

.genre-selection-container .genre-selection-footer .genre-selection-button:active:not(:disabled) {
    transform: translateY(1px);
}

.genre-selection-container .genre-selection-footer .genre-selection-button:disabled {
    display: none;
} 