.add-address-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(4px);
	z-index: 999999;
}

.add-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;
}

.add-address-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px 12px;
	overflow-x: auto;
	overflow-y: auto;
}

.add-address-loading {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
}

.add-address-loading.is-visible {
	display: flex;
}

.add-address-loading-spinner {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 4px solid rgba(75,41,145,0.2);
	border-top-color: #4b2991;
	animation: add-address-spin 0.8s linear infinite;
}

.add-address-loading-text {
	color: #4b2991;
	font-weight: 600;
}

.add-address-loading-title {
	color: #4b2991;
	font-weight: 600;
	margin-bottom: 6px;
}

.add-address-loading-suggestions {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

@keyframes add-address-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.add-address-header {
	display: flex;
	align-items: center;
	gap: 8px;
}

.add-address-header-texts {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.add-address-header-title {
	color: #4b2991;
	font-weight: 700;
}

.add-address-header-subtitle {
	color: #6f6f6f;
	font-size: 0.85rem;
}

.add-address-section {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.add-address-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.add-address-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.add-address-label {
	color: #4b2991;
	font-weight: 600;
	font-size: 0.85rem;
}

.add-address-label-star {
	color: #e4002b;
}

.add-address-input,
.add-address-select {
	border: 1px solid #1e1e1e;
	border-radius: 10px;
	padding: 6px 8px;
	outline: none;
	font-size: 0.9rem;
	background: #ffffff;
}

.add-address-select-wrapper .add-address-select {
	border: none;
	padding: 0;
	background: transparent;
	outline: none;
	width: 100%;
}

.add-address-input:focus,
.add-address-select:focus {
	border-color: #4b2991;
}

.add-address-phone-row {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 6px;
}

.add-address-select-wrapper {
	display: flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #4b2991;
	border-radius: 10px;
	padding: 4px 6px;
	background: #ffffff;
	position: relative;
}

.add-address-flag-only {
	padding: 4px;
	width: fit-content;
}

.add-address-country-wrapper {
	padding: 4px 6px;
	width: 100%;
}

.add-address-region-wrapper {
	flex-direction: column;
	align-items: stretch;
}

.add-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;
}

.add-address-select-input {
	border: none;
	background: transparent;
	outline: none;
	font-size: 0.9rem;
	color: #4b2991;
	width: 100%;
}

.add-address-arrow {
	margin-left: auto;
	color: #4b2991;
	font-size: 0.8rem;
}

.add-address-country-name {
	text-align: left;
}

.add-address-flag-button {
	border: none;
	background: transparent;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
}

.add-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;
}

.add-address-dropdown.is-open {
	display: flex;
}

.add-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;
}

.add-address-dropdown-option:hover {
	background: rgba(75,41,145,0.12);
}

.add-address-hint {
	font-size: 0.78rem;
	color: #7a7a7a;
	font-style: italic;
	margin-top: 4px;
}

.add-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;
}

.add-address-suggest.is-open {
	display: flex;
}

.add-address-suggest-item {
	border: none;
	background: transparent;
	text-align: left;
	padding: 6px 8px;
	border-radius: 8px;
	cursor: pointer;
	color: #4b2991;
	font-weight: 600;
}

.add-address-suggest-item:hover {
	background: rgba(75,41,145,0.12);
}

.add-address-flag {
	width: 24px;
	height: 18px;
	object-fit: cover;
	border-radius: 3px;
}

.add-address-phone-input {
	display: flex;
	align-items: center;
	gap: 4px;
	border: 1px solid #1e1e1e;
	border-radius: 10px;
	padding: 4px 6px;
}

.add-address-counter {
	font-size: 0.75rem;
	color: #4b2991;
	font-weight: 600;
	margin-left: auto;
}

.add-address-phone-input .add-address-input {
	border: none;
	padding: 0;
	background: transparent;
	outline: none;
}

.add-address-phone-input:focus-within {
	border-color: #4b2991;
}

.add-address-prefix {
	color: #4b2991;
	font-weight: 600;
	font-size: 0.85rem;
}

.add-address-street-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}

.add-address-badge {
	background: rgba(0, 128, 0, 0.2);
	color: #008000;
	border-radius: 8px;
	padding: 2px 6px;
	font-size: 0.7rem;
}

.add-address-default-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	position: relative;
	flex-wrap: wrap;
}

.add-address-default-text {
	color: #000000;
	text-decoration: underline;
	cursor: pointer;
}

.add-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);
}

.add-address-tooltip.is-visible {
	display: inline-flex;
}

.add-address-switch-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.add-address-switch-label {
	color: #4b2991;
	font-weight: 600;
}

.add-address-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 22px;
}

.add-address-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.add-address-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #cfcfcf;
	transition: 0.2s;
	border-radius: 999px;
}

.add-address-slider::before {
	position: absolute;
	content: '';
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background-color: #ffffff;
	transition: 0.2s;
	border-radius: 50%;
}

.add-address-switch input:checked + .add-address-slider {
	background-color: #4b2991;
}

.add-address-switch input:checked + .add-address-slider::before {
	transform: translateX(20px);
}

.add-address-actions {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding-top: 4px;
}

.add-address-btn {
	border: none;
	border-radius: 8px;
	padding: 6px 10px;
	cursor: pointer;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.add-address-btn-primary {
    background-color: #4b2991;
    color: white;
}
.add-address-btn-secondary {
	background: rgba(128, 128, 128, 0.51);
	color: black;
}

.add-address-group.has-error .add-address-input,
.add-address-group.has-error .add-address-select-input,
.add-address-group.has-error .add-address-phone-input {
	border-color: #ff2d2d;
}

.add-address-error {
	color: #ff2d2d;
	font-size: 0.78rem;
	margin-top: 4px;
}

@media (max-width: 900px) {
	.add-address-grid {
		grid-template-columns: 1fr;
	}

    .add-address-btn {
        width: 100%
    }
}

@media (max-width: 600px) {
	.add-address-modal {
		width: 100vw;
		height: 100vh;
		max-height: 100vh;
		border-radius: 0;
	}
}
