/* ==========================================================================
   Shared reset — form controls (input/textarea/button/select) do NOT
   inherit font-family/size from their parent by default in any browser;
   without this, they fall back to the OS's default form-control font
   (usually a serif), which is why dog-name/amount text could look
   inconsistent with the rest of the popup on the live site. Scoped to this
   plugin's own containers only, so nothing else on the site is touched.
   ========================================================================== */
.vosa-modal-overlay,
.vosa-modal-overlay input,
.vosa-modal-overlay textarea,
.vosa-modal-overlay button,
.vosa-adopt-btn,
.vosa-adoption-cards,
.vosa-adoption-cards button,
.vosa-thank-you,
.vosa-thank-you a {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: #2b2530;
	-webkit-font-smoothing: antialiased;
}

.vosa-modal-overlay *,
.vosa-adoption-cards *,
.vosa-thank-you * {
	box-sizing: border-box;
}

/* ==========================================================================
   Popup overlay + modal
   ========================================================================== */

/* Hidden by default. Visibility is driven ONLY by the .vosa-modal-is-open
   class the JS toggles — not the [hidden] attribute. [hidden] and a plain
   class selector have equal CSS specificity, so relying on [hidden] alone
   is fragile: an author stylesheet rule of equal specificity that loads
   after the browser's default stylesheet (which is any plugin/theme CSS)
   can silently win and keep the element visible even while hidden="true".
   Driving display off a dedicated class removes that ambiguity entirely. */
.vosa-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba( 20, 15, 10, 0.6 );
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 20px;
}

.vosa-modal-overlay.vosa-modal-is-open {
	display: flex;
}

body.vosa-modal-open {
	overflow: hidden;
}

.vosa-modal {
	background: #fff;
	border-radius: 14px;
	max-width: 460px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 0 28px 24px;
	position: relative;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.3 );
	-webkit-overflow-scrolling: touch;
}

.vosa-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: rgba( 255, 255, 255, 0.9 );
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: #666;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.vosa-modal-close:hover,
.vosa-modal-close:focus-visible {
	background: #f2e9ff;
	color: #7a4dbf;
	outline: none;
}

.vosa-modal-header {
	text-align: center;
	margin: 0 -28px 20px;
	padding: 30px 28px 20px;
	background: linear-gradient( 180deg, #f2e9ff 0%, #ffffff 100% );
	border-radius: 14px 14px 0 0;
}

.vosa-modal-dog-photo {
	width: 108px;
	height: 108px;
	border-radius: 50%;
	object-fit: cover;
	margin-bottom: 12px;
	border: 4px solid #fff;
	box-shadow: 0 4px 14px rgba( 122, 77, 191, 0.25 );
}

.vosa-modal-header h2 {
	margin: 0 0 6px;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.3;
	color: #2b2530;
}

.vosa-modal-amount {
	color: #7a4dbf;
	font-weight: 700;
	font-size: 22px;
	margin: 0 0 10px;
}

.vosa-modal-amount-suffix {
	font-weight: 500;
	font-size: 13px;
	color: #8a7aa8;
}

.vosa-modal-trust {
	font-size: 12px;
	color: #8a7aa8;
	margin: 0;
	line-height: 1.5;
}

.vosa-field {
	margin: 0 0 14px;
}

.vosa-hidden-field {
	display: none !important;
}

.vosa-logged-in-as {
	background: #f2e9ff;
	color: #4a4254;
	font-size: 13px;
	padding: 8px 12px;
	border-radius: 6px;
	margin: 0 0 16px;
}

.vosa-logged-in-as strong {
	color: #7a4dbf;
}

.vosa-details-summary {
	background: #f7f4fb;
	border-radius: 6px;
	padding: 10px 12px;
	margin: 0 0 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.vosa-details-summary p {
	margin: 0;
	font-size: 13px;
	color: #4a4254;
	line-height: 1.4;
}

.vosa-edit-details-btn {
	background: none;
	border: none;
	color: #7a4dbf;
	font-size: 12px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	flex-shrink: 0;
	padding: 0;
}

.vosa-field label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 5px;
	color: #4a4254;
}

.vosa-field input[type='text'],
.vosa-field input[type='email'],
.vosa-field input[type='tel'],
.vosa-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d8d8d8;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vosa-field input:focus,
.vosa-field textarea:focus {
	outline: none;
	border-color: #7a4dbf;
	box-shadow: 0 0 0 3px rgba( 122, 77, 191, 0.15 );
}

#vosa-dog-name-readonly {
	background: #f7f4fb;
	color: #6a5f78;
	cursor: not-allowed;
}

