/* RecyclingPortal Eventkalender Client 1.2.1 */

.rp-events {
	width: min(1180px, calc(100vw - 40px));
	max-width: 1180px;
	margin: 0 auto;
	box-sizing: border-box;
	font-family: inherit;
}

.rp-events-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	width: 100%;
}

.rp-event-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 10px;
	border: 1px solid #d6d6d6;
	background: #fff;
	box-sizing: border-box;
	transition: transform .2s ease, box-shadow .2s ease;
	cursor: pointer;
}

.rp-event-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 16px rgba(0,0,0,.13);
}

.rp-event-card[hidden] {
	display: none !important;
}

.rp-event-featured {
	border: 3px solid #004085;
}

.rp-top-banner {
	margin: -10px -10px 10px;
	padding: 7px 10px;
	background: #004085;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .03em;
	text-align: center;
}

.rp-event-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	min-height: 106px;
	margin-bottom: 10px;
}

.rp-event-heading {
	min-width: 0;
	flex: 1;
}

.rp-event-title {
	margin: 0 0 8px;
	font-size: 20px;
	line-height: 1.25;
	font-weight: 700;
}

.rp-event-title a {
	color: inherit;
	text-decoration: none !important;
}

.rp-event-title a:hover {
	color: #004085;
	text-decoration: none !important;
}

.rp-event-date {
	font-size: 13px;
	line-height: 1.45;
	color: #666;
}

.rp-date-badges {
	flex: 0 0 44px;
	width: 44px;
	background: #004085;
	color: #fff;
	text-align: center;
}

.rp-date-badge {
	padding: 5px 2px;
	border-bottom: 1px solid rgba(255,255,255,.45);
}

.rp-date-badge:last-child {
	border-bottom: 0;
}

.rp-date-badge strong {
	display: block;
	margin: 0 0 2px;
	font-size: 24px;
	line-height: 1;
	font-weight: 700;
}

.rp-date-badge span {
	display: block;
	font-size: 10px;
	line-height: 1.1;
	font-weight: 600;
}

.rp-event-image {
	overflow: hidden;
	width: 100%;
	margin: 0 0 13px;
	padding: 8px;
	border: 1px solid #ddd;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0,0,0,.14);
	box-sizing: border-box;
}

.rp-event-image a,
.rp-event-image img {
	display: block;
	width: 100%;
}

.rp-event-image img {
	height: auto;
	transition: transform .3s ease;
}

.rp-event-card:hover .rp-event-image img {
	transform: scale(1.03);
}

.rp-event-content {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.rp-event-description {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5;
	margin: 0 0 5px;
	font-size: 14px;
	line-height: 1.45;
	color: #333;
}

.rp-event-arrow {
	display: inline-block;
	margin-top: 2px;
	color: #004085 !important;
	font-size: 17px;
	line-height: 1;
	text-decoration: none !important;
	transition: color .2s ease, transform .2s ease;
}

.rp-event-arrow:hover {
	color: #2b6fa3 !important;
	text-decoration: none !important;
	transform: translateX(4px);
}

.rp-events-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 28px 0 10px;
}

.rp-events-pagination[hidden] {
	display: none !important;
}

.rp-page-button {
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	border: 1px solid #cfcfcf;
	background: #fff;
	color: #333;
	font-family: inherit;
	font-size: 13px;
	cursor: pointer;
}

.rp-page-button:hover,
.rp-page-button.is-current {
	border-color: #004085;
	background: #004085;
	color: #fff;
}

.rp-page-button:disabled {
	opacity: .45;
	cursor: default;
}

.rp-events-message {
	margin: 20px 0;
	text-align: center;
}

@media (max-width: 980px) {
	.rp-events-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.rp-events {
		width: 100%;
		padding: 0 10px;
	}

	.rp-events-list {
		grid-template-columns: 1fr;
	}

	.rp-event-card-head {
		min-height: 0;
	}
}


