/* ============================================================
   BanglaPress Modal - All selectors scoped under #bkashPaymentModal
   to prevent conflicts with Bootstrap/WoodMart theme CSS.
   
   NOTE: The modal HTML uses IDs (#bp-modal-box, #bp-modal-body,
   #bp-form-col, #bp-info-col). Inline styles in bp-shortcode.php
   control the primary layout. This file provides fallback base
   styles and theme-proofing.
   ============================================================ */

/* ---- Overlay ---- */
#bkashPaymentModal {
	display: none;
	position: fixed;
	z-index: 999999;
	left: 0; top: 0;
	width: 100%; height: 100%;
	background: rgba(0,0,0,0.6);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
}

/* ---- Modal box ---- */
#bkashPaymentModal #bp-modal-box {
	background: #fff;
	margin: 2% auto 4%;
	width: 92%;
	max-width: 840px;
	position: relative;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.3);
	box-sizing: border-box;
	overflow: visible;
}

/* ---- Two-column body (desktop) ---- */
#bkashPaymentModal #bp-modal-body {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	min-height: 420px;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	border-radius: 14px;
	overflow: hidden;
}

/* LEFT — checkout form */
#bkashPaymentModal #bp-form-col {
	flex: 0 0 48%;
	width: 48%;
	padding: 26px 22px 24px;
	box-sizing: border-box;
	border-right: 1px solid #efefef;
	min-width: 0;
}

/* RIGHT — operator panel */
#bkashPaymentModal #bp-info-col {
	flex: 0 0 52%;
	width: 52%;
	background: #fafafa;
	padding: 20px 18px 24px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 0;
}

/* ---- Mobile info panel ---- */
#bkashPaymentModal #mobileInfo {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	text-align: center;
}

#bkashPaymentModal #operatorLogo {
	width: 170px;
	height: 140px;
	object-fit: contain;
	margin: 6px 0;
	display: block;
	cursor: zoom-in;
	border-radius: 8px;
	border: 1px solid #eee;
	background: #fff;
	padding: 6px;
	box-sizing: border-box;
	transition: transform 0.15s, box-shadow 0.15s;
}
#bkashPaymentModal #operatorLogo:hover {
	transform: scale(1.04);
	box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ================================================================
   MOBILE (<= 680px)
   Layout: single column, info panel FIRST, checkout form SECOND.
   ================================================================ */
@media (max-width: 680px) {
	#bkashPaymentModal #bp-modal-box {
		margin: 0 auto;
		width: 100%;
		border-radius: 0;
	}

	#bkashPaymentModal #bp-modal-body {
		flex-direction: column;
		flex-wrap: wrap;
		min-height: auto;
		border-radius: 0;
	}

	/* Show info col FIRST on mobile */
	#bkashPaymentModal #bp-info-col {
		order: 1;
		flex: 0 0 auto;
		width: 100%;
		padding: 16px 16px 12px;
		border-bottom: 1px solid #efefef;
		background: #fafafa;
	}

	/* Form col SECOND */
	#bkashPaymentModal #bp-form-col {
		order: 2;
		flex: 0 0 auto;
		width: 100%;
		padding: 16px 16px 24px;
		border-right: none;
	}

	/* Operator buttons: 2x2 grid on small screens */
	#bkashPaymentModal #mobileOperator {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		margin-bottom: 12px;
	}
	#bkashPaymentModal #mobileOperator label {
		background: #fff;
		border: 2px solid #e8e8e8;
		border-radius: 9px;
		padding: 10px 12px;
		font-size: 14px;
		font-weight: 700;
		justify-content: flex-start;
		gap: 8px;
		white-space: normal;
		transition: border-color 0.15s, background 0.15s;
	}

	/* Horizontal info on mobile */
	#bkashPaymentModal #mobileInfo {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		gap: 8px;
		text-align: left;
	}
	#bkashPaymentModal #mobileNumber {
		font-size: 22px;
		font-weight: 800;
		flex: 1;
		text-align: left;
		margin: 0;
	}
	#bkashPaymentModal #operatorLogo {
		width: auto;
		height: 110px;
		max-width: 50%;
		margin: 0;
		flex-shrink: 0;
	}
	#bkashPaymentModal #instructions {
		font-size: 12px;
		width: 100%;
		text-align: center;
		margin: 6px 0 4px;
	}
}

@media (min-width: 421px) and (max-width: 680px) {
	/* 4 in one row on phones wider than 420px */
	#bkashPaymentModal #mobileOperator {
		grid-template-columns: repeat(4, 1fr);
	}
}
