/**
 * Zey ConfirmPay — Public Stylesheet
 *
 * Styles for checkout fields, thank you page, payment confirmation page,
 * accordion, copy button, and modal/notice elements.
 *
 * @package Zey_Commerce
 * @since   1.0.0
 */

/* ==========================================================================
   1. Checkout — Radio Cards List (Vertical)
   ========================================================================== */

.zey-radio-cards {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 15px 0 5px;
	width: 100%;
}

.zey-radio-card {
	position: relative;
	cursor: pointer;
	display: block;
	margin: 0 !important;
	/* Override theme margins */
	width: 100%;
}

/* Hide native input visually but keep keyboard accessible */
.zey-radio-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0 !important;
}

.zey-radio-card-inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 12px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	background-color: transparent;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
	width: 100%;
}

/* Custom Radio Dot Indicator */
.zey-radio-card-inner::before {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #cbd5e1;
	border-radius: 50%;
	margin-right: 12px;
	background: #fff;
	flex-shrink: 0;
	box-sizing: border-box;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.zey-radio-card:hover .zey-radio-card-inner {
	border-color: #cbd5e1;
}

/* Checked State */
.zey-radio-input:checked+.zey-radio-card-inner {
	border-color: #000000;
	background-color: #ffffff;
}

.zey-radio-input:checked+.zey-radio-card-inner::before {
	border-color: #000000;
	background: radial-gradient(circle, #000000 35%, #ffffff 40%);
}

/* Focus indicator for accessibility */
.zey-radio-input:focus-visible+.zey-radio-card-inner {
	outline: 2px solid #000000;
	outline-offset: 2px;
}

.zey-radio-logo {
	width: 32px;
	height: 32px;
	object-fit: contain;
	margin-right: 12px;
	flex-shrink: 0;
}

.zey-radio-name {
	font-size: 14px;
	font-weight: 600;
	color: #334155;
	line-height: 1.2;
}

.zey-radio-input:checked+.zey-radio-card-inner .zey-radio-name {
	color: #0f172a;
}

/* Checkout Icon sizing */
.payment_method_zey_bank_transfer img,
.payment_method_zey_ewallet_transfer img {
	width: 40px;
	height: auto;
	margin: 5px;
}


/* Checkout Icon sizing */
.payment_method_zey_bank_transfer img,
.payment_method_zey_ewallet_transfer img {
	width: 40px;
	height: auto;
	margin: 5px;
}

/* ==========================================================================
   2. Thank You Page — Transfer Details
   ========================================================================== */

.zey-transfer-details {
	border: 1px solid #e0e0e0;
	padding: 24px;
	margin: 24px 0;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	max-width: 100%;
}

.zey-transfer-details h3 {
	margin-top: 0;
	font-size: 20px;
	color: #2b2b2b;
	text-align: center;
	padding-bottom: 12px;
	border-bottom: 1px solid #f0f0f0;
	margin-bottom: 16px;
}

.zey-bank-info {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 20px;
}

.zey-logo {
	width: 50px;
	height: 50px;
	object-fit: contain;
	border-radius: 8px;
	background: #f9f9f9;
	padding: 4px;
	border: 1px solid #e5e5e5;
}

.zey-bank-name {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
	color: #333;
}

/* Account Details Row */
.zey-account-details {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 14px;
	padding: 14px;
	background: #f9fafb;
	border-radius: 8px;
	border: 1px solid #eee;
}

.zey-account-info {
	flex: 1;
}

.zey-account-label {
	font-size: 13px;
	color: #888;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.zey-account-value {
	font-size: 16px;
	font-weight: 700;
	color: #2b2b2b;
	margin: 3px 0 12px;
}

/* Copy Button */
.zey-copy-button {
	padding: 8px 16px;
	background: #000000;
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	align-self: center;
	transition: background 0.2s ease;
	white-space: nowrap;
}

.zey-copy-button:hover {
	background: #333333;
}

.zey-copy-button:active {
	background: #111111;
}

.zey-copy-message {
	margin-top: 8px;
	padding: 8px 12px;
	color: #155724;
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	border-radius: 6px;
	font-weight: 600;
	font-size: 13px;
	text-align: center;
	display: none;
	animation: zeyFadeIn 0.3s ease;
}

/* ==========================================================================
   3. Accordion
   ========================================================================== */

.zey-accordion {
	margin-top: 20px;
}

.zey-accordion-item {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	margin-bottom: 8px;
	overflow: hidden;
}

.zey-accordion-button {
	width: 100%;
	padding: 12px 16px;
	text-align: left;
	background-color: #f9f9f9;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: #000000;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: background-color 0.2s ease;
}

.zey-accordion-button:hover {
	background-color: #f0f4f8;
}

.zey-accordion-icon {
	margin-right: 8px;
	font-size: 16px;
}

.zey-accordion-button::after {
	content: "\25BC";
	font-size: 11px;
	transition: transform 0.3s ease;
}

.zey-accordion-button.active::after {
	transform: rotate(180deg);
}

.zey-accordion-content {
	padding: 0 16px;
	max-height: 0;
	overflow: hidden;
	background-color: #fff;
	border-top: 0 solid #e5e5e5;
	transition: max-height 0.35s ease, padding 0.35s ease, border-top 0.2s ease;
}

.zey-accordion-content.open {
	padding: 14px 16px;
	max-height: 500px;
	border-top: 1px solid #e5e5e5;
}

.zey-accordion-content ol {
	margin: 0;
	padding-left: 20px;
}

.zey-accordion-content li {
	margin-bottom: 6px;
	line-height: 1.6;
	font-size: 14px;
}

/* ==========================================================================
   4. Confirm Button (Thank You Page)
   ========================================================================== */

.zey-confirm-button {
	display: block;
	width: 100%;
	padding: 14px;
	margin-top: 20px;
	background: #000000;
	color: #fff !important;
	text-align: center;
	font-size: 16px;
	font-weight: 700;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	text-decoration: none !important;
	transition: background 0.2s ease;
}

.zey-confirm-button:hover {
	background: #333333;
	color: #fff !important;
}

/* ==========================================================================
   5. Payment Confirmation Page (/confirm)
   ========================================================================== */

/* Hide default page title on confirmation page aggressively */
body.zey-confirm-page .entry-title,
body.zey-confirm-page .page-title,
body.zey-confirm-page .post-title,
body.zey-confirm-page header.entry-header,
body.zey-confirm-page .page-header,
body.zey-confirm-page .elementor-page-title,
body.zey-confirm-page h1 {
	display: none !important;
}

.zey-confirm-wrapper {
	max-width: 500px;
	margin: 40px auto;
	padding: 30px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.025);
	box-sizing: border-box;
}

.zey-confirm-wrapper h3 {
	margin-top: 0;
	color: #0f172a;
	font-size: 20px;
	font-weight: 700;
	text-align: center;
	margin-bottom: 20px;
}

/* Fields */
.zey-field {
	margin-bottom: 20px;
}

.zey-field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #334155;
	font-size: 14px;
}

