/* Riofrio IDR – Casos. Paleta de la marca; se puede ajustar sobrescribiendo las variables en .rfc */
.rfc {
	/* Toma los colores globales de Elementor si existen. */
	--rfc-navy: var(--e-global-color-primary, #173e67);
	--rfc-grey: var(--e-global-color-secondary, #9a9ea4);
	--rfc-beige: #f5f0e6;
	--rfc-terra: var(--e-global-color-accent, #d4a278);
	--rfc-sage: #7a8a7f;
	--rfc-ink: #1d2733;
	--rfc-muted: #5f6873;
	--rfc-line: rgba(23, 62, 103, 0.14);
	--rfc-card: #ffffff;
	--rfc-radius: 14px;
	--rfc-nat-1: var(--rfc-navy);
	--rfc-nat-2: var(--rfc-sage);
	--rfc-nat-3: var(--rfc-terra);
	color: var(--rfc-ink);
	font-family: var(--e-global-typography-text-font-family, inherit), sans-serif;
	line-height: 1.5;
}
.rfc *, .rfc *::before, .rfc *::after { box-sizing: border-box; }
.rfc svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.rfc button { font: inherit; cursor: pointer; }

/* ---------- Barra superior ---------- */
.rfc__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-bottom: 14px;
}
.rfc__search {
	flex: 1 1 280px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 16px;
	height: 48px;
	background: var(--rfc-card);
	border: 1px solid var(--rfc-line);
	border-radius: 999px;
	color: var(--rfc-muted);
	transition: border-color .2s, box-shadow .2s;
}
.rfc__search:focus-within { border-color: var(--rfc-navy); box-shadow: 0 0 0 3px rgba(23, 62, 103, .12); }
.rfc__search input {
	flex: 1;
	min-width: 0;
	height: 100%;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none;
	padding: 0 !important;
	font: inherit;
	font-size: 15px;
	color: var(--rfc-ink);
}

.rfc__seg {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
	background: var(--rfc-beige);
	border-radius: 999px;
}
.rfc__seg-btn {
	border: 0;
	background: transparent;
	color: var(--rfc-navy);
	padding: 9px 16px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: .01em;
	transition: background .2s, color .2s;
}
.rfc__seg-btn:hover { background: rgba(23, 62, 103, .08); }
.rfc__seg-btn[aria-pressed="true"] { background: var(--rfc-navy); color: #fff; }
.rfc__seg-btn:focus-visible, .rfc__toggle:focus-visible, .rfc__chip:focus-visible,
.rfc__clear:focus-visible, .rfc__more-btn:focus-visible, .rfc__select:focus-visible {
	outline: 2px solid var(--rfc-terra);
	outline-offset: 2px;
}

.rfc__toggle {
	display: none;
	align-items: center;
	gap: 8px;
	height: 48px;
	padding: 0 18px;
	border: 1px solid var(--rfc-line);
	background: var(--rfc-card);
	color: var(--rfc-navy);
	border-radius: 999px;
	font-weight: 500;
}
.rfc__badge:not(:empty) {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--rfc-terra);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
}

/* ---------- Panel ---------- */
.rfc__panel {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 12px 14px;
	align-items: end;
	padding: 18px;
	margin-bottom: 18px;
	background: var(--rfc-beige);
	border-radius: var(--rfc-radius);
}
.rfc__field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.rfc__field-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--rfc-muted);
}
.rfc__select {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	height: 42px;
	padding: 0 36px 0 14px !important;
	border: 1px solid transparent !important;
	border-radius: 10px !important;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23173e67' d='M12 15.5 6.5 10l1.4-1.4 4.1 4.1 4.1-4.1 1.4 1.4z'/%3E%3C/svg%3E") no-repeat right 10px center / 18px !important;
	color: var(--rfc-ink) !important;
	font: inherit;
	font-size: 14px;
	text-overflow: ellipsis;
	transition: border-color .2s;
}
.rfc__select:hover { border-color: var(--rfc-line) !important; }

