/* IndevX Egyptian Payments — frontend styles. RTL ready, responsive, dark-mode friendly. */

.indevx-ep-gateway-description p {
	margin: 0 0 10px;
}

.indevx-ep-wallet-selector {
	margin: 10px 0;
}

.indevx-ep-wallet-selector-label {
	font-weight: 600;
	margin-bottom: 8px;
}

.indevx-ep-wallet-options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 10px;
}

.indevx-ep-wallet-option {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	cursor: pointer;
	background: rgba(0, 0, 0, 0.02);
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.indevx-ep-wallet-option:has(input:checked) {
	border-color: currentColor;
	background: rgba(0, 0, 0, 0.05);
}

.indevx-ep-wallet-option input {
	margin: 0;
}

.indevx-ep-wallet-logo {
	max-width: 32px;
	max-height: 32px;
	width: auto;
	height: auto;
	border-radius: 3px;
	object-fit: contain;
}

.indevx-ep-wallet-details[hidden] {
	display: none;
}

.indevx-ep-info-block {
	border: 1px dashed rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	padding: 14px;
	margin: 10px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-start;
}

.indevx-ep-info-lines {
	flex: 1 1 240px;
	min-width: 200px;
}

.indevx-ep-info-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.indevx-ep-info-row:last-child {
	border-bottom: none;
}

.indevx-ep-info-label {
	font-weight: 600;
	min-width: 120px;
}

.indevx-ep-info-value {
	flex: 1 1 auto;
	word-break: break-all;
}

.indevx-ep-copy-btn {
	border: 1px solid rgba(0, 0, 0, 0.2);
	background: transparent;
	color: inherit;
	border-radius: 4px;
	padding: 3px 10px;
	font-size: 12px;
	cursor: pointer;
	white-space: nowrap;
}

.indevx-ep-copy-btn.is-copied {
	background: #2fa84f;
	border-color: #2fa84f;
	color: #fff;
}

.indevx-ep-info-qr img {
	max-width: 130px;
	max-height: 130px;
	border-radius: 6px;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

.indevx-ep-info-instructions {
	flex-basis: 100%;
	font-size: 13px;
	color: #000000;
	opacity: 1;
}

.indevx-ep-payment-form {
	margin-top: 14px;
}

.indevx-ep-payment-form .form-row {
	margin-bottom: 12px;
}

.indevx-ep-payment-form label .required {
	color: #d63638;
}

.indevx-ep-date-field-wrap {
	position: relative;
	display: block;
}

.indevx-ep-date-field-wrap input[type="date"] {
	position: relative;
	z-index: 1;
	background: transparent;
}

.indevx-ep-date-hint {
	display: none;
	position: absolute;
	inset-inline-start: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 13px;
	color: #000000;
	pointer-events: none;
	z-index: 0;
}

@media (max-width: 600px) {
	.indevx-ep-date-hint:not(.is-hidden) {
		display: block;
	}
}

.indevx-ep-dropzone {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 2px dashed #9a9a9a;
	border-radius: 12px;
	padding: 32px 18px;
	text-align: center;
	cursor: pointer;
	background: #f7f7f7;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.indevx-ep-dropzone:hover {
	border-color: currentColor;
	background: rgba(0, 0, 0, 0.035);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	transform: translateY(-1px);
}

.indevx-ep-dropzone.is-dragover {
	border-color: currentColor;
	background: rgba(0, 0, 0, 0.05);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
	transform: scale(1.01);
}

.indevx-ep-dropzone.is-uploading {
	opacity: 0.75;
	cursor: progress;
}

.indevx-ep-dropzone.is-uploaded {
	border-style: solid;
	border-color: #2fa84f;
	background: rgba(47, 168, 79, 0.06);
}

.indevx-ep-dropzone.is-uploaded .indevx-ep-dropzone-icon {
	color: #2fa84f;
}

.indevx-ep-dropzone.is-uploaded .indevx-ep-dropzone-preview::before {
	content: "\2713";
	display: inline-block;
	margin-inline-end: 6px;
	font-weight: 700;
	color: #2fa84f;
}

.indevx-ep-dropzone.is-error {
	border-style: solid;
	border-color: #d63638;
	background: rgba(214, 54, 56, 0.05);
}

.indevx-ep-dropzone.is-error .indevx-ep-dropzone-icon {
	color: #d63638;
}

.indevx-ep-dropzone-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #000000;
	transition: color 0.2s ease, transform 0.2s ease;
}

.indevx-ep-dropzone:hover .indevx-ep-dropzone-icon {
	transform: translateY(-2px);
}

.indevx-ep-dropzone-text {
	display: block;
	font-size: 13.5px;
	font-weight: 500;
	color: #000000;
	opacity: 1;
}

.indevx-ep-dropzone-hint {
	display: block;
	font-size: 11.5px;
	color: #000000;
	opacity: 1;
	letter-spacing: 0.02em;
}

.indevx-ep-dropzone-preview {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #000000;
}

.indevx-ep-receipt-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.indevx-ep-thankyou-notice p {
	margin: 0 0 6px;
}

.indevx-ep-account-receipt {
	margin-top: 24px;
}

.indevx-ep-account-receipt-preview {
	max-width: 220px;
	border-radius: 6px;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

.indevx-ep-account-reupload {
	margin-top: 14px;
	padding: 14px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
}

.indevx-ep-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
}

.indevx-ep-badge-warning {
	background: #fcf1cd;
	color: #6b5300;
}

/* RTL adjustments */
[dir="rtl"] .indevx-ep-info-value {
	text-align: right;
}

/* Dark mode friendliness (relies on currentColor / rgba so it adapts automatically). */
@media (prefers-color-scheme: dark) {
	.indevx-ep-wallet-option,
	.indevx-ep-info-block,
	.indevx-ep-account-reupload {
		background-color: rgba(255, 255, 255, 0.03);
		border-color: rgba(255, 255, 255, 0.15);
	}

	.indevx-ep-dropzone {
		border-color: #9a9a9a;
	}

	.indevx-ep-dropzone-icon {
		color: #000000;
	}
}

@media (max-width: 480px) {
	.indevx-ep-info-block {
		flex-direction: column;
	}

	.indevx-ep-info-label {
		min-width: 0;
	}
}

/* Mobile spacing tightening only (Goal 2). Desktop layout, colors and
   structure are untouched; only margins/paddings are reduced so fields
   and labels sit closer together on small screens. */
@media (max-width: 600px) {
	.indevx-ep-wallet-selector {
		margin: 6px 0;
	}

	.indevx-ep-wallet-selector-label {
		margin-bottom: 6px;
	}

	.indevx-ep-wallet-options {
		display: grid;
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
		gap: 6px;
		margin-bottom: 6px;
	}

	.indevx-ep-wallet-option {
		width: 100%;
		box-sizing: border-box;
		align-items: flex-start;
		padding: 10px 10px;
		gap: 6px;
		font-size: 14px;
		line-height: 1.3;
		min-height: 48px;
	}

	.indevx-ep-wallet-option span {
		white-space: normal;
		word-break: break-word;
		min-width: 0;
	}

	.indevx-ep-wallet-logo {
		max-width: 26px;
		max-height: 26px;
		flex-shrink: 0;
	}

	.indevx-ep-info-block {
		padding: 10px;
		margin: 6px 0;
		gap: 10px;
	}

	.indevx-ep-info-row {
		padding: 4px 0;
		gap: 6px;
	}

	.indevx-ep-info-label {
		min-width: 0;
	}

	.indevx-ep-payment-form {
		margin-top: 8px;
	}

	.indevx-ep-payment-form .form-row {
		margin-bottom: 6px;
	}

	.indevx-ep-payment-form label {
		margin-bottom: 2px;
	}

	.indevx-ep-dropzone {
		padding: 14px 10px;
		border-width: 2px;
		border-style: dashed;
		border-color: #9a9a9a;
		background-color: #f4f4f4;
	}

	.indevx-ep-dropzone:hover,
	.indevx-ep-dropzone.is-dragover {
		background-color: #ececec;
	}

	.indevx-ep-dropzone.is-uploaded {
		border-color: #2fa84f;
		background-color: rgba(47, 168, 79, 0.1);
	}

	.indevx-ep-dropzone.is-error {
		border-color: #d63638;
		background-color: rgba(214, 54, 56, 0.08);
	}

	.indevx-ep-dropzone-icon {
		color: #000000;
	}

	.indevx-ep-dropzone.is-uploaded .indevx-ep-dropzone-icon {
		color: #2fa84f;
	}

	.indevx-ep-dropzone.is-error .indevx-ep-dropzone-icon {
		color: #d63638;
	}

	.indevx-ep-dropzone-text {
		color: #000000;
		opacity: 1;
	}

	.indevx-ep-dropzone-hint {
		color: #000000;
		opacity: 1;
	}

	.indevx-ep-dropzone-preview {
		margin-top: 4px;
		color: #000000;
	}

	.indevx-ep-thankyou-notice p {
		margin: 0 0 4px;
	}

	.indevx-ep-account-receipt {
		margin-top: 14px;
	}

	.indevx-ep-account-reupload {
		margin-top: 8px;
		padding: 10px;
	}
}
