/* ─────────────────────────────────────────────────────────
   Coxinha Play — Payment Modal CSS
───────────────────────────────────────────────────────── */

/* ── Backdrop ─────────────────────────────────────────── */
#crp-pay-modal {
	position: fixed;
	inset: 0;
	z-index: 9500;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

#crp-pay-modal[hidden] { display: none; }

#crp-pay-modal-bg {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.7);
	backdrop-filter: blur(6px);
}

/* ── Box ──────────────────────────────────────────────── */
.crp-pm-box {
	position: relative;
	background: #fff;
	border-radius: 22px;
	width: 100%;
	max-width: 460px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 8px 48px rgba(0,0,0,.4);
	animation: crp-pop .28s cubic-bezier(.34,1.56,.64,1);
}

.crp-pm-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 24px 16px;
	border-bottom: 1px solid #F0D5B0;
}

.crp-pm-logo {
	height: 40px;
	width: auto;
}

.crp-pm-title {
	font-size: 1.1rem;
	font-weight: 800;
	color: #3D1A00;
	flex: 1;
}

.crp-pm-close {
	background: none;
	border: none;
	font-size: 1.3rem;
	color: #9E7B5A;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 6px;
	transition: background .15s;
}

.crp-pm-close:hover { background: #FFF5E6; color: #3D1A00; }

/* ── Steps ────────────────────────────────────────────── */
.crp-pm-step { padding: 20px 24px 24px; }
.crp-pm-step[hidden] { display: none; }

.crp-pm-step h3 {
	font-size: 1rem;
	font-weight: 700;
	color: #3D1A00;
	margin-bottom: 16px;
}

/* ── Mensagem ─────────────────────────────────────────── */
.crp-pm-msg {
	font-size: .85rem;
	font-weight: 600;
	padding: 8px 12px;
	border-radius: 8px;
	margin-bottom: 14px;
	display: none;
}

.crp-pm-msg:not(:empty) { display: block; }
.crp-pm-msg-error   { background: #FFEBEE; color: #E53935; border: 1px solid #FFCDD2; }
.crp-pm-msg-success { background: #E8F5E9; color: #43A047; border: 1px solid #C8E6C9; }

/* ── Form fields ──────────────────────────────────────── */
.crp-pm-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-bottom: 14px;
}

.crp-pm-field label {
	font-size: .82rem;
	font-weight: 700;
	color: #5C2D00;
}

.crp-pm-field input {
	padding: 11px 14px;
	border: 2px solid #F0D5B0;
	border-radius: 10px;
	font-size: .95rem;
	color: #3D1A00;
	background: #FFF8EE;
	font-family: inherit;
	transition: border-color .2s;
}

.crp-pm-field input:focus {
	outline: none;
	border-color: #E8921B;
	box-shadow: 0 0 0 3px rgba(232,146,27,.15);
}

/* Prefixo R$ no campo de valor */
.crp-pm-amount-wrap {
	position: relative;
}

.crp-pm-amount-wrap::before {
	content: 'R$';
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-weight: 800;
	color: #E8921B;
	font-size: .95rem;
}

.crp-pm-amount-wrap input {
	padding-left: 40px;
}

.crp-pm-hint {
	font-size: .74rem;
	color: #9E7B5A;
}

/* ── Métodos de pagamento ─────────────────────────────── */
.crp-pm-methods {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.crp-pm-method-btn {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 18px;
	background: #FFF8EE;
	border: 2px solid #F0D5B0;
	border-radius: 14px;
	cursor: pointer;
	transition: border-color .2s, background .2s;
	text-align: left;
	width: 100%;
}

.crp-pm-method-btn:hover {
	border-color: #E8921B;
	background: #FFF5E6;
}

.crp-pm-method-icon { font-size: 1.8rem; flex-shrink: 0; }

.crp-pm-method-info strong {
	display: block;
	font-size: .95rem;
	color: #3D1A00;
	font-weight: 700;
}

.crp-pm-method-info small {
	font-size: .78rem;
	color: #9E7B5A;
}

/* ── PIX ──────────────────────────────────────────────── */
.crp-pix-wrap {
	text-align: center;
}

.crp-pix-qr-img {
	width: 180px;
	height: 180px;
	margin: 0 auto 14px;
	display: block;
	border: 3px solid #F0D5B0;
	border-radius: 12px;
	background: #fff;
}

.crp-pix-label {
	font-size: .82rem;
	color: #9E7B5A;
	margin-bottom: 8px;
}

.crp-pix-code-wrap {
	display: flex;
	gap: 8px;
	margin-bottom: 14px;
}

.crp-pix-code-wrap textarea {
	flex: 1;
	padding: 8px 10px;
	border: 1px solid #F0D5B0;
	border-radius: 8px;
	font-size: .72rem;
	color: #9E7B5A;
	resize: none;
	height: 52px;
	background: #FFF8EE;
	font-family: monospace;
}

#crp-pix-copy {
	padding: 8px 14px;
	background: #E8921B;
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-size: .82rem;
	font-weight: 700;
	white-space: nowrap;
	transition: background .15s;
}

#crp-pix-copy:hover { background: #C47510; }

.crp-pix-status {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: .85rem;
	color: #9E7B5A;
	margin-top: 8px;
}

.crp-pix-pulse {
	width: 10px;
	height: 10px;
	background: #43A047;
	border-radius: 50%;
	animation: crp-pix-pulse 1.2s ease-in-out infinite;
}

@keyframes crp-pix-pulse {
	0%,100% { opacity: 1; transform: scale(1); }
	50%      { opacity: .4; transform: scale(0.7); }
}

.crp-pix-timer-wrap {
	background: #FFF5E6;
	border-radius: 10px;
	padding: 10px;
	margin-top: 12px;
	font-size: .82rem;
	color: #9E7B5A;
	text-align: center;
}

.crp-pix-timer {
	font-weight: 900;
	font-size: 1.1rem;
	color: #E8921B;
	font-variant-numeric: tabular-nums;
}

/* Loading spinner */
.crp-pm-loading {
	text-align: center;
	padding: 40px 0;
}

.crp-pm-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #F0D5B0;
	border-top-color: #E8921B;
	border-radius: 50%;
	animation: crp-spin .8s linear infinite;
	margin: 0 auto 14px;
}

/* ── Cartão — MP Secure Fields ───────────────────────── */
.crp-sf-form { display: flex; flex-direction: column; gap: 12px; }

.crp-sf-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.crp-sf-iframe {
	border: 2px solid #F0D5B0;
	border-radius: 10px;
	background: #FFF8EE;
	height: 46px;
	padding: 0 4px;
	transition: border-color .2s;
	overflow: hidden;
}

.crp-sf-iframe.mp-focused,
.crp-sf-iframe:focus-within {
	border-color: #E8921B;
	box-shadow: 0 0 0 3px rgba(232,146,27,.15);
}

/* ── Sucesso ──────────────────────────────────────────── */
.crp-pm-success {
	text-align: center;
	padding: 32px 24px;
}

.crp-pm-success-icon { font-size: 4rem; margin-bottom: 12px; }

.crp-pm-success h3 {
	font-size: 1.3rem;
	color: #43A047;
	margin-bottom: 8px;
}

.crp-pm-success p { color: #9E7B5A; font-size: .9rem; }

/* ── Botões ───────────────────────────────────────────── */
.crp-pm-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 13px;
	background: #E8921B;
	color: #fff;
	border: none;
	border-radius: 12px;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s;
	margin-top: 6px;
	font-family: inherit;
}

.crp-pm-btn:hover     { background: #C47510; }
.crp-pm-btn:disabled  { opacity: .6; cursor: not-allowed; }
.crp-pm-btn-secondary { background: transparent; color: #9E7B5A; border: 2px solid #F0D5B0; }
.crp-pm-btn-secondary:hover { background: #FFF5E6; color: #3D1A00; border-color: #E8921B; }

@media (max-width: 480px) {
	.crp-pm-box { border-radius: 20px 20px 0 0; max-height: 95vh; }
	#crp-pay-modal { align-items: flex-end; padding: 0; }
}