.rfc__switch { display: inline-flex; align-items: center; gap: 10px; height: 42px; cursor: pointer; margin: 0; }
.rfc__switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rfc__switch-ui {
	position: relative;
	width: 40px;
	height: 22px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--rfc-line);
	transition: background .2s;
}
.rfc__switch-ui::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--rfc-grey);
	transition: transform .2s, background .2s;
}
.rfc__switch input:checked + .rfc__switch-ui { background: var(--rfc-navy); border-color: var(--rfc-navy); }
.rfc__switch input:checked + .rfc__switch-ui::after { transform: translateX(18px); background: #fff; }
.rfc__switch input:focus-visible + .rfc__switch-ui { outline: 2px solid var(--rfc-terra); outline-offset: 2px; }
.rfc__switch-label { font-size: 14px; color: var(--rfc-ink); }

/* ---------- Estado ---------- */
.rfc__status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; min-height: 32px; }
.rfc__count { margin: 0; font-size: 14px; font-weight: 600; color: var(--rfc-navy); }
.rfc__chips { display: contents; }
.rfc__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 8px 5px 12px;
	border: 1px solid var(--rfc-line);
	border-radius: 999px;
	background: #fff;
	color: var(--rfc-ink);
	font-size: 13px;
}
.rfc__chip svg { width: 14px; height: 14px; color: var(--rfc-muted); }
.rfc__chip:hover { border-color: var(--rfc-navy); }
.rfc__chip-k { color: var(--rfc-muted); }
.rfc__clear {
	border: 0;
	background: none;
	padding: 4px 2px;
	color: var(--rfc-navy);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.rfc__clear[hidden] { display: none; }

/* ---------- Tarjetas ---------- */
.rfc__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 18px;
}
.rfc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 22px 22px 20px 24px;
	background: var(--rfc-card);
	border: 1px solid var(--rfc-line);
	border-radius: var(--rfc-radius);
	overflow: hidden;
	animation: rfc-in .35s ease both;
	transition: box-shadow .25s, transform .25s, border-color .25s;
}
.rfc-card::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: var(--rfc-accent, var(--rfc-navy));
}
.rfc-card.rfc-nat-1 { --rfc-accent: var(--rfc-nat-1); }
.rfc-card.rfc-nat-2 { --rfc-accent: var(--rfc-nat-2); }
.rfc-card.rfc-nat-3 { --rfc-accent: var(--rfc-nat-3); }
.rfc-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -18px rgba(23, 62, 103, .45); border-color: rgba(23, 62, 103, .22); }

.rfc-card__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rfc-card__nat {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--rfc-accent);
}
.rfc-card__status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--rfc-muted);
}
.rfc-card__status::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--rfc-grey);
}
.rfc-card__status.is-pending { color: #8a5a2f; }
.rfc-card__status.is-pending::before { background: var(--rfc-terra); box-shadow: 0 0 0 3px rgba(212, 162, 120, .25); }

.rfc-card__title {
	margin: 0 !important;
	font-size: 17px !important;
	line-height: 1.4 !important;
	font-weight: 600 !important;
	color: var(--rfc-navy) !important;
	text-wrap: pretty;
}
.rfc-card__title::first-letter { text-transform: uppercase; }

.rfc-card__meta { margin: 0; display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--rfc-line); }
.rfc-card__row { display: grid; grid-template-columns: 112px 1fr; gap: 12px; font-size: 14px; }
.rfc-card__row dt { margin: 0; color: var(--rfc-muted); font-size: 12px; letter-spacing: .02em; padding-top: 1px; }
.rfc-card__row dd { margin: 0; color: var(--rfc-ink); }
.rfc-card__year { position: absolute; right: 18px; bottom: 14px; font-size: 12px; color: var(--rfc-grey); }

.rfc__empty { text-align: center; padding: 40px 16px; color: var(--rfc-muted); background: var(--rfc-beige); border-radius: var(--rfc-radius); }
.rfc__empty[hidden], .rfc__more[hidden] { display: none; }
.rfc__more { display: flex; justify-content: center; margin-top: 26px; }
.rfc__more-btn {
	padding: 12px 26px;
	border: 1px solid var(--rfc-navy);
	border-radius: 999px;
	background: transparent;
	color: var(--rfc-navy);
	font-weight: 500;
	transition: background .2s, color .2s;
}
.rfc__more-btn:hover { background: var(--rfc-navy); color: #fff; }

@keyframes rfc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.rfc-card { animation: none; transition: none; }
	.rfc-card:hover { transform: none; }
}

/* ---------- Móvil ---------- */
@media (max-width: 760px) {
	.rfc__toggle { display: inline-flex; order: 4; }
	.rfc__search { flex-basis: 100%; }
	.rfc__seg { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
	.rfc__seg-btn { white-space: nowrap; }
	.rfc__panel { display: none; grid-template-columns: 1fr 1fr; }
	.rfc.is-open .rfc__panel { display: grid; }
	.rfc-card { padding: 18px 18px 18px 20px; }
	.rfc-card__row { grid-template-columns: 96px 1fr; }
}
@media (max-width: 440px) {
	.rfc__panel { grid-template-columns: 1fr; }
}
