/* Role Selection Grid Layout */
.asc-role-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 equal columns */
    gap: 0.75rem;
    margin: 1.5rem 0;
}

/* Role Selection Card Styling */
.asc-role-selection-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem; /* Reduced padding to fit better */
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-height: 120px; /* Reduced min-height */
    display: flex;
    flex-direction: column; /* Stack content vertically for compact design */
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

    .asc-role-selection-card:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(59, 130, 246, 0.5);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

.asc-role-selection-card--selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--game-primary, #3b82f6);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

    .asc-role-selection-card--selected:hover {
        background: rgba(59, 130, 246, 0.2);
    }

/* Role Icon Container */
.asc-role-icon-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; /* Smaller icon for compact design */
    height: 40px;
    border-radius: 8px;
    color: white;
}

/* Role Info */
.asc-role-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.asc-role-name {
    font-size: 1rem; /* Smaller font for compact design */
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin-bottom: 0.25rem;
}

.asc-role-description {
    font-size: 0.75rem; /* Smaller font for compact design */
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    line-height: 1.3;
}

/* Selected Indicator */
.asc-selected-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    color: var(--game-primary, #3b82f6);
    background: var(--bg-card, #ffffff);
    border-radius: 50%;
    width: 24px; /* Smaller indicator */
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .asc-role-selection {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
        gap: 0.75rem;
    }

    .asc-role-selection-card {
        flex-direction: row; /* Switch back to horizontal layout on mobile */
        text-align: left;
        padding: 1rem;
        gap: 1rem;
    }

    .asc-role-info {
        align-items: flex-start;
    }

    .asc-role-name {
        font-size: 1.125rem;
    }

    .asc-role-description {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .asc-role-selection-card {
        padding: 0.875rem;
        min-height: 100px;
    }
}

/* Accessibility */
.asc-role-selection-card:focus {
    outline: 2px solid var(--game-primary, #3b82f6);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .asc-role-selection-card {
        border-width: 3px;
        background: rgba(255, 255, 255, 0.1);
    }

    .asc-role-selection-card--selected {
        background: rgba(59, 130, 246, 0.3);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .asc-role-selection-card {
        transition: none;
    }

        .asc-role-selection-card:hover {
            transform: none;
        }
}
