/*
 * Tourmaster - International Phone Prefix field
 * Minimalist styling that blends with the existing booking form fields.
 * Colours/borders are copied from the native input at runtime (see phone-intl.js),
 * so this file only defines layout and the dropdown panel.
 */

.tm-phone-intl{
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	box-sizing: border-box;
	overflow: visible;
	gap: 8px;
}

/* the visible local-number input keeps its own native border/box */
.tm-phone-intl .tm-phone-local{
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0;
}

/* the flag + dial-code selector - its OWN small outlined box, matching the input */
.tm-phone-intl .tm-phone-selector{
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	gap: 7px;
	padding: 0 12px;
	margin: 0;
	background: transparent;
	border: 2px solid rgba(0,0,0,0.12);
	border-radius: 0;
	cursor: pointer;
	font-size: 13px;
	line-height: 1;
	white-space: nowrap;
	outline: none;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}
.tm-phone-intl .tm-phone-selector:focus{ outline: none; }
.tm-phone-intl .tm-phone-flag{ font-size: 19px; line-height: 1; }
.tm-phone-intl .tm-phone-code{ font-weight: 500; }
.tm-phone-intl .tm-phone-caret{
	display: inline-block;
	width: 0; height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	opacity: 0.45;
	margin-left: 1px;
	transition: transform 0.15s ease;
}
.tm-phone-intl.tm-open .tm-phone-caret{ transform: rotate(180deg); }

/* dropdown panel - drops under the selector box */
.tm-phone-intl .tm-phone-panel{
	position: absolute;
	top: 100%;
	left: 0;
	right: auto;
	min-width: 320px;
	max-width: 92vw;
	z-index: 99999;
	margin-top: 5px;
	background: #ffffff;
	color: #333333;
	border: 1px solid rgba(0,0,0,0.12);
	box-shadow: 0 8px 28px rgba(0,0,0,0.14);
	max-height: 330px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.tm-phone-intl .tm-phone-list{
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.tm-phone-intl .tm-phone-item{
	display: flex;
	align-items: center;
	gap: 11px;
	margin: 0 !important;
	padding: 9px 13px !important;
	border: 0 !important;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.3;
}
.tm-phone-intl .tm-phone-item.tm-selected{ background: rgba(0,0,0,0.035); }
.tm-phone-intl .tm-phone-item:hover,
.tm-phone-intl .tm-phone-item.tm-active{ background: rgba(0,0,0,0.08); }
.tm-phone-intl .tm-phone-item-flag{ font-size: 19px; flex: 0 0 auto; line-height: 1; }
.tm-phone-intl .tm-phone-name{ flex: 1 1 auto; color: #333333; }
.tm-phone-intl .tm-phone-native{ color: #9b9b9b; font-weight: 400; margin-left: 7px; }
.tm-phone-intl .tm-phone-item-code{ flex: 0 0 auto; color: #9b9b9b; }

/* mirror the theme's required-field error state onto both boxes */
.tm-phone-intl.tourmaster-validate-error .tm-phone-selector,
.tm-phone-intl.tourmaster-validate-error .tm-phone-local{ border-color: #e25555 !important; }

/* RTL: selector sits to the right of the input (flex order handles the gap) */
.rtl .tm-phone-intl .tm-phone-native{ margin-left: 0; margin-right: 7px; }
