/**
 * Company Type Dropdown Styles
 *
 * Styles for the company type dropdown shortcode with Select2 integration
 * Matches Arival brand design system
 *
 * @package bricks-arival
 */

/* ============================================
   Wrapper and Label
   ============================================ */

.company-type-dropdown-wrapper {
	margin-bottom: 24px;
	width: 100%;
	/* Initial state: hidden until Select2 is applied (JS will fade in) */
	opacity: 0;
}

.company-type-dropdown-wrapper.select2-initialized {
	/* Visible after initialization */
	opacity: 1;
	transition: opacity 0.3s ease-in-out;
}

.company-type-dropdown-label {
	display: block;
	font-weight: 700;
	font-size: 15px;
	color: #0E3C52;
	margin-bottom: 8px;
	line-height: 1.4;
}

/* ============================================
   Select2 Container Styling
   ============================================ */

.company-type-dropdown-container.select2-container {
	width: 100% !important;
	max-width: 100%;
}

.company-type-dropdown-container.select2-container--default .select2-selection--single {
	height: 48px;
	border-radius: 24px;
	border: 1px solid #9aa5b1;
	background-color: #ffffff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	padding: 0 4px;
}

.company-type-dropdown-container.select2-container--default .select2-selection--single:hover {
	border-color: #208490;
}

.company-type-dropdown-container.select2-container--default .select2-selection--single:focus,
.company-type-dropdown-container.select2-container--default.select2-container--focus .select2-selection--single {
	border-color: #208490;
	box-shadow: 0 0 0 2px rgba(32, 132, 144, 0.1);
	outline: none;
}

.company-type-dropdown-container.select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 46px;
	padding-left: 20px;
	padding-right: 60px;
	color: #61637c;
	font-size: 15px;
}

.company-type-dropdown-container.select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: #9aa5b1;
}

.company-type-dropdown-container.select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 46px;
	right: 8px;
	top: 0;
	width: 24px;
}

.company-type-dropdown-container.select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: #61637c transparent transparent transparent;
	border-style: solid;
	border-width: 6px 6px 0 6px;
	height: 0;
	left: 50%;
	margin-left: -6px;
	margin-top: -3px;
	position: absolute;
	top: 50%;
	width: 0;
}

/* ============================================
   Select2 Dropdown Styling
   ============================================ */

.company-type-dropdown-select2.select2-dropdown {
	border: 1px solid #9aa5b1;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	margin-top: 8px;
	overflow: hidden;
}

.company-type-dropdown-select2.select2-dropdown .select2-search--dropdown {
	padding: 12px;
}

.company-type-dropdown-select2.select2-dropdown .select2-search--dropdown .select2-search__field {
	border: 1px solid #9aa5b1;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 15px;
	width: 100%;
}

.company-type-dropdown-select2.select2-dropdown .select2-search--dropdown .select2-search__field:focus {
	border-color: #208490;
	box-shadow: 0 0 0 2px rgba(32, 132, 144, 0.1);
	outline: none;
}

.company-type-dropdown-select2.select2-dropdown .select2-results__option {
	padding: 14px 20px;
	font-size: 15px;
	color: #0E3C52;
	line-height: 1.4;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.company-type-dropdown-select2.select2-dropdown .select2-results__option[aria-selected="true"] {
	background-color: #f4f5f8;
	color: #0E3C52;
}

.company-type-dropdown-select2.select2-dropdown .select2-results__option--highlighted[aria-selected] {
	background-color: #208490;
	color: #ffffff;
}

.company-type-dropdown-select2.select2-dropdown .select2-results__option[role="group"] {
	padding: 0;
}

.company-type-dropdown-select2.select2-dropdown .select2-results__option[role="group"] .select2-results__group {
	padding: 8px 16px;
	font-weight: 700;
	font-size: 13px;
	color: #61637c;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.company-type-dropdown-select2.select2-dropdown .select2-results__message {
	padding: 12px 16px;
	color: #61637c;
	font-size: 15px;
}

/* ============================================
   Clear Button (when allowClear is true)
   ============================================ */

.company-type-dropdown-container.select2-container--default .select2-selection--single .select2-selection__clear {
    color: #fff;
    cursor: pointer;
    float: right;
    font-weight: 700;
    margin-right: 30px;
    opacity: .6;
    transition: opacity .2s ease;
    padding: 1px 4px 2px 4px !important;
    line-height: 1;
    border-radius: 999px;
    top: 50%;
    transform: translateY(-50%);
    background: #7a7a7a;
	position: absolute;
    right: 0;
}

.company-type-dropdown-container.select2-container--default .select2-selection--single .select2-selection__clear:hover {
	opacity: 1;
	color: #208490;
}

/* ============================================
   Error State
   ============================================ */

.company-type-dropdown-wrapper.error .company-type-dropdown-container.select2-container--default .select2-selection--single {
	border-color: #ffa5a5;
	box-shadow: 0 0 3px #ffbfbf;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
	.company-type-dropdown-wrapper {
		margin-bottom: 20px;
	}

	.company-type-dropdown-label {
		font-size: 14px;
		margin-bottom: 6px;
	}

	.company-type-dropdown-container.select2-container--default .select2-selection--single {
		height: 44px;
		border-radius: 22px;
	}

	.company-type-dropdown-container.select2-container--default .select2-selection--single .select2-selection__rendered {
		line-height: 42px;
		padding-left: 18px;
		padding-right: 54px;
		font-size: 14px;
	}

	.company-type-dropdown-container.select2-container--default .select2-selection--single .select2-selection__arrow {
		height: 42px;
		right: 6px;
		width: 20px;
	}

	.company-type-dropdown-container.select2-container--default .select2-selection--single .select2-selection__clear {
		right: 28px;
		font-size: 16px;
	}

	.company-type-dropdown-select2.select2-dropdown {
		border-radius: 10px;
		margin-top: 6px;
	}

	.company-type-dropdown-select2.select2-dropdown .select2-results__option {
		padding: 12px 16px;
		font-size: 14px;
	}
}

/* ============================================
   Accessibility
   ============================================ */

.company-type-dropdown-container.select2-container--default .select2-selection--single:focus-visible {
	outline: 2px solid #208490;
	outline-offset: 2px;
}

.company-type-dropdown-select2.select2-dropdown .select2-results__option:focus {
	outline: 2px solid #208490;
	outline-offset: -2px;
}

/* Screen reader only text */
.company-type-dropdown-wrapper .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

