.update-address-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(4px);
	z-index: 999999;
}

.update-address-modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #ffffff;
	border-radius: 18px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
	width: min(920px, 94vw);
	max-height: 92vh;
	overflow: hidden;
	z-index: 999999;
	display: flex;
	flex-direction: column;
}

.update-address-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px 12px;
	overflow-x: auto;
	overflow-y: auto;
}

.update-address-header {
	display: flex;
	align-items: center;
	gap: 8px;
}

.update-address-header-texts {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.update-address-header-title {
	color: #4b2991;
	font-weight: 700;
}

.update-address-header-subtitle {
	color: #6f6f6f;
	font-size: 0.85rem;
}

.update-address-section {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.update-address-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.update-address-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.update-address-label {
	color: #4b2991;
	font-weight: 600;
	font-size: 0.85rem;
}

.update-address-label-star {
	color: #e4002b;
}

.update-address-input,
.update-address-select {
	border: 1px solid #1e1e1e;
	border-radius: 10px;
	padding: 6px 8px;
	outline: none;
	font-size: 0.9rem;
	background: #ffffff;
}

.update-address-input:focus,
.update-address-select:focus {
	border-color: #4b2991;
}

.update-address-field-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.update-address-field-row .update-address-input,
.update-address-field-row .update-address-select-wrapper {
	flex: 1;
}

.update-address-field-icon {
	font-size: 1rem;
	color: #2e7d32;
}

.update-address-field-icon.is-edit {
	color: #4b2991;
}

.update-address-select-wrapper {
	display: flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #4b2991;
	border-radius: 10px;
	padding: 4px 6px;
	background: #ffffff;
	position: relative;
}

.update-address-country-wrapper {
	padding: 4px 6px;
	width: 100%;
}

.update-address-region-wrapper {
	flex-direction: column;
	align-items: stretch;
}

.update-address-country-button {
	border: none;
	background: transparent;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	color: #4b2991;
	font-weight: 600;
}

.update-address-select-input {
	border: none;
	background: transparent;
	outline: none;
	font-size: 0.9rem;
	color: #4b2991;
	width: 100%;
}

.update-address-arrow {
	margin-left: auto;
	color: #4b2991;
	font-size: 0.8rem;
}

.update-address-dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	background: #ffffff;
	border: 1px solid #4b2991;
	border-radius: 10px;
	box-shadow: 0 12px 24px rgba(0,0,0,0.18);
	padding: 6px;
	display: none;
	flex-direction: column;
	gap: 4px;
	z-index: 10;
	min-width: 180px;
	max-height: 220px;
	overflow-y: auto;
	overflow-x: auto;
	white-space: nowrap;
}

.update-address-dropdown.is-open {
	display: flex;
}

.update-address-dropdown-option {
	border: none;
	background: transparent;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 6px;
	border-radius: 8px;
	cursor: pointer;
	color: #4b2991;
	font-weight: 600;
}

.update-address-dropdown-option:hover {
	background: rgba(75,41,145,0.12);
}

.update-address-hint {
	font-size: 0.78rem;
	color: #7a7a7a;
	font-style: italic;
	margin-top: 4px;
}

.update-address-suggest {
	display: none;
	flex-direction: column;
	gap: 4px;
	margin-top: 4px;
	border: 1px solid rgba(75,41,145,0.25);
	border-radius: 10px;
	background: #ffffff;
	max-height: 180px;
	overflow-y: auto;
	overflow-x: hidden;
	box-shadow: 0 8px 20px rgba(0,0,0,0.12);
	padding: 6px;
}

.update-address-suggest.is-open {
	display: flex;
}

.update-address-suggest-item {
	border: none;
	background: transparent;
	text-align: left;
	padding: 6px 8px;
	border-radius: 8px;
	cursor: pointer;
	color: #4b2991;
	font-weight: 600;
}

.update-address-suggest-item:hover {
	background: rgba(75,41,145,0.12);
}

.update-address-flag {
	width: 24px;
	height: 18px;
	object-fit: cover;
	border-radius: 3px;
}

.update-address-street-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}

.update-address-badge {
	background: rgba(0, 128, 0, 0.2);
	color: #008000;
	border-radius: 8px;
	padding: 2px 6px;
	font-size: 0.7rem;
}

.update-address-default-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	position: relative;
	flex-wrap: wrap;
}

.update-address-default-text {
	color: #000000;
	text-decoration: underline;
	cursor: pointer;
}

.update-address-tooltip {
	position: absolute;
	top: -44px;
	left: 0;
	background: #ffffff;
	color: #4b2991;
	border: 1px solid #4b2991;
	border-radius: 10px;
	padding: 6px 8px;
	font-size: 0.75rem;
	display: none;
	gap: 6px;
	align-items: center;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.update-address-tooltip.is-visible {
	display: inline-flex;
}

.update-address-loading {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.95);
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 20px;
	z-index: 20;
}

.update-address-loading.is-visible {
	display: flex;
}

.update-address-loading-spinner {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 4px solid rgba(75,41,145,0.2);
	border-top-color: #4b2991;
	animation: updateAddressSpin 0.9s linear infinite;
}

.update-address-loading-text {
	font-weight: 600;
	color: #4b2991;
	text-align: center;
}

.update-address-loading-suggestions {
	width: 100%;
	max-width: 520px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.update-address-loading-title {
	font-weight: 700;
	color: #4b2991;
}

.update-address-loading-empty {
	color: #888;
	font-size: 0.9rem;
}

@keyframes updateAddressSpin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.update-address-switch-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.update-address-switch-label {
	color: #4b2991;
	font-weight: 600;
}

.update-address-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 22px;
}

.update-address-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.update-address-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #cfcfcf;
	transition: 0.2s;
	border-radius: 999px;
}

.update-address-slider::before {
	position: absolute;
	content: '';
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background-color: #ffffff;
	transition: 0.2s;
	border-radius: 50%;
}

.update-address-switch input:checked + .update-address-slider {
	background-color: #4b2991;
}

.update-address-switch input:checked + .update-address-slider::before {
	transform: translateX(20px);
}

.update-address-actions {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding-top: 4px;
}

.update-address-btn {
	border: none;
	border-radius: 8px;
	padding: 6px 10px;
	cursor: pointer;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.update-address-btn-primary {
	background-color: #4b2991;
	color: white;
}

.update-address-btn-secondary {
	background: rgba(128, 128, 128, 0.51);
	color: black;
}

.update-address-btn.is-disabled {
	opacity: 0.55;
	pointer-events: none;
}

.update-address-group.has-error .update-address-input,
.update-address-group.has-error .update-address-select-input,
.update-address-group.has-error .update-address-select-wrapper {
	border-color: #ff2d2d;
}

.update-address-error {
	color: #ff2d2d;
	font-size: 0.78rem;
	margin-top: 4px;
}

@media (max-width: 900px) {
	.update-address-grid {
		grid-template-columns: 1fr;
	}

	.update-address-btn {
		width: 100%
	}
}

@media (max-width: 600px) {
	.update-address-modal {
		width: 100vw;
		height: 100vh;
		max-height: 100vh;
		border-radius: 0;
	}
}
