/**
 * RM Popup Info - Modern & Responsive Frontend Styles
 * Author: RamMultimedia Sp. z o.o.
 */

:root {
	--rm-popup-accent: #0088cc;
	--rm-popup-bg: #ffffff;
	--rm-popup-text: #1f2937;
	--rm-popup-radius: 16px;
	--rm-popup-width: 580px;
	--rm-popup-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
	--rm-popup-transition: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Modal Container */
.rm-popup-container {
	position: fixed;
	z-index: 999999;
	display: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.rm-popup-container.rm-active {
	display: flex;
	opacity: 1;
	visibility: visible;
}

/* Backdrop */
.rm-popup-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: #0f172a;
	z-index: 1;
	transition: opacity 0.3s ease;
	cursor: pointer;
}

.rm-popup-backdrop.rm-backdrop-blur {
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

/* Dialog Box */
.rm-popup-dialog {
	position: relative;
	z-index: 2;
	background: var(--rm-popup-bg);
	color: var(--rm-popup-text);
	border-radius: var(--rm-popup-radius);
	box-shadow: var(--rm-popup-shadow);
	width: 100%;
	max-width: var(--rm-popup-width);
	overflow: hidden;
	transition: transform 0.4s var(--rm-popup-transition), opacity 0.4s var(--rm-popup-transition);
	box-sizing: border-box;
}

/* ==========================================================================
   Position Variants
   ========================================================================== */

/* Center Modal */
.rm-popup-container.rm-pos-center {
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

/* Top Sticky / Bar */
.rm-popup-container.rm-pos-top {
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	width: calc(100% - 40px);
	max-width: var(--rm-popup-width);
	align-items: flex-start;
	justify-content: center;
}

/* Sticky Right (Drawer / Floating) */
.rm-popup-container.rm-pos-sticky-right {
	top: 50%;
	right: 24px;
	transform: translateY(-50%);
	max-width: var(--rm-popup-width);
	width: calc(100% - 48px);
}

/* Sticky Left (Drawer / Floating) */
.rm-popup-container.rm-pos-sticky-left {
	top: 50%;
	left: 24px;
	transform: translateY(-50%);
	max-width: var(--rm-popup-width);
	width: calc(100% - 48px);
}

/* Bottom Right Card */
.rm-popup-container.rm-pos-bottom-right {
	bottom: 24px;
	right: 24px;
	max-width: var(--rm-popup-width);
	width: calc(100% - 48px);
}

/* Bottom Left Card */
.rm-popup-container.rm-pos-bottom-left {
	bottom: 24px;
	left: 24px;
	max-width: var(--rm-popup-width);
	width: calc(100% - 48px);
}

/* ==========================================================================
   Entry Animations
   ========================================================================== */

/* Zoom Animation */
.rm-anim-zoom {
	transform: scale(0.85);
	opacity: 0;
}
.rm-popup-container.rm-active .rm-anim-zoom {
	transform: scale(1);
	opacity: 1;
}

/* Fade Animation */
.rm-anim-fade {
	opacity: 0;
}
.rm-popup-container.rm-active .rm-anim-fade {
	opacity: 1;
}

/* Slide Up */
.rm-anim-slide-up {
	transform: translateY(40px);
	opacity: 0;
}
.rm-popup-container.rm-active .rm-anim-slide-up {
	transform: translateY(0);
	opacity: 1;
}

/* Slide Down */
.rm-anim-slide-down {
	transform: translateY(-40px);
	opacity: 0;
}
.rm-popup-container.rm-active .rm-anim-slide-down {
	transform: translateY(0);
	opacity: 1;
}

/* Slide Left */
.rm-anim-slide-left {
	transform: translateX(-50px);
	opacity: 0;
}
.rm-popup-container.rm-active .rm-anim-slide-left {
	transform: translateX(0);
	opacity: 1;
}

/* Slide Right */
.rm-anim-slide-right {
	transform: translateX(50px);
	opacity: 0;
}
.rm-popup-container.rm-active .rm-anim-slide-right {
	transform: translateX(0);
	opacity: 1;
}

/* ==========================================================================
   Inner Content & Components
   ========================================================================== */

/* Close Button (X) */
.rm-popup-close-x {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.06);
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #475569;
	transition: all 0.2s ease;
	z-index: 10;
	padding: 0;
}

.rm-popup-close-x:hover {
	background: rgba(0, 0, 0, 0.12);
	color: #0f172a;
	transform: rotate(90deg) scale(1.05);
}

/* Image / Media */
.rm-popup-media {
	width: 100%;
	position: relative;
	overflow: hidden;
}

.rm-popup-media img {
	width: 100%;
	height: auto;
	max-height: 260px;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease, filter 0.35s ease;
}

.rm-popup-media-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
	cursor: pointer;
	overflow: hidden;
}

.rm-popup-media-link:hover img {
	transform: scale(1.03);
	filter: brightness(1.04);
}

/* Split Layout (Left Image) */
.rm-layout-split {
	display: flex;
	flex-direction: row;
}

.rm-layout-split .rm-popup-media.rm-media-left {
	width: 42%;
	flex-shrink: 0;
}

.rm-layout-split .rm-popup-media.rm-media-left img {
	height: 100%;
	max-height: none;
}

.rm-layout-split .rm-popup-body {
	width: 58%;
}

/* Body Content */
.rm-popup-body {
	padding: 28px 32px 24px;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

/* Badge */
.rm-popup-badge-wrap {
	margin-bottom: 12px;
}

.rm-popup-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: #ffffff;
	padding: 4px 12px;
	border-radius: 20px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Title */
.rm-popup-title {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 12px 0;
	color: inherit;
}

/* Text / HTML content */
.rm-popup-content {
	font-size: 15px;
	line-height: 1.6;
	color: #4b5563;
	margin-bottom: 24px;
}

.rm-popup-content p {
	margin: 0 0 10px 0;
}

.rm-popup-content p:last-child {
	margin-bottom: 0;
}

/* Action Buttons Container */
.rm-popup-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

/* Button Base */
.rm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 22px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 10px;
	cursor: pointer;
	text-decoration: none !important;
	border: 1.5px solid transparent;
	transition: all 0.22s ease;
	outline: none;
	text-align: center;
	line-height: 1.3;
}

/* Primary Button */
.rm-btn-primary {
	background-color: var(--rm-popup-accent);
	color: #ffffff;
	box-shadow: 0 4px 14px rgba(0, 136, 204, 0.35);
}

.rm-btn-primary:hover {
	filter: brightness(1.08);
	transform: translateY(-1.5px);
	box-shadow: 0 6px 20px rgba(0, 136, 204, 0.45);
	color: #ffffff !important;
}

.rm-btn-primary:active {
	transform: translateY(0);
}

/* Secondary Button */
.rm-btn-secondary {
	background-color: #f1f5f9;
	color: #334155;
	border-color: #e2e8f0;
}

.rm-btn-secondary:hover {
	background-color: #e2e8f0;
	color: #0f172a !important;
	transform: translateY(-1.5px);
}

/* Outline Button */
.rm-btn-outline {
	background-color: transparent;
	color: var(--rm-popup-accent);
	border-color: var(--rm-popup-accent);
}

.rm-btn-outline:hover {
	background-color: var(--rm-popup-accent);
	color: #ffffff !important;
	transform: translateY(-1.5px);
}

/* Text Button */
.rm-btn-text {
	background-color: transparent;
	color: #64748b;
	padding-left: 10px;
	padding-right: 10px;
}

.rm-btn-text:hover {
	color: #0f172a !important;
	text-decoration: underline !important;
}

/* ==========================================================================
   Responsive / Mobile Optimization
   ========================================================================== */

@media (max-width: 640px) {
	.rm-popup-container.rm-pos-center,
	.rm-popup-container.rm-pos-top,
	.rm-popup-container.rm-pos-sticky-left,
	.rm-popup-container.rm-pos-sticky-right,
	.rm-popup-container.rm-pos-bottom-right,
	.rm-popup-container.rm-pos-bottom-left {
		top: auto !important;
		bottom: 12px !important;
		left: 12px !important;
		right: 12px !important;
		transform: none !important;
		width: calc(100% - 24px) !important;
		max-width: 100% !important;
		padding: 0 !important;
	}

	.rm-layout-split {
		flex-direction: column !important;
	}

	.rm-layout-split .rm-popup-media.rm-media-left,
	.rm-layout-split .rm-popup-body {
		width: 100% !important;
	}

	.rm-popup-body {
		padding: 20px 18px 16px;
	}

	.rm-popup-title {
		font-size: 18px;
	}

	.rm-popup-content {
		font-size: 13.5px;
		margin-bottom: 18px;
	}

	.rm-popup-actions {
		flex-direction: column;
		width: 100%;
		gap: 8px;
	}

	.rm-btn {
		width: 100%;
	}
}
