.rs-5af5a071-trigger-btn {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    color: #333;
    font-weight: 500;
}

.rs-5af5a071-trigger-btn:hover {
    background-color: #e9ecef;
    border-color: #ccc;
}

.rs-5af5a071-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.rs-5af5a071-modal {
    background: #fff;
    width: 95%;
    max-width: 1000px; /* Slightly wider for desktop 5 cols */
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rs-5af5a071-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.rs-5af5a071-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.rs-5af5a071-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
    padding: 0;
}

.rs-5af5a071-close-btn:hover {
    color: #333;
}

.rs-5af5a071-modal-body {
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scroll */
    background: #fafafa;
}

.rs-5af5a071-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 cols desktop */
    gap: 20px;
    width: 100%; /* Ensure it fits container */
}

.rs-5af5a071-card {
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-width: 0; /* Important for flex/grid children shrinking */
}

.rs-5af5a071-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #d4af37;
    transform: translateY(-2px);
}

.rs-5af5a071-card.selected {
    border-color: #d4af37;
    box-shadow: 0 0 0 1px #d4af37, 0 4px 12px rgba(212, 175, 55, 0.2);
    background-color: #fdfbf5;
}

.rs-5af5a071-card img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 15px;
    max-height: 80px;
}

.rs-5af5a071-missing-img {
    height: 80px;
    width: 100%;
    background-color: #eee;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 12px;
    border-radius: 4px;
}

.rs-5af5a071-name {
    font-size: 13px;
    line-height: 1.3;
    color: #444;
    word-break: break-word; /* Prevent long names pushing width */
}

@media (max-width: 1024px) {
    .rs-5af5a071-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 cols tablet */
    }
}

@media (max-width: 768px) {
    .rs-5af5a071-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cols mobile */
        gap: 15px;
    }
    
    .rs-5af5a071-modal-body {
        padding: 20px;
    }
}