/**
 * Shipping address add/edit page.
 */
.oten-address-form-page {
	display: flex;
	justify-content: center;
	padding: 24px 16px 40px;
}

.oten-address-form {
	box-sizing: border-box;
	width: 100%;
	max-width: 560px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.oten-address-form__body {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 20px 16px;
	background: #fff;
}

.oten-address-form__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.oten-address-form__field label,
.oten-address-form__field .oten-address-form__label {
	font-family: IRANYekanX, Tahoma, sans-serif;
	font-size: 12px;
	color: #898989;
}

.oten-address-form__field input,
.oten-address-form__field textarea {
	box-sizing: border-box;
	width: 100%;
	border: 1px solid #e5e5e5;
	padding: 12px 14px;
	background: #fff;
	font-family: Kalameh, IRANYekanX, Tahoma, sans-serif;
	font-size: 13px;
	color: var(--oten-ink);
	border-radius: 0;
	appearance: none;
}

.oten-address-form__field textarea {
	resize: vertical;
	font-family: IRANYekanX, Tahoma, sans-serif;
	line-height: 1.6;
}

.oten-address-form__field input:focus-visible,
.oten-address-form__field textarea:focus-visible {
	outline: 2px solid var(--oten-brand);
	outline-offset: -1px;
}

/* Custom select (replaces native <select> for province + city). */
.oten-custom-select {
	position: relative;
	width: 100%;
}

.oten-custom-select__trigger {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	border: 1px solid #e5e5e5;
	padding: 12px 14px;
	background: #fff;
	font-family: Kalameh, IRANYekanX, Tahoma, sans-serif;
	font-size: 13px;
	color: var(--oten-ink);
	cursor: pointer;
	text-align: start;
}

.oten-custom-select__trigger:disabled {
	background: #f7f7f7;
	color: #b3b3b3;
	cursor: not-allowed;
}

.oten-custom-select__trigger:focus-visible {
	outline: 2px solid var(--oten-brand);
	outline-offset: -1px;
}

.oten-custom-select__trigger[aria-expanded='true'] {
	border-color: var(--oten-brand);
}

.oten-custom-select__trigger.has-error {
	border-color: #e02424;
}

.oten-custom-select__value {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.oten-custom-select__value.is-placeholder {
	color: #b3b3b3;
}

.oten-custom-select__chevron {
	display: inline-flex;
	flex-shrink: 0;
	color: #898989;
	transition: transform 0.18s ease;
}

.oten-custom-select__trigger[aria-expanded='true'] .oten-custom-select__chevron {
	transform: rotate(180deg);
	color: var(--oten-brand);
}

.oten-custom-select__dropdown {
	position: absolute;
	inset-inline: 0;
	top: calc(100% + 6px);
	z-index: 30;
	border: 1px solid #e5e5e5;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.oten-custom-select__list {
	list-style: none;
	margin: 0;
	padding: 6px;
	max-height: 240px;
	overflow-y: auto;
}

.oten-custom-select__option {
	padding: 10px 12px;
	font-family: IRANYekanX, Tahoma, sans-serif;
	font-size: 13px;
	color: var(--oten-ink);
	cursor: pointer;
	border-radius: 2px;
}

.oten-custom-select__option:hover,
.oten-custom-select__option.is-highlighted {
	background: #fafafa;
}

.oten-custom-select__option.is-selected {
	background: #f6ecef;
	color: var(--oten-brand);
	font-weight: 500;
}

.oten-custom-select__option:focus-visible {
	outline: 2px solid var(--oten-brand);
	outline-offset: -2px;
}

.oten-custom-select__error {
	margin: 0;
	font-family: IRANYekanX, Tahoma, sans-serif;
	font-size: 12px;
	color: #e02424;
}

.oten-address-form__submit {
	width: 100%;
	padding: 14px 16px;
	border: 0;
	background: var(--oten-brand);
	font-family: Kalameh, IRANYekanX, Tahoma, sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.oten-address-form__submit:hover,
.oten-address-form__submit:focus-visible {
	background: var(--oten-brand-dark);
}

.oten-address-form__submit.is-loading {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	pointer-events: none;
}

.oten-address-form__submit.is-loading::before {
	content: '';
	display: block;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: oten-address-form-spin 0.7s linear infinite;
}

@keyframes oten-address-form-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (min-width: 768px) {
	.oten-address-form-page {
		padding: 40px 16px 64px;
	}

	.oten-address-form__body {
		padding: 24px;
	}
}