.vosa-field textarea {
	min-height: 60px;
	resize: vertical;
}

.vosa-field-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.vosa-field-row .vosa-field {
	flex: 1 1 140px;
	min-width: 0;
}

.vosa-field-checkbox label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
	font-size: 13px;
	color: #4a4254;
}

.vosa-field-checkbox input[type='checkbox'] {
	margin-top: 3px;
	flex-shrink: 0;
}

.vosa-form-error {
	background: #fdeceb;
	color: #c0392b;
	padding: 10px 12px;
	border-radius: 6px;
	font-size: 13px;
	margin-bottom: 14px;
	line-height: 1.4;
}

.vosa-form-error a {
	color: #7a4dbf;
	font-weight: 600;
	text-decoration: underline;
}

.vosa-submit-btn {
	width: 100%;
	background: #7a4dbf;
	color: #fff !important; /* .vosa-modal-overlay button (shared font reset) otherwise wins on specificity and silently overrides this to dark text. */
	border: none;
	padding: 14px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.vosa-submit-btn:hover:not( :disabled ) {
	background: #6a3fac;
	color: #fff !important;
}

.vosa-submit-btn:focus-visible {
	outline: 3px solid #d8c7f0;
	outline-offset: 2px;
}

.vosa-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.vosa-adopt-btn {
	display: inline-block;
	background: #7a4dbf;
	color: #fff !important;
	border: none;
	padding: 10px 18px;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none !important;
	line-height: 1.4;
	transition: background-color 0.15s ease;
}

.vosa-adopt-btn:hover {
	background: #6a3fac;
	color: #fff !important;
}

@media ( max-width: 480px ) {
	.vosa-modal {
		padding: 0 18px 20px;
		border-radius: 12px;
	}

	.vosa-modal-header {
		margin: 0 -18px 18px;
		padding: 26px 18px 18px;
		border-radius: 12px 12px 0 0;
	}

	.vosa-field-row {
		flex-direction: column;
		gap: 0;
	}
}

/* My Account > My Virtual Adoptions */
.vosa-adoption-cards {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) );
	gap: 18px;
}

.vosa-adoption-card {
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	padding: 18px;
	background: #fff;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.vosa-adoption-card:hover {
	border-color: #d8d0e6;
	box-shadow: 0 4px 16px rgba( 122, 77, 191, 0.08 );
}

.vosa-adoption-card-top {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 16px;
}

.vosa-adoption-card-photo {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 2px solid #f2e9ff;
}

.vosa-adoption-card-heading h3 {
	margin: 0 0 6px;
	font-size: 17px;
	line-height: 1.2;
}

.vosa-adoption-status {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 3px 10px;
	border-radius: 20px;
	margin: 0;
	background: #f0f0f0;
	color: #555;
}

.vosa-status-active {
	background: #e2f7e8;
	color: #157a35;
	box-shadow: 0 0 0 1px rgba( 21, 122, 53, 0.15 ) inset;
}

.vosa-status-cancelled,
.vosa-status-halted {
	background: #fdeceb;
	color: #c0392b;
}

.vosa-status-created,
.vosa-status-authenticated,
.vosa-status-pending {
	background: #fdf3e3;
	color: #966a00;
}

.vosa-adoption-card-body {
	border-top: 1px solid #f0ecf5;
	padding-top: 14px;
}

.vosa-adoption-amount {
	font-size: 15px;
	font-weight: 700;
	color: #2b2530;
	margin: 0 0 10px;
}

.vosa-adoption-amount span {
	font-weight: 500;
	color: #8a7aa8;
	font-size: 13px;
}

.vosa-adoption-meta-group {
	margin-bottom: 16px;
}

.vosa-adoption-meta {
	font-size: 13px;
	color: #666;
	margin: 2px 0;
}

.vosa-adoption-card-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

/* Primary action: View Order — deliberately styled with the theme/site's
   own generic .button class (colours, border-radius, hover states) rather
   than the plugin's own brand purple, so it matches the rest of the site's
   buttons (cart, checkout, etc). Only layout is added here. */
.vosa-view-order-btn.button {
	display: block;
	width: 100%;
	text-align: center;
	box-sizing: border-box;
}

/* Secondary, destructive action: a small text link that never competes
   visually with the primary button above it. */
