/**
 * DP Multiple Addresses for WooCommerce – Front-end styles.
 *
 * @package DPMultipleAddressesWooCommerce
 */

/* Checkout: saved address dropdown */
.dpmw-saved-address-wrap {
	margin-bottom: 1.5em;
}

.dpmw-select-address-row label {
	display: block;
	margin-bottom: 0.25em;
}

.dpmw-select-address-row .select {
	width: 100%;
	max-width: 100%;
}

/* My Account – Saved Addresses */
.dpmw-addresses-list {
	display: block;
	margin: 0 0 1.5em;
	padding: 0;
	list-style: none;
}

.dpmw-address-card {
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 1em 1.25em;
	margin-bottom: 1em;
	background: #fff;
}

.dpmw-address-card .dpmw-address-label {
	font-weight: 600;
	margin-bottom: 0.5em;
}

.dpmw-address-card .dpmw-address-default {
	display: inline-block;
	margin-left: 0.5em;
	padding: 0.15em 0.5em;
	font-size: 0.85em;
	background: #f0f0f0;
	border-radius: 3px;
}

.dpmw-address-card .dpmw-address-details {
	color: #555;
	line-height: 1.5;
	margin-bottom: 0.75em;
}

.dpmw-address-actions {
	margin-top: 0.75em;
}

.dpmw-address-actions a {
	margin-right: 1em;
}

/* Add/Edit address form */
.dpmw-form-wrap {
	max-width: 600px;
	margin: 1.5em 0;
	padding: 1.5em;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background: #fff;
}

.dpmw-form-wrap .form-row {
	margin-bottom: 1em;
}

.dpmw-form-wrap label {
	display: block;
	margin-bottom: 0.25em;
}

.dpmw-form-wrap input[type="text"],
.dpmw-form-wrap select {
	width: 100%;
	max-width: 100%;
}

/* Type of address – icon boxes */
.dpmw-address-type-row {
	margin-bottom: 1em;
}

.dpmw-address-type-label {
	display: block;
	margin-bottom: 0.5em;
	color: #555;
	font-weight: normal;
}

.dpmw-address-type-boxes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
}

.dpmw-address-type-box {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.65em 1em;
	border: 1px solid #ddd;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.dpmw-address-type-box:hover {
	border-color: #999;
}

/* Only the box with the checked radio gets selected style (one at a time) */
.dpmw-address-type-box:has(.dpmw-address-type-input:checked) {
	border-color: #333;
	background: #f8f8f8;
	box-shadow: 0 0 0 1px #333;
}

.dpmw-address-type-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.dpmw-address-type-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #555;
}

.dpmw-address-type-box:has(.dpmw-address-type-input:checked) .dpmw-address-type-icon {
	color: #333;
}

.dpmw-address-type-text {
	font-weight: 500;
	color: #333;
}

/* State field: only one of select/input visible at a time */
.dpmw-state-wrap .dpmw-state-field {
	width: 100%;
	max-width: 100%;
}
.dpmw-state-wrap .dpmw-state-field[aria-hidden="true"] {
	display: none !important;
}

.dpmw-form-actions {
	margin-top: 1em;
}

.dpmw-form-actions .button {
	margin-right: 0.5em;
}
