/* ============================================================
   Advance Payment Gateway — Frontend Styles
   ============================================================ */

/* ── Wrapper ───────────────────────────────────────────────── */
.ap-details-wrap {
	margin: 30px 0;
}

.ap-details-wrap h2 {
	font-size: 1.35em;
	margin-bottom: 14px;
	color: #1e1e1e;
}

/* ── Payment instructions block ────────────────────────────── */
.ap-instructions {
	background: #fff;
	border: 1px solid #d0d5dd;
	border-left: 4px solid #2563eb;
	border-radius: 6px;
	padding: 18px 20px;
	margin-bottom: 20px;
	font-size: 0.97em;
	line-height: 1.7;
	color: #1e1e1e;
	white-space: pre-line;
}

.ap-instructions p {
	margin: 0 0 8px;
}

.ap-instructions p:last-child {
	margin-bottom: 0;
}

/* ── Upload section ────────────────────────────────────────── */
.ap-upload-section {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	padding: 20px;
	margin-top: 20px;
}

.ap-upload-section h3 {
	margin: 0 0 10px;
	font-size: 1.1em;
	color: #333;
}

.ap-upload-section > p {
	margin: 0 0 14px;
	color: #555;
	font-size: 0.95em;
}

/* ── File input row ────────────────────────────────────────── */
.ap-file-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

#ap-file-input {
	display: none;
}

.ap-file-label {
	display: inline-block;
	padding: 8px 18px;
	background: #374151;
	color: #fff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9em;
	font-weight: 500;
	transition: background 0.2s;
	white-space: nowrap;
}

.ap-file-label:hover {
	background: #1f2937;
}

#ap-file-name {
	font-size: 0.9em;
	color: #6b7280;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ── Submit button ─────────────────────────────────────────── */
.ap-submit-btn {
	padding: 10px 22px !important;
	font-size: 1em !important;
	font-weight: 600 !important;
}

.ap-submit-btn:disabled {
	/* Keep the button clearly readable while uploading. Use !important to
	   override theme-level disabled rules that can push opacity very low. */
	opacity: 0.78 !important;
	cursor: wait !important;
	filter: brightness(0.92);
}

/* ── Messages ──────────────────────────────────────────────── */
.ap-msg {
	padding: 12px 16px;
	border-radius: 4px;
	margin-top: 12px;
	font-size: 0.95em;
	line-height: 1.5;
}

.ap-msg--success {
	background: #d1fae5;
	color: #065f46;
	border: 1px solid #6ee7b7;
}

.ap-msg--error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

#ap-upload-msg {
	margin-top: 12px;
}

/* ── "Pick either method" note ─────────────────────────────── */
.ap-both-note {
	margin: 0 0 18px;
	padding: 10px 14px;
	background: #fffbeb;
	border: 1px solid #fcd34d;
	border-radius: 4px;
	font-size: 0.95em;
	color: #444;
	line-height: 1.5;
}

/* ── WhatsApp section ──────────────────────────────────────── */
/* The wrapper re-uses .ap-upload-section for the card look.
   .ap-whatsapp-wrap only adds the top gap. */
.ap-whatsapp-wrap {
	margin-top: 16px;
}

/* Align the SVG icon inline with the button text.
   Everything else is handled by the theme's .button class. */
.ap-whatsapp-btn {
	display: inline-flex !important;
	align-items: center  !important;
	gap: 8px             !important;
}

/* ── Spacing between Pay and Cancel order-action buttons ───── */
/* Targets adjacent buttons in WooCommerce My Account order views */
.woocommerce a.button.pay,
.woocommerce-page a.button.pay,
.woocommerce-order-actions a.button:not(:last-child) {
	margin-right: 10px !important;
}