.vosa-cancel-link {
	font-size: 12px;
	color: #b3413a;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.vosa-cancel-link:hover {
	color: #8f2f29;
}

/* Cancel-confirmation modal — reuses .vosa-modal-overlay/.vosa-modal from
   the adoption popup so it looks like part of the same product. */
.vosa-cancel-modal {
	max-width: 400px;
	padding: 28px;
	text-align: center;
}

.vosa-cancel-modal-body h2 {
	margin: 0 0 12px;
	font-size: 19px;
}

.vosa-cancel-modal-message {
	font-size: 14px;
	color: #4a4254;
	line-height: 1.6;
	margin: 0 0 22px;
}

.vosa-cancel-modal-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.vosa-cancel-modal-actions .vosa-submit-btn {
	width: 100%;
}

.vosa-cancel-modal-confirm {
	background: none;
	border: none;
	color: #b3413a;
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	padding: 6px;
}

.vosa-cancel-modal-confirm:hover {
	color: #8f2f29;
}

.vosa-cancel-modal-confirm:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

@media ( max-width: 480px ) {
	.vosa-adoption-cards {
		grid-template-columns: 1fr;
	}

	.vosa-cancel-modal {
		padding: 22px;
	}
}

/* Thank You page */
.vosa-thank-you {
	text-align: center;
	max-width: 480px;
	margin: 40px auto;
	padding: 32px;
	border-radius: 14px;
	background: linear-gradient( 180deg, #f2e9ff 0%, #ffffff 100% );
}

.vosa-thank-you-photo {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #fff;
	box-shadow: 0 4px 14px rgba( 122, 77, 191, 0.25 );
	margin-bottom: 16px;
}

.vosa-thank-you h2 {
	margin: 0 0 8px;
}

.vosa-thank-you-amount {
	color: #7a4dbf;
	font-weight: 700;
	font-size: 18px;
}

/* ==========================================================================
   My Account rebranding — nav, dashboard, profile page. Scoped to
   WooCommerce's own My Account markup/classes so nothing outside the
   account area is affected.
   ========================================================================== */

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid #eee;
	border-radius: 10px;
	overflow: hidden;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link {
	border-bottom: 1px solid #f0ecf5;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link:last-child {
	border-bottom: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link a {
	display: block;
	padding: 12px 16px;
	color: #4a4254;
	text-decoration: none;
	font-size: 14px;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link a:hover {
	background: #faf7fd;
	color: #7a4dbf;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link.is-active a {
	background: #7a4dbf;
	color: #fff;
	font-weight: 600;
}

/* Dashboard */
.vosa-dashboard-welcome {
	font-size: 22px;
	margin: 0 0 4px;
}

.vosa-dashboard-thanks {
	color: #7a4dbf;
	font-weight: 600;
	margin: 0 0 24px;
}

.vosa-dashboard-cards {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 150px, 1fr ) );
	gap: 14px;
	margin-bottom: 28px;
}

.vosa-dashboard-card {
	background: linear-gradient( 180deg, #f2e9ff 0%, #ffffff 100% );
	border: 1px solid #e9defa;
	border-radius: 10px;
	padding: 18px;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.vosa-dashboard-card-value {
	font-size: 24px;
	font-weight: 700;
	color: #7a4dbf;
}

.vosa-dashboard-card-label {
	font-size: 12px;
	color: #8a7aa8;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.vosa-dashboard-from-here {
	font-weight: 600;
	color: #2b2530;
	margin: 0 0 8px;
}

.vosa-dashboard-links {
	margin: 0 0 8px;
	padding-left: 20px;
}

.vosa-dashboard-links li {
	margin-bottom: 6px;
}

.vosa-dashboard-links a {
	color: #7a4dbf;
	text-decoration: underline;
}

.vosa-dashboard-links a:hover {
	color: #6a3fac;
}

/* Profile page (edit-account + our merged address fields) */
.woocommerce-account .woocommerce-EditAccountForm .vosa-profile-address-fieldset {
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 16px;
	margin: 16px 0;
}

.woocommerce-account .woocommerce-EditAccountForm .vosa-profile-address-fieldset legend {
	font-weight: 600;
	color: #7a4dbf;
	padding: 0 6px;
}

@media ( max-width: 480px ) {
	.vosa-dashboard-cards {
		grid-template-columns: repeat( auto-fit, minmax( 120px, 1fr ) );
	}
}
