function add_trigger_uniques(){

    let container = document.createElement('div');
	container.style.fontSize = '30px';
	container.style.paddingLeft = '25px';

   // Title container for stacking
var titleContainer = document.createElement('div');
titleContainer.style.textAlign = 'left';

// Main Title
var sectionTitle = document.createElement('h2');
sectionTitle.textContent = 'Add Uniques Trigger';
titleContainer.appendChild(sectionTitle);

// Subtitle
var subtitle = document.createElement('h2');
subtitle.textContent = "This tracks unique new numbers in a row that you set, add a comma like this 3,12,23,32";
subtitle.style.fontWeight = 'normal';  // lighter than main title
subtitle.style.fontSize = '1.2em';     // smaller size
subtitle.style.marginTop = '0';
titleContainer.appendChild(subtitle);

container.appendChild(titleContainer);

let section_outside_bets = uniques_bet_section();
container.appendChild(section_outside_bets);

return container;
}

function uniques_bet_section() {
    let container = document.createElement('div');

    // Make container stack vertically and center items
    container.style.display = 'flex';
    container.style.flexDirection = 'column';
    container.style.alignItems = 'center';
    container.style.gap = '20px'; // spacing between elements
    container.style.fontSize = '36px';
    container.style.padding = '20px';

    var uniqueSpins = document.createElement('input');
    style_textbox_container(uniqueSpins);
    uniqueSpins.type = 'text';
    uniqueSpins.id = "triggerUniques";
    uniqueSpins.name = "triggerUniques";
    uniqueSpins.style.width = '140px';
    uniqueSpins.style.height = '70px';
    uniqueSpins.style.fontSize = '36px';
    uniqueSpins.style.textAlign = 'center';
    uniqueSpins.style.borderRadius = '12px';
    uniqueSpins.style.border = '2px solid #ccc';
    container.appendChild(uniqueSpins);

    // Label
    var uniqueLabel = document.createElement('label');
    uniqueLabel.htmlFor = 'triggerUniques';
    uniqueLabel.appendChild(document.createTextNode('Unique numbers in a row'));
    uniqueLabel.style.fontSize = '36px';
    container.appendChild(uniqueLabel);

    // Apply Button
    const unique_trigger_button = document.createElement('button');
    style_form_button(unique_trigger_button);
    unique_trigger_button.id = "triggerUniquesButtons";
    unique_trigger_button.innerText = "Add Trigger";
    unique_trigger_button.style.fontSize = '36px';
    unique_trigger_button.style.height = '70px';
    unique_trigger_button.style.minWidth = '320px';
    unique_trigger_button.style.padding = '0 40px';
    unique_trigger_button.style.borderRadius = '12px';
    unique_trigger_button.style.textAlign = 'center';
    unique_trigger_button.style.cursor = 'pointer';
    unique_trigger_button.style.boxSizing = 'border-box';
    unique_trigger_button.style.whiteSpace = 'nowrap';
    unique_trigger_button.addEventListener('click', function () {
        uniqueBetSelectionAddTrigger();
        displayTriggerPanel();
    });
    container.appendChild(unique_trigger_button);

    return container;
}





function uniqueBetSelectionAddTrigger() {
	
	var losses = parseInt(document.getElementById('triggerUniques').value);
	if (isNaN(losses) || losses < 1) {
		losses = 7;
		document.getElementById('triggerUniques').value = 7;
	}

	var triggerOption = "Uniques";

	const indexFound = triggerListLoss.findIndex((value, index) => value === losses && triggerListItem[index] === triggerOption);

	const itemFound = indexFound !== -1;

	if (!itemFound) {
		addTriggerToTriggersList(losses, 'Uniques', 'Uniques',"-");

	}

}