/* Styles extracted from Amazon Authorization View */
.momcs-auth-container {
	padding: 20px;
	background-color: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	text-align: left;
	max-width: 800px;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.momcs-auth-container > h2 {
	text-align: left;
	margin-top: 0;
}

/* Heading with tooltip: title and info icon side by side */
.momcs-auth-title-with-tooltip {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 20px;
}

/* Tooltip beside heading (reuse admin.css pattern; ensure it works if admin.css loads after) */
.momcs-auth-container .momcs-field-tooltip-wrapper {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	margin-left: 0;
}

.momcs-auth-container .momcs-field-tooltip-icon {
	font-size: 18px;
	color: #787c82;
	cursor: help;
	transition: color 0.2s ease;
}

.momcs-auth-container .momcs-field-tooltip-icon:hover {
	color: #ea580c;
}

.momcs-auth-container .momcs-field-tooltip {
	visibility: hidden;
	opacity: 0;
	position: absolute;
	z-index: 1000;
	bottom: calc(100% + 8px);
	left: 0;
	width: 280px;
	max-width: 90vw;
	padding: 10px 12px;
	background-color: #1d2327;
	color: #fff;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.45;
	text-align: left;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: visibility 0.2s ease, opacity 0.2s ease;
	white-space: normal;
}

.momcs-auth-container .momcs-field-tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 16px;
	margin-left: 0;
	border-width: 6px;
	border-style: solid;
	border-color: #1d2327 transparent transparent transparent;
}

.momcs-auth-container .momcs-field-tooltip-wrapper:hover .momcs-field-tooltip {
	visibility: visible;
	opacity: 1;
}

.momcs-auth-form-group {
	margin-bottom: 20px;
}

.momcs-auth-label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
}

/* Match momcs-price-markup-input / form-field-input look and feel */
.momcs-auth-input {
	width: 50% !important;
	max-width: 100% !important;
	padding: 7px 14px !important;
	border: 1.5px solid #e2e8f0 !important;
	border-radius: 10px !important;
	font-size: 14px !important;
	color: #1e293b !important;
	background-color: #fff !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
	height: auto !important;
	line-height: 1.5 !important;
	-webkit-appearance: none;
	appearance: none;
}

.momcs-auth-input:focus {
	border-color: #f97316 !important;
	box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12) !important;
	outline: none !important;
}

.momcs-auth-input:hover {
	border-color: #cbd5e1 !important;
}

/* Select: dropdown arrow (same as momcs-price-markup-select) */
.momcs-auth-container select.momcs-auth-input {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2.22 4.47a.75.75 0 0 1 1.06 0L6 7.19l2.72-2.72a.75.75 0 1 1 1.06 1.06L6.53 8.78a.75.75 0 0 1-1.06 0L2.22 5.53a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	background-size: 12px !important;
	padding-right: 36px !important;
}

.momcs-auth-description-small {
	margin-top: 5px;
	font-size: 12px;
	color: #666;
}

.required {
	color: #dc3232;
}

.momcs-auth-button-container {
	margin: 20px 0;
}

.momcs-auth-success {
	display: flex;
	align-items: center;
	color: #46b450;
	font-weight: bold;
}

.momcs-auth-success .dashicons {
	font-size: 24px;
	margin-right: 10px;
	background-color: #46b450;
	color: #fff;
	border-radius: 50%;
}

#momcs-auth-loader {
	text-align: center;
	margin: 20px 0;
}

.momcs-auth-loader-spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #3498db;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	animation: spin 2s linear infinite;
	margin: 0 auto 10px;
}

.momcs-auth-next-steps {
	margin-top: 20px;
	text-align: center;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Error highlight styling reused from mapping view. */
.momcs-auth-input.momcs-mapping-field-error {
	border: 2px solid #d63638 !important;
	background-color: #fbeaea !important;
}

/* Custom searchable region dropdown (matches product search pattern). */
.momcs-region-search-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	height: 36px;
	width: 400px;
	max-width: 100%;
	box-sizing: border-box;
	cursor: text;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.momcs-region-search-wrapper:hover {
	border-color: #b4b4b4;
}

.momcs-region-search-wrapper:focus-within {
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.momcs-region-search-icon {
	flex-shrink: 0;
	color: #9ca3af;
}

.momcs-region-chevron {
	flex-shrink: 0;
	color: #9ca3af;
	transition: transform 0.15s ease-in-out;
}

.momcs-region-search-wrapper:focus-within .momcs-region-chevron {
	transform: rotate(180deg);
}

.momcs-region-search-input {
	flex: 1;
	height: 28px;
	min-width: 0;
	padding: 0 2px;
	font-size: 13px;
	color: #1f2937;
	background: transparent;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	box-sizing: border-box;
}

.momcs-region-search-input::placeholder {
	color: #9ca3af;
	font-size: 13px;
}

.momcs-region-search-dropdown {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	max-height: 280px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: all 0.15s ease-in-out;
}

.momcs-region-search-dropdown.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.momcs-region-result-item {
	padding: 8px 12px;
	font-size: 13px;
	color: #1f2937;
	cursor: pointer;
	transition: background 0.1s ease-in-out;
}

.momcs-region-result-item:hover,
.momcs-region-result-item.is-focused {
	background: #f0f4f8;
}

.momcs-region-result-item:first-child {
	border-radius: 8px 8px 0 0;
}

.momcs-region-result-item:last-child {
	border-radius: 0 0 8px 8px;
}

.momcs-region-result-item + .momcs-region-result-item {
	border-top: 1px solid #f0f0f0;
}

.momcs-region-no-results {
	padding: 12px;
	text-align: center;
	color: #9ca3af;
	font-size: 13px;
}

/* Flag icons inside dropdown items and selected state. */
.momcs-region-result-item .fi,
.momcs-region-selected-flag .fi {
	margin-right: 6px;
	vertical-align: middle;
	font-size: 16px;
}

.momcs-region-selected-flag {
	flex-shrink: 0;
	line-height: 1;
}

/* Error state for the custom region wrapper. */
.momcs-region-search-wrapper.momcs-region-error {
	border: 2px solid #d63638 !important;
	background-color: #fbeaea !important;
}