/* Version 1.2.0 – weiße Datumszahlen und lokales Event-Popup */
.rp-date-badge strong,
.rp-date-badge span {
	color: #ffffff !important;
}

.rp-event-popup-trigger,
.rp-event-image-button,
.rp-event-arrow {
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	background: transparent;
	font-family: inherit;
	cursor: pointer;
}

.rp-event-popup-trigger {
	display: inline;
	margin: 0;
	padding: 0;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
	font-weight: inherit;
	text-align: left;
}

.rp-event-popup-trigger:hover {
	color: #004085;
}

.rp-event-image-button {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
}

.rp-event-arrow {
	padding: 0;
}

.rp-event-modal[hidden] {
	display: none !important;
}

html.rp-event-modal-open,
html.rp-event-modal-open body {
	overflow: hidden;
}

.rp-event-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.rp-event-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.7);
}

.rp-event-modal-dialog {
	position: relative;
	z-index: 1;
	width: min(820px, 100%);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	background: #fff;
	box-shadow: 0 18px 60px rgba(0,0,0,.35);
}

.rp-event-modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 3;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.95);
	color: #111;
	font-size: 28px;
	line-height: 36px;
	text-align: center;
	cursor: pointer;
}

.rp-event-modal-image {
	padding: 18px 18px 0;
	background: #fff;
}

.rp-event-modal-image img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 480px;
	margin: 0 auto;
}

.rp-event-modal-body {
	padding: 24px 30px 32px;
	color: #222;
	text-align: left;
}

.rp-event-modal-date {
	display: inline-block;
	margin: 0 0 22px;
	padding: 8px 12px;
	background: #004085;
	color: #fff;
	font-size: 14px;
	line-height: 1.3;
	font-weight: 700;
}

.rp-event-modal-body h2 {
	margin: 0 0 20px;
	font-size: 29px;
	line-height: 1.2;
}

.rp-event-modal-content {
	font-size: 15px;
	line-height: 1.7;
}

.rp-event-modal-content p {
	margin: 0 0 22px;
}

.rp-event-modal-content a {
	color: #004085;
}

@media (max-width: 640px) {
	.rp-event-modal {
		padding: 10px;
	}

	.rp-event-modal-dialog {
		max-height: calc(100vh - 20px);
	}

	.rp-event-modal-body {
		padding: 20px;
	}

	.rp-event-modal-body h2 {
		font-size: 23px;
	}
}


/* Version 1.2.1 – Popup sicher vor Theme-Header/Footer und scrollbar */
.rp-event-modal {
	z-index: 2147483647 !important;
	overflow-y: auto !important;
	overscroll-behavior: contain;
	align-items: flex-start !important;
	-webkit-overflow-scrolling: touch;
}

.rp-event-modal-dialog {
	flex: 0 0 auto;
	max-height: none !important;
	margin: auto 0;
	overflow: visible !important;
}

.rp-event-modal-backdrop {
	position: fixed !important;
	z-index: -1;
}

html.rp-event-modal-open,
body.rp-event-modal-open {
	overflow: hidden !important;
}

@media (max-width: 640px) {
	.rp-event-modal-dialog {
		margin: 0;
	}
}


/* Version 1.2.2 – Textbereich wie Bildbreite */
.rp-event-modal-body{
    max-width:720px;
    margin:0 auto;
    padding:24px 24px 32px;
    box-sizing:border-box;
}

.rp-event-modal-content{
    max-width:720px;
    margin:0 auto;
    padding:22px 24px;
    border:1px solid #d9d9d9;
    background:#fff;
    box-sizing:border-box;
}

.rp-event-modal-date,
.rp-event-modal-body h2{
    max-width:720px;
    margin-left:auto;
    margin-right:auto;
}


/* Version 1.2.3 – einheitlich 720 px, ohne Rahmen */
.rp-event-modal-image,
.rp-event-modal-body,
.rp-event-modal-date,
.rp-event-modal-body h2,
.rp-event-modal-content{
    max-width:720px;
    margin-left:auto;
    margin-right:auto;
    box-sizing:border-box;
}

