/**
 * Public-facing CSS styles.
 *
 * @package    SD_TPV
 * @subpackage SD_TPV/public/css
 * @author     SeDigital
 * @since      2.0.0
 */

.sd-tpv-form-container {  }

.sd-tpv-paymethods {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin: 15px 1%;
	align-items: center;
}

.sd-tpv-paymethods__title {
	font-weight: 600;
	width: 100%;
	margin: 0;
}

.sd-tpv-paymethods__option {
	border: 2px solid #dcdcdc;
	border-radius: 6px;
	padding: 12px;
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	flex: 1 1 220px;
	background-color: #fff;
}

.sd-tpv-paymethods__option input[type="radio"] {
	margin: 0;
}

.sd-tpv-paymethods__option img {
	max-height: 48px;
	width: auto;
}

.sd-tpv-paymethods__option.selected {
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.sd-tpv-order-display {
	font-size: 1.4em;
	font-weight: bold;
	display: inline-block;
	margin-bottom: 4px;
}

table.table-form-tpv {
	width: 48%;
	display: inline-block;
	margin-left: 1%;
	transition: all ease 0.5s;
}

table.table-form-tpv.loading {
	opacity: 0.5;
}

table.table-form-tpv td {
	position: relative;
	overflow: visible;
}

table.table-form-tpv td + td {
	padding-left: 10px;
}

table.table-form-tpv input#amountTPV.warning,
table.table-form-tpv input#orderNumber.warning,
table.table-form-tpv input#orderDesc.warning {
	border-color: red;
}

input#amountTPV {
	width: 90%;
	font-size: 2em;
	border: 0;
	text-align: right;
	border-bottom: 1px solid #666;
	margin: 5px 0;
	padding: 0 4px;
}

input#orderNumber,
input#orderDesc {
	width: 90%;
	font-size: 2em;
	border: 0;
	text-align: right;
	color: #666;
	border-bottom: 1px solid #666;
	margin: 5px 0;
	padding: 0 4px;
}

input#amountTPV + span {
	font-size: 2em;
}

table.table-form-tpv span.error {
	position: absolute;
	z-index: -99;
	top: 50%;
	background-color: red;
	color: white;
	width: auto;
	white-space: nowrap;
	left: 50%;
	font-size: 0.8em;
	transform: translate(-50%, -50%);
	padding: 4px;
	transition: opacity ease 0.5s;
	opacity: 0;
}

table.table-form-tpv span.error.show {
	display: block;
	top: 50%;
	z-index: 20;
	opacity: 1;
}

.section-right-form-tpv {
	display: inline-block;
	vertical-align: top;
	width: 48%;
	margin-left: 2%;
}

.img-formaspago {
	text-align: center;
	margin: 10px;
}

.img-formaspago img {
	width: 40%;
}

a#sd_tpv_submit,
.sd-tpv-submit-button {
	display: block;
	text-align: center;
	font-size: 2em;
	color: #444;
	border: 1px solid #444;
	padding: 10px;
	text-decoration: none;
	cursor: pointer;
}

a#sd_tpv_submit:before,
.sd-tpv-submit-button:before {
	content: '';
	width: 40px;
	height: 40px;
	background-image: url("../img/ico-payment.png");
	background-size: contain;
	display: inline-block;
	vertical-align: middle;
	margin-right: 12px;
}

a#sd_tpv_submit:after,
.sd-tpv-submit-button:after {
	content: '>';
	display: inline-block;
	vertical-align: middle;
	margin-left: 12px;
}

table.table-result-tpv {
	margin: auto;
	min-width: 50%;
}

table.table-result-tpv tr td {
	padding: 5px;
}

table.table-result-tpv tr td:first-of-type {
	text-align: right;
}

table.table-result-tpv tr td:last-of-type {
	text-align: left;
	font-weight: bold;
}

/* Modern Public Styles */
.sd-tpv-form {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: #f8f9fa;
	padding: 30px;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.08);
	max-width: 800px;
	margin: 0 auto;
}

.sd-tpv-form h2 {
	color: #1d2327;
	font-weight: 700;
	margin-bottom: 20px;
	text-align: center;
}

.sd-tpv-paymethods {
	background: #fff;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sd-tpv-paymethods__title {
	color: #1d2327;
	font-size: 18px;
	font-weight: 600;
	text-align: center;
	margin-bottom: 15px;
}