.zey-field input[type="text"],
.zey-field input[type="email"],
.zey-field input[type="number"],
.zey-field textarea,
.zey-field select {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
	background: #ffffff;
	color: #334155;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.zey-field input[type="text"]:focus,
.zey-field input[type="email"]:focus,
.zey-field input[type="number"]:focus,
.zey-field textarea:focus,
.zey-field select:focus {
	border-color: #000000;
	outline: none;
	box-shadow: 0 0 0 1px #000000;
}

.zey-field input[readonly] {
	background-color: #f8fafc;
	color: #64748b;
	border-color: #e2e8f0;
}

.zey-field textarea {
	resize: vertical;
	min-height: 90px;
}

.zey-field input[type="file"] {
	padding: 8px 12px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	width: 100%;
	box-sizing: border-box;
	font-size: 13px;
	color: #64748b;
}

.zey-field-error {
	color: #ef4444;
	font-size: 13px;
	margin-top: 6px;
	font-weight: 600;
}

/* Buttons */
.zey-btn {
	display: block;
	width: 100%;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 700;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	text-align: center;
	transition: background 0.2s ease;
	box-sizing: border-box;
}

.zey-btn-primary {
	background: #000000;
	color: #ffffff;
}

.zey-btn-primary:hover {
	background: #222222;
}

/* Success / Error Notices */
.zey-confirm-success {
	text-align: center;
	padding: 30px 20px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
	color: #166534;
}

.zey-confirm-success i {
	font-size: 48px;
	color: #22c55e;
	margin-bottom: 12px;
	display: block;
}

.zey-confirm-success h3 {
	margin: 10px 0 6px;
	color: #166534;
	font-size: 18px;
}

.zey-confirm-success p {
	margin: 0;
	font-size: 14px;
	color: #1b4332;
	line-height: 1.5;
}

.zey-confirm-error {
	padding: 12px 16px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	color: #991b1b;
	margin-bottom: 20px;
	font-size: 14px;
	font-weight: 600;
}

.zey-confirm-error i {
	margin-right: 8px;
}

/* Guest verification */
.zey-guest-verify {
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	margin-bottom: 0;
}

.zey-guest-verify h3 {
	margin-bottom: 8px;
}

.zey-guest-verify p {
	color: #64748b;
	margin-bottom: 20px;
	font-size: 14px;
	text-align: center;
}

/* ==========================================================================
   6. My Account — Payment Notice
   ========================================================================== */

.zey-payment-notice {
	margin: 20px 0;
	padding: 14px 18px;
	background: #fff8e1;
	border: 1px solid #ffe082;
	border-radius: 8px;
	border-left: 4px solid #ffa000;
}

.zey-payment-notice p {
	margin: 0;
	font-size: 14px;
	color: #5d4037;
}

.zey-notice-link {
	color: #000000;
	text-decoration: underline;
	font-weight: 600;
}

.zey-notice-link:hover {
	color: #333333;
}

/* ==========================================================================
   7. Animation
   ========================================================================== */

@keyframes zeyFadeIn {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==========================================================================
   8. Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.zey-transfer-details {
		padding: 16px;
	}

	.zey-account-details {
		flex-direction: column;
		align-items: stretch;
	}

	.zey-copy-button {
		align-self: stretch;
		text-align: center;
	}

	.zey-confirm-wrapper {
		padding: 16px;
	}

	.zey-checkout-preview {
		padding: 10px;
	}

	.zey-preview-logo {
		width: 40px;
		height: 40px;
	}
}

/* ==========================================================================
   9. Custom Floating Checkout Error (Native WooCommerce Override)
   ========================================================================== */

/* Wrapper position fixed */
.woocommerce-NoticeGroup-checkout {
	position: fixed !important;
	top: 30px !important;
	left: 50% !important;
	transform: translateX(-50%) !important;
	z-index: 999999 !important;
	width: auto !important;
	min-width: 320px;
	max-width: 90%;
	pointer-events: none; /* allow clicking through empty space */
	animation: zeyFadeInDown 0.4s ease forwards;
}

/* Make actual error box pointer-events auto so links are clickable */
.woocommerce-NoticeGroup-checkout .woocommerce-error {
	pointer-events: auto;
	margin: 0 !important;
	background-color: #ef4444 !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 8px !important;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1) !important;
}

.woocommerce-NoticeGroup-checkout .woocommerce-error::before {
	color: #ffffff !important;
}

.woocommerce-NoticeGroup-checkout .woocommerce-error li {
	color: #ffffff !important;
	font-weight: 600 !important;
	font-size: 15px !important;
}

.woocommerce-NoticeGroup-checkout .woocommerce-error li a {
	color: #ffffff !important;
	text-decoration: underline !important;
	font-weight: bold !important;
}

.woocommerce-NoticeGroup-checkout .woocommerce-error li a:hover {
	color: #f1f5f9 !important;
}

@keyframes zeyFadeInDown {
	0% {
		opacity: 0;
		transform: translate(-50%, -20px);
	}
	100% {
		opacity: 1;
		transform: translate(-50%, 0);
	}
}