.rp-event-modal-content{
    border:0 !important;
    background:transparent !important;
    padding:0 !important;
}


/* Version 1.3.0 – Responsive Feinschliff und direkter Popup-Link */
.rp-event-modal-dialog {
	width: min(820px, calc(100vw - 48px));
}

.rp-event-modal-close {
	position: sticky;
	float: right;
	top: 10px;
	right: 12px;
	margin: 10px 12px -48px 0;
	z-index: 5;
}

.rp-event-modal-image,
.rp-event-modal-body,
.rp-event-modal-date,
.rp-event-modal-body h2,
.rp-event-modal-content {
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

.rp-event-modal-content {
	border: 0 !important;
	background: transparent !important;
	padding: 0 !important;
}

.rp-event-page-link {
	display: block;
	width: fit-content;
	margin: 18px 0 0 auto;
	color: #888888 !important;
	font-size: 10px;
	line-height: 1;
	font-weight: 400;
	text-decoration: none !important;
	cursor: pointer;
}

.rp-event-page-link:hover {
	color: #004085 !important;
	text-decoration: none !important;
}

@media (max-width: 1024px) {
	.rp-event-modal {
		padding: 20px;
	}

	.rp-event-modal-dialog {
		width: min(760px, 92vw);
	}

	.rp-event-modal-image,
	.rp-event-modal-body,
	.rp-event-modal-date,
	.rp-event-modal-body h2,
	.rp-event-modal-content {
		max-width: 680px;
	}

	.rp-event-modal-body {
		padding-left: 22px;
		padding-right: 22px;
	}
}

@media (max-width: 767px) {
	.rp-event-modal {
		padding: 12px;
	}

	.rp-event-modal-dialog {
		width: calc(100vw - 24px);
		margin: 0;
	}

	.rp-event-modal-close {
		top: 8px;
		right: 8px;
		margin: 8px 8px -46px 0;
		width: 36px;
		height: 36px;
		font-size: 26px;
		line-height: 34px;
	}

	.rp-event-modal-image {
		max-width: 100%;
		padding: 14px 14px 0;
	}

	.rp-event-modal-image img {
		width: 100%;
		max-height: none;
	}

	.rp-event-modal-body {
		max-width: 100%;
		padding: 18px 16px 24px;
	}

	.rp-event-modal-date {
		margin-bottom: 18px;
		font-size: 13px;
	}

	.rp-event-modal-body h2 {
		margin-bottom: 16px;
		font-size: 22px;
		line-height: 1.25;
	}

	.rp-event-modal-content {
		font-size: 15px;
		line-height: 1.65;
	}

	.rp-event-modal-content p {
		margin-bottom: 19px;
	}

	.rp-event-page-link {
		margin-top: 14px;
	}
}

@media (max-width: 420px) {
	.rp-event-modal {
		padding: 8px;
	}

	.rp-event-modal-dialog {
		width: calc(100vw - 16px);
	}

	.rp-event-modal-body {
		padding: 16px 14px 22px;
	}

	.rp-event-modal-body h2 {
		font-size: 21px;
	}

	.rp-event-modal-content {
		font-size: 14px;
	}
}




/* Version 1.3.3 – Kalender respektiert Enfold-Inhaltsspalte und Sidebar */
.rp-events {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0;
	padding-right: 0;
	box-sizing: border-box;
}

.rp-events-list,
.rp-events-pagination {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
}

/* In schmaleren Enfold-Inhaltsspalten früher auf zwei Spalten wechseln */
@media (max-width: 1180px) {
	.rp-events-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.rp-events-list {
		grid-template-columns: 1fr;
	}
}


/* Version 1.3.4 – zweispaltige Darstellung bei Enfold mit Sidebar */
.rp-events-list {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 700px) {
	.rp-events-list {
		grid-template-columns: 1fr !important;
	}
}