.sd-tpv-paymethods__option {
	border: 2px solid #e1e5e9;
	border-radius: 8px;
	padding: 15px;
	display: flex;
	align-items: center;
	gap: 15px;
	cursor: pointer;
	transition: all 0.2s ease;
	flex: 1 1 220px;
	background-color: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sd-tpv-paymethods__option:hover {
	border-color: #007cba;
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sd-tpv-paymethods__option.selected {
	border-color: #007cba;
	background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
	box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.15);
}

.sd-tpv-paymethods__option img {
	max-height: 50px;
	width: auto;
	transition: transform 0.2s;
}

.sd-tpv-paymethods__option.selected img {
	transform: scale(1.05);
}

table.table-form-tpv {
	width: 48%;
	display: inline-block;
	margin-left: 1%;
	transition: all ease 0.5s;
	background: #fff;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

table.table-form-tpv.loading {
	opacity: 0.5;
	transform: scale(0.98);
}

table.table-form-tpv td {
	position: relative;
	overflow: visible;
	padding: 10px;
}

table.table-form-tpv td + td {
	padding-left: 10px;
}

input#amountTPV {
	width: 90%;
	font-size: 2em;
	border: 2px solid #e1e5e9;
	text-align: right;
	border-radius: 6px;
	margin: 5px 0;
	padding: 10px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

input#amountTPV:focus {
	border-color: #007cba;
	box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.2);
	outline: none;
}

input#orderNumber,
input#orderDesc {
	width: 90%;
	font-size: 2em;
	border: 2px solid #e1e5e9;
	text-align: right;
	color: #1d2327;
	border-radius: 6px;
	margin: 5px 0;
	padding: 10px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

input#orderNumber:focus,
input#orderDesc:focus {
	border-color: #007cba;
	box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.2);
	outline: none;
}

.sd-tpv-order-display {
	font-size: 1.5em;
	font-weight: 600;
	color: #007cba;
	background: #f0f8ff;
	padding: 8px 12px;
	border-radius: 4px;
	display: inline-block;
}

.section-right-form-tpv {
	display: inline-block;
	vertical-align: top;
	width: 48%;
	margin-left: 2%;
	background: #fff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	text-align: center;
}

.img-formaspago {
	margin: 10px;
}

.img-formaspago img {
	width: 40%;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

a#sd_tpv_submit,
.sd-tpv-submit-button {
	display: inline-block;
	text-align: center;
	font-size: 1.8em;
	color: #fff;
	border: none;
	padding: 15px 30px;
	border-radius: 8px;
	text-decoration: none;
	cursor: pointer;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(0, 123, 186, 0.3);
	background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
}

a#sd_tpv_submit:hover,
.sd-tpv-submit-button:hover {
	background: linear-gradient(135deg, #005a87 0%, #00466b 100%);
	box-shadow: 0 6px 20px rgba(0, 123, 186, 0.4);
	transform: translateY(-2px);
}

table.table-result-tpv {
	margin: auto;
	min-width: 50%;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

table.table-result-tpv tr td {
	padding: 15px;
	border-bottom: 1px solid #f0f0f0;
}

table.table-result-tpv tr td:first-of-type {
	text-align: right;
	font-weight: 600;
	color: #1d2327;
}

table.table-result-tpv tr td:last-of-type {
	text-align: left;
	font-weight: bold;
	color: #007cba;
	font-size: 1.1em;
}

@media all and (max-width: 760px) {
	.sd-tpv-form {
		padding: 20px;
		margin: 10px;
	}

	.sd-tpv-paymethods {
		padding: 15px;
		margin: 15px 0;
	}

	table.table-form-tpv {
		width: 100%;
		display: block;
		margin-left: 0;
		margin-bottom: 20px;
	}

	.section-right-form-tpv {
		width: 100%;
		margin-left: 0;
		display: block;
	}

	.img-formaspago img {
		width: 80%;
		margin: 1em;
	}

	table.table-form-tpv td + td {
		width: 50%;
	}

	input#amountTPV,
	input#orderNumber,
	input#orderDesc {
		width: 80%;
		font-size: 1.5em;
	}

	a#sd_tpv_submit,
	.sd-tpv-submit-button {
		font-size: 1.4em;
		padding: 12px 24px;
	}
}

