/*-------------------------------------------------------------------------*/
/* Armory
/*-------------------------------------------------------------------------*/
/*.box.type-armory {}*/

/* Armory: Subbody
/*---------------------------------------------------------------*/
.box.type-armory {
	/* Allow dropdowns to overflow the box container */
	overflow: visible !important;
}

.box.type-armory .page-subbody {
	padding: 2rem !important;
	background: rgba(52, 73, 94, 0.9);
	border-radius: 12px;
	backdrop-filter: blur(10px);
	border: 1px solid rgba(116, 185, 255, 0.2);
	
	/* Critical: Allow dropdowns to overflow this container */
	overflow: visible !important;
}

/* Armory: Fields
/*---------------------------------------------------------------*/
.box.type-armory .input-group {
	gap: var(--margin-primary);

	-webkit-box-orient: vertical;
	-webkit-box-direction: normal;
	-ms-flex-direction: column;
	flex-direction: column;
	
	/* Ensure dropdowns are contained within armory box */
	position: relative;
	z-index: 1;
}

.box.type-armory .input-group > * {
	width: 100%;
	margin: 0 !important;
	
	/* Individual field containers for dropdown positioning */
	position: relative;
}

/* Armory: Selectbox Dropdown Containment
/*---------------------------------------------------------------*/
.box.type-armory .sbHolder {
	/* Ensure proper stacking context */
	position: relative;
	z-index: 2;
}

.box.type-armory .sbHolder .sbOptions {
	/* CRITICAL: High z-index to appear above everything */
	z-index: 99999 !important;
	
	/* Allow reasonable dropdown height but prevent footer overlap */
	max-height: min(150px, 25vh) !important;
	
	/* Use absolute positioning to break out of container flow */
	position: absolute !important;
	
	/* Smart positioning: open upward when near bottom of viewport */
	top: auto !important;
	bottom: 100% !important;
	left: 0 !important;
	right: auto !important;
	
	/* Ensure full width of parent */
	width: 100% !important;
	
	/* Force visibility - override any parent overflow */
	visibility: visible !important;
	clip: auto !important;
	clip-path: none !important;
	
	/* Enhanced shadow for better visual separation */
	box-shadow: 
		0 -8px 32px rgba(0, 0, 0, 0.5),
		0 -4px 16px rgba(0, 0, 0, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
	
	/* Strong border for definition */
	border: 2px solid rgba(116, 185, 255, 0.4) !important;
	
	/* Ensure background is opaque */
	background-color: var(--field-background-color) !important;
}

/* Additional insurance for dropdown positioning */

/* Ensure dropdown items are always clickable */
.box.type-armory .sbHolder .sbOptions li {
	/* Force visibility of all dropdown items */
	position: relative !important;
	z-index: 1 !important;
	pointer-events: auto !important;
}

.box.type-armory .sbHolder .sbOptions li a {
	/* Ensure links are clickable */
	pointer-events: auto !important;
	cursor: pointer !important;
}

/* Armory: Table
/*---------------------------------------------------------------*/
/*.box.type-armory .dataTables_wrapper {}*/

.box.type-armory .dataTables_wrapper .row + .row + .row {
	margin: var(--margin-primary) 0 0 0;

	text-align: center;

	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
}

.box.type-armory .dataTables_wrapper .row + .row + .row > div {
	padding-left: 0;
	padding-right: 0;
}

.box.type-armory .dataTables_wrapper .row + .row + .row .dataTables_info {
	padding: 0;
}

.box.type-armory .dataTables_wrapper .row + .row + .row .dataTables_paginate {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
}

.box.type-armory .dataTables_wrapper .row + .row + .row .dataTables_paginate .pagination {
	margin: 0 auto;
}

/* Armory: Responsive
/*---------------------------------------------------------------*/
@media screen and (min-width: 768px) { /* Desktop */
	/*.box.type-armory {}*/

	/* Armory: Fields
	/*---------------------------------------------------------------*/
	.box.type-armory .input-group {
		-ms-flex-wrap: nowrap;
		flex-wrap: nowrap;

		-webkit-box-orient: horizontal;
		-webkit-box-direction: normal;
		-ms-flex-direction: row;
		flex-direction: row;
	}

	.box.type-armory .input-group > * {
		width: -webkit-calc(100% / 3);
		width: -moz-calc(100% / 3);
		width: calc(100% / 3);
	}

	.box.type-armory .input-group button {
		width: auto;
	}

	/* Armory: Table
	/*---------------------------------------------------------------*/
	.box.type-armory .dataTables_wrapper .row + .row + .row {
		text-align: left;
	}

	.box.type-armory .dataTables_wrapper .row + .row + .row .dataTables_paginate .pagination {
		margin-left: auto;
		margin-right: 0;
	}
}