/* filepath: wp-content/plugins/rca-api/assets/css/gdpr-terms-modal.css */
/* Purpose: Styles for the GDPR terms modal that appears on the RCA page */
/* Why: Separate stylesheet to avoid conflicts with existing modal systems */
/* Related: templates/parts/gdpr-terms-modal.php, assets/js/modules/gdpr-terms-modal.js */

/**
 * GDPR Terms Modal Styles
 *
 * Design Notes:
 * - Uses gdpr-terms-* prefix to avoid conflicts with existing modal classes
 * - Color scheme matches site theme (primary: #162d50, accent: #61ce70)
 * - Mobile-first responsive design
 *
 * @since 1.2.1
 */

/* ============================================
   Body Lock (prevents scrolling when modal open)
   ============================================ */
body.gdpr-modal-open {
	overflow: hidden;
	position: fixed;
	width: 100%;
	height: 100%;
}

/* ============================================
   Modal Container
   ============================================ */
.gdpr-terms-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gdpr-terms-modal--hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* ============================================
   Overlay (dark background)
   ============================================ */
.gdpr-terms-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 1;
}

/* ============================================
   Modal Box (white container)
   ============================================ */
.gdpr-terms-modal__box {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 900px;
	max-height: 90vh;
	background: #ffffff;
	border-radius: 15px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* ============================================
   Scrollable Content Area
   ============================================ */
.gdpr-terms-modal__content {
	flex: 1;
	overflow-y: auto;
	padding: 30px 40px;
	max-height: calc(80vh - 80px); /* Leave room for footer */
	scrollbar-width: thin;
	scrollbar-color: #61ce70 #e0e0e0;
}

/* Webkit scrollbar styling */
.gdpr-terms-modal__content::-webkit-scrollbar {
	width: 8px;
}

.gdpr-terms-modal__content::-webkit-scrollbar-track {
	background: #e0e0e0;
	border-radius: 4px;
}

.gdpr-terms-modal__content::-webkit-scrollbar-thumb {
	background: #61ce70;
	border-radius: 4px;
}

.gdpr-terms-modal__content::-webkit-scrollbar-thumb:hover {
	background: #4db85c;
}

/* ============================================
   Scroll Hint Banner (in footer)
   ============================================ */
.gdpr-terms-modal__hint {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 10px 16px;
	margin: 10px 0;
	background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
	border: 1px solid #ff9800;
	border-radius: 6px;
	color: #e65100;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hidden state when user has scrolled to bottom */
.gdpr-terms-modal__hint.is-hidden {
	opacity: 0;
	transform: translateY(-10px);
	pointer-events: none;
	height: 0;
	padding: 0;
	margin: 0;
	overflow: hidden;
}

.gdpr-terms-modal__hint-icon {
	font-size: 1.1rem;
	flex-shrink: 0;
}

.gdpr-terms-modal__hint-text {
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.3;
	text-align: center;
}

/* ============================================
   Content Typography
   ============================================ */
.gdpr-terms-modal__content h2 {
	color: #162d50;
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 20px 0;
	padding-bottom: 10px;
	border-bottom: 2px solid #61ce70;
}

.gdpr-terms-modal__content h2:not(:first-child) {
	margin-top: 30px;
}

.gdpr-terms-modal__content h4 {
	color: #162d50;
	font-size: 1.15rem;
	font-weight: 600;
	margin: 25px 0 15px 0;
}

.gdpr-terms-modal__content h5 {
	color: #333;
	font-size: 1rem;
	font-weight: 600;
	margin: 20px 0 10px 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.gdpr-terms-modal__content p {
	color: #333;
	font-size: 0.95rem;
	line-height: 1.7;
	margin: 0 0 15px 0;
	text-align: justify;
}

.gdpr-terms-modal__content ul {
	margin: 0 0 20px 0;
	padding-left: 20px;
}

.gdpr-terms-modal__content li {
	margin-bottom: 10px;
}

.gdpr-terms-modal__content li p {
	margin-bottom: 8px;
}

.gdpr-terms-modal__content li p:last-child {
	margin-bottom: 0;
}

/* ============================================
   Footer (notice + button)
   ============================================ */
.gdpr-terms-modal__footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
	padding: 20px 40px;
	background: #f8f9fa;
	border-top: 1px solid #e0e0e0;
}

.gdpr-terms-modal__notice {
	color: #555;
	font-size: 0.9rem;
	text-align: center;
	line-height: 1.5;
}

/* ============================================
   Continue Button
   ============================================ */
.gdpr-terms-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 200px;
	padding: 14px 30px;
	font-size: 1rem;
	font-weight: 600;
	color: #ffffff;
	background-color: #cccccc;
	border: none;
	border-radius: 8px;
	cursor: not-allowed;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.gdpr-terms-modal__btn:disabled {
	background-color: #cccccc;
	cursor: not-allowed;
	opacity: 0.7;
}

.gdpr-terms-modal__btn:not(:disabled),
.gdpr-terms-modal__btn--enabled {
	background-color: #61ce70;
	cursor: pointer;
	opacity: 1;
}

.gdpr-terms-modal__btn:not(:disabled):hover,
.gdpr-terms-modal__btn--enabled:hover {
	background-color: #4db85c;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(97, 206, 112, 0.4);
}

.gdpr-terms-modal__btn:not(:disabled):active,
.gdpr-terms-modal__btn--enabled:active {
	transform: translateY(0);
	box-shadow: none;
}

.gdpr-terms-modal__btn:focus {
	outline: 3px solid rgba(97, 206, 112, 0.5);
	outline-offset: 2px;
}

/* ============================================
   Responsive Styles - Tablet
   ============================================ */
@media screen and (max-width: 768px) {
	.gdpr-terms-modal {
		padding: 15px;
	}

	.gdpr-terms-modal__box {
		max-height: 95vh;
		border-radius: 12px;
	}

	.gdpr-terms-modal__content {
		padding: 20px 25px;
		max-height: calc(85vh - 120px);
	}

	.gdpr-terms-modal__hint {
		padding: 10px 14px;
		margin-bottom: 15px;
	}

	.gdpr-terms-modal__hint-text {
		font-size: 0.9rem;
	}

	.gdpr-terms-modal__content h2 {
		font-size: 1.3rem;
	}

	.gdpr-terms-modal__content h4 {
		font-size: 1.1rem;
	}

	.gdpr-terms-modal__content p {
		font-size: 0.9rem;
		text-align: left;
	}

	.gdpr-terms-modal__footer {
		padding: 15px 25px;
	}

	.gdpr-terms-modal__notice {
		font-size: 0.85rem;
	}

	.gdpr-terms-modal__btn {
		min-width: 180px;
		padding: 12px 25px;
		font-size: 0.95rem;
	}
}

/* ============================================
   Responsive Styles - Mobile
   ============================================ */
@media screen and (max-width: 480px) {
	.gdpr-terms-modal {
		padding: 10px;
	}

	.gdpr-terms-modal__box {
		max-height: 98vh;
		border-radius: 10px;
	}

	.gdpr-terms-modal__content {
		padding: 15px 20px;
		max-height: calc(90vh - 130px);
	}

	.gdpr-terms-modal__hint {
		padding: 10px 12px;
		margin-bottom: 12px;
		gap: 8px;
	}

	.gdpr-terms-modal__hint-icon {
		font-size: 1rem;
	}

	.gdpr-terms-modal__hint-text {
		font-size: 0.85rem;
	}

	.gdpr-terms-modal__content h2 {
		font-size: 1.15rem;
	}

	.gdpr-terms-modal__content h4 {
		font-size: 1rem;
	}

	.gdpr-terms-modal__content h5 {
		font-size: 0.9rem;
	}

	.gdpr-terms-modal__content p,
	.gdpr-terms-modal__content li {
		font-size: 0.85rem;
	}

	.gdpr-terms-modal__footer {
		padding: 12px 20px;
		gap: 12px;
	}

	.gdpr-terms-modal__notice {
		font-size: 0.8rem;
	}

	.gdpr-terms-modal__btn {
		width: 100%;
		min-width: unset;
		padding: 14px 20px;
	}
}

/* ============================================
   Accessibility - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
	.gdpr-terms-modal {
		transition: none;
	}

	.gdpr-terms-modal__btn {
		transition: none;
	}

	.gdpr-terms-modal__btn:hover {
		transform: none;
	}
}

/* ============================================
   High Contrast Mode Support
   ============================================ */
@media (prefers-contrast: high) {
	.gdpr-terms-modal__box {
		border: 2px solid #000;
	}

	.gdpr-terms-modal__btn:disabled {
		background-color: #666;
		color: #ccc;
	}

	.gdpr-terms-modal__btn:not(:disabled) {
		background-color: #006400;
	}
}

/* ============================================
   Print Styles (hide modal when printing)
   ============================================ */
@media print {
	.gdpr-terms-modal {
		display: none !important;
	}

	body.gdpr-modal-open {
		overflow: visible;
		position: static;
	}
}
