/**
 * BidelaiT - Aceite Termo e Condições
 * Frontend Styles
 */

/* ==========================================================================
   Modal de Termos e Condições
   ========================================================================== */
.bidelait-atc-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	font-family: inherit;
	box-sizing: border-box;
}

/* Força display: flex e centralização total mesmo se JS aplicar show() ou display: block */
.bidelait-atc-modal.bidelait-atc-open,
.bidelait-atc-modal[style*="display: block"],
.bidelait-atc-modal[style*="display: flex"] {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.bidelait-atc-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(2px);
	z-index: 999998;
}

.bidelait-atc-modal-dialog {
	position: relative;
	max-width: 680px;
	width: 92%;
	max-height: 85vh;
	margin: auto; /* Fallback automático: centraliza horizontal e verticalmente */
	display: flex;
	flex-direction: column;
	background: #ffffff;
	color: #2c3338;
	border-radius: 8px;
	box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
	padding: 0;
	overflow: hidden;
	z-index: 1000000;
	box-sizing: border-box;
}

.bidelait-atc-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	border-bottom: 1px solid #e2e4e7;
	background: #fbfbfb;
	box-sizing: border-box;
}

.bidelait-atc-modal-header h2 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: #1d2327;
}

.bidelait-atc-term-version {
	font-size: 0.85rem;
	color: #646970;
	background: #f0f0f1;
	padding: 2px 8px;
	border-radius: 4px;
	margin-left: auto;
	margin-right: 12px;
}

.bidelait-atc-modal-close {
	background: transparent;
	border: 0;
	font-size: 24px;
	line-height: 1;
	color: #787c82;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	transition: color 0.2s, background-color 0.2s;
}

.bidelait-atc-modal-close:hover,
.bidelait-atc-modal-close:focus {
	color: #d63638;
	background-color: #f0f0f1;
	outline: none;
}

.bidelait-atc-modal-body {
	padding: 20px 24px;
	overflow-y: auto;
	max-height: 55vh;
	line-height: 1.6;
	font-size: 0.95rem;
	box-sizing: border-box;
}

.bidelait-atc-modal-content p:first-child {
	margin-top: 0;
}

.bidelait-atc-modal-content p:last-child {
	margin-bottom: 0;
}

.bidelait-atc-modal-footer {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: flex-end;
	padding: 14px 24px;
	border-top: 1px solid #e2e4e7;
	background: #fbfbfb;
	box-sizing: border-box;
}

.bidelait-atc-modal-message {
	margin-right: auto;
	font-size: 0.9rem;
	font-weight: 500;
	color: #007017;
}

body.bidelait-atc-modal-open {
	overflow: hidden !important;
}

/* ==========================================================================
   Barra Inferior de Aceite
   ========================================================================== */
.bidelait-atc-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	background: #ffffff;
	border-top: 1px solid #dcdcde;
	display: none;
	align-items: center;
	justify-content: space-between;
	padding: 14px 24px;
	box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
	font-family: inherit;
	gap: 16px;
	box-sizing: border-box;
}

.bidelait-atc-bar-left {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	max-width: 75%;
}

.bidelait-atc-bar-text {
	font-size: 0.92rem;
	color: #2c3338;
	line-height: 1.4;
}

.bidelait-atc-bar-link {
	font-size: 0.9rem;
	color: #2271b1;
	text-decoration: underline;
	font-weight: 500;
}

.bidelait-atc-bar-link:hover {
	color: #135e96;
}

.bidelait-atc-bar-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-shrink: 0;
}

/* Responsividade */
@media (max-width: 768px) {
	.bidelait-atc-modal-dialog {
		width: 95%;
		max-height: 90vh;
	}

	.bidelait-atc-bar {
		flex-direction: column;
		align-items: stretch;
		padding: 16px;
		gap: 12px;
	}

	.bidelait-atc-bar-left {
		max-width: 100%;
	}

	.bidelait-atc-bar-actions {
		justify-content: flex-end;
		width: 100%;
	}
}
