/* Agma Order Withdrawal – front-end */
.aow-wrap {
	max-width: 820px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.55;
	color: inherit;
}
.aow-wrap *,
.aow-wrap *::before,
.aow-wrap *::after { box-sizing: border-box; }

.aow-card {
	background: #fff;
	border: 1px solid #e3e6ea;
	border-radius: 10px;
	padding: 28px;
	margin: 0 0 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.aow-title { margin: 0 0 8px; font-size: 24px; line-height: 1.3; }
.aow-subtitle { margin: 0 0 12px; font-size: 18px; }
.aow-intro p { margin: 0 0 12px; }
.aow-muted { color: #6b7280; font-size: 14px; }
.aow-req { color: #d93025; }

/* Fields */
.aow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.aow-field { margin: 0 0 18px; min-width: 0; }
.aow-field--full { grid-column: 1 / -1; }
.aow-field > label,
.aow-field .aow-label,
.aow-field legend {
	display: block;
	font-weight: 600;
	margin: 0 0 6px;
	padding: 0;
	font-size: 15px;
}
.aow-wrap input[type="text"],
.aow-wrap input[type="email"],
.aow-wrap input[type="number"],
.aow-wrap textarea {
	width: 100%;
	max-width: 100%;
	padding: 12px 14px;
	border: 1px solid #ccd2d8;
	border-radius: 6px;
	font-size: 16px; /* prevents iOS zoom */
	line-height: 1.4;
	background: #fff;
	color: #1f2937;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
}
.aow-wrap input:focus,
.aow-wrap textarea:focus {
	outline: none;
	border-color: var(--aow-btn, #007BFF);
	box-shadow: 0 0 0 3px rgba(0, 123, 255, .15);
}
.aow-wrap input[readonly] { background: #f4f6f8; color: #4b5563; }
.aow-wrap small.aow-muted { display: block; margin-top: 4px; }

/* Buttons */
.aow-btn,
.aow-wrap button.aow-btn,
.woocommerce a.button.aow_withdraw,
.woocommerce-account .woocommerce-orders-table a.aow_withdraw {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--aow-btn, #007BFF) !important;
	border: 0 !important;
	color: #fff !important;
	border-radius: 6px;
	padding: 13px 28px;
	min-height: 48px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: background-color .15s, transform .05s;
}
.aow-btn:hover,
.aow-btn:focus,
.woocommerce a.button.aow_withdraw:hover,
.woocommerce-account .woocommerce-orders-table a.aow_withdraw:hover {
	background: var(--aow-btn-hover, #0062cc) !important;
	color: #fff !important;
}
.aow-btn:active { transform: translateY(1px); }
.aow-btn[disabled] { opacity: .65; cursor: wait; }
.aow-btn--small,
.woocommerce-account .woocommerce-orders-table a.aow_withdraw { padding: 8px 16px; min-height: 38px; font-size: 14px; }
.woocommerce-account .woocommerce-orders-table a.aow_withdraw { margin: 2px 0 2px 4px; }

.aow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 8px; }
.aow-cancel { color: #6b7280; text-decoration: underline; font-size: 15px; }

/* Notices */
.aow-notice {
	padding: 13px 16px;
	border-radius: 6px;
	margin: 0 0 16px;
	border-left: 4px solid;
	font-size: 15px;
}
.aow-notice[hidden] { display: none; }
.aow-notice--error { background: #fdecea; border-color: #d93025; color: #7a1c14; }
.aow-notice--info { background: #e8f2ff; border-color: var(--aow-btn, #007BFF); color: #0b3c74; }
.aow-notice--warning { background: #fff6e5; border-color: #f0a500; color: #6b4a00; }

/* Type selector */
.aow-type { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.aow-type legend { width: 100%; }
.aow-type__opt {
	flex: 1 1 240px;
	display: flex;
	gap: 10px;
	align-items: flex-start;
	border: 2px solid #e3e6ea;
	border-radius: 8px;
	padding: 12px 14px;
	cursor: pointer;
	font-weight: 400;
	margin: 0;
	transition: border-color .15s, background-color .15s;
}
.aow-type__opt input { margin-top: 4px; flex: 0 0 auto; }
.aow-type__opt span { display: flex; flex-direction: column; }
.aow-type__opt small { color: #6b7280; font-size: 13px; }
.aow-type__opt:has(input:checked) { border-color: var(--aow-btn, #007BFF); background: #f3f8ff; }

/* Items */
.aow-items { list-style: none; margin: 0; padding: 0; border: 1px solid #e3e6ea; border-radius: 8px; overflow: hidden; }
.aow-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-top: 1px solid #eef0f2;
	margin: 0;
	background: #fff;
}
.aow-item:first-child { border-top: 0; }
.aow-item.is-disabled { background: #fafafa; }
.aow-item.is-disabled .aow-item__name { color: #9ca3af; }
.aow-item__main { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 auto; min-width: 0; margin: 0; cursor: pointer; font-weight: 400; }
.aow-item__cb { margin-top: 4px; flex: 0 0 auto; width: 18px; height: 18px; }
.aow-item__name { display: flex; flex-direction: column; word-break: break-word; }
.aow-item__meta { font-size: 13px; color: #6b7280; }
.aow-item__qty { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; font-size: 14px; }
.aow-item__qty label { margin: 0; font-weight: 400; }
.aow-wrap .aow-item__qty input { width: 76px; padding: 8px 10px; text-align: center; }

.aow-partial-hint { display: none; margin: 0 0 8px; }
.aow-withdraw-form.is-partial .aow-partial-hint { display: block; }
.aow-withdraw-form:not(.is-partial) .aow-item__cb:disabled { opacity: .6; }

.aow-legal { font-size: 14px; color: #4b5563; background: #f8fafc; border-radius: 6px; padding: 12px 14px; }

/* Honeypot */
.aow-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Orders list on the public page */
.aow-orders { list-style: none; margin: 0; padding: 0; }
.aow-orders__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #eef0f2; margin: 0; }
.aow-orders__row:first-child { border-top: 0; }

/* Success */
.aow-success { text-align: left; }
.aow-success__icon {
	width: 56px; height: 56px; border-radius: 50%;
	background: #e6f6ec; color: #1e8e3e;
	display: flex; align-items: center; justify-content: center;
	font-size: 30px; font-weight: 700; margin: 0 0 12px;
}
.aow-summary { display: grid; grid-template-columns: 200px 1fr; gap: 8px 16px; margin: 16px 0; padding: 16px; background: #f8fafc; border-radius: 8px; }
.aow-summary dt { font-weight: 600; margin: 0; }
.aow-summary dd { margin: 0; }
.aow-summary ul { margin: 0; padding-left: 18px; }

/* My Account box */
.aow-account-box { margin: 24px 0; padding: 18px 20px; border: 1px solid #e3e6ea; border-radius: 8px; }
.aow-account-box h2 { font-size: 20px; margin: 0 0 10px; }
.aow-account-box__list { margin: 0 0 12px; padding-left: 18px; }

/* Footer link */
.aow-footer-link { text-align: center; padding: 12px 16px; font-size: 14px; line-height: 1.4; }
.aow-footer-link a { color: inherit; text-decoration: underline; }

/* Mobile */
@media (max-width: 640px) {
	.aow-card { padding: 18px 16px; border-radius: 8px; }
	.aow-title { font-size: 21px; }
	.aow-grid { grid-template-columns: 1fr; }
	.aow-actions { flex-direction: column; align-items: stretch; }
	.aow-actions .aow-btn { width: 100%; }
	.aow-cancel { text-align: center; }
	.aow-summary { grid-template-columns: 1fr; gap: 2px; }
	.aow-summary dd { margin-bottom: 10px; }
	.aow-orders__row { flex-direction: column; align-items: stretch; }
	.aow-orders__row .aow-btn { width: 100%; }
}
@media (max-width: 480px) {
	.aow-item { flex-wrap: wrap; }
	.aow-item__qty { width: 100%; padding-left: 28px; }
}
