/**
 * REVANCA design system (rv-*)
 * Ver docs/DESIGN.md — tokens alineados a style.css (rojo #c62828, azul #283593, Karla).
 */

:root {
	--rv-red: #c62828;
	--rv-blue: #283593;
	--rv-blue-hover: #303f9f;
	--rv-bg: #f4f4f3;
	--rv-surface: #ffffff;
	--rv-text: #333333;
	--rv-muted: #666666;
	--rv-line: #dddddd;
	--rv-radius: 4px;
	--rv-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ---- Card ---- */
.rv-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--rv-surface);
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	box-shadow: var(--rv-shadow);
	overflow: hidden;
	text-align: left;
}

.rv-card__head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 16px 0;
}

.rv-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: var(--rv-radius);
	background: var(--rv-blue);
	color: #fff;
	font-size: 18px;
}

.rv-card__icon--red {
	background: var(--rv-red);
}

.rv-card__title {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 700;
	color: var(--rv-text);
	line-height: 1.3;
}

.rv-card__hint {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--rv-muted);
}

.rv-card__body {
	flex: 1 1 auto;
	padding: 14px 16px;
}

.rv-card__foot {
	padding: 0 16px 16px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
}

/* ---- Grid of cards ---- */
.rv-grid {
	margin-left: -10px;
	margin-right: -10px;
}

.rv-grid > [class*="col-"] {
	padding-left: 10px;
	padding-right: 10px;
	margin-bottom: 20px;
}

.rv-section-title {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	color: var(--rv-text);
	text-align: left;
}

.rv-section-lead {
	margin: 0 0 18px;
	font-size: 13px;
	color: var(--rv-muted);
	text-align: left;
}

/* ---- Upload dropzone ---- */
.rv-upload-dropzone {
	display: block;
	position: relative;
	cursor: pointer;
	min-height: 148px;
	padding: 20px 16px;
	border: 2px dashed #c5c5c5;
	border-radius: var(--rv-radius);
	background: linear-gradient(180deg, #fafafa 0%, var(--rv-bg) 100%);
	transition: border-color 0.15s ease, background 0.15s ease;
}

.rv-upload-dropzone:hover,
.rv-upload-dropzone.is-dragover {
	border-color: var(--rv-blue);
	background: #eef0f8;
}

.rv-upload-dropzone.is-filled {
	border-color: var(--rv-red);
	border-style: solid;
	background: #fff8f8;
}

.rv-upload-dropzone__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.rv-upload-dropzone__visual {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 108px;
	text-align: center;
	pointer-events: none;
	color: var(--rv-muted);
}

.rv-upload-dropzone__visual > .fa {
	font-size: 32px;
	color: var(--rv-blue);
}

.rv-upload-dropzone.is-filled .rv-upload-dropzone__visual > .fa {
	color: var(--rv-red);
}

.rv-upload-dropzone__label {
	font-size: 14px;
	font-weight: 700;
	color: var(--rv-text);
	max-width: 260px;
}

.rv-upload-dropzone__filename {
	display: inline-block;
	max-width: 100%;
	margin-top: 4px;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid var(--rv-line);
	background: #fff;
	font-size: 12px;
	color: var(--rv-blue);
	word-break: break-all;
}

.rv-upload-submit {
	background: var(--rv-blue) !important;
	border-color: var(--rv-blue) !important;
	color: #fff !important;
}

.rv-upload-submit:hover,
.rv-upload-submit:focus {
	background: var(--rv-blue-hover) !important;
	border-color: var(--rv-blue-hover) !important;
	color: #fff !important;
}

.rv-upload-submit .fa {
	margin-right: 6px;
}

/* ---- Alerts ---- */
.rv-alert {
	padding: 12px 14px;
	margin-bottom: 16px;
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	font-size: 13px;
	text-align: left;
}

.rv-alert--success {
	background: #dff0d8;
	border-color: #d6e9c6;
	color: #3c763d;
}

.rv-alert--error {
	background: #f2dede;
	border-color: #ebccd1;
	color: #a94442;
}

.rv-alert--info {
	background: #e8eaf6;
	border-color: #c5cae9;
	color: var(--rv-blue);
}

/* ---- Media gallery thumbs ---- */
.rv-gallery-title {
	margin: 8px 0 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--rv-muted);
	text-align: left;
}

.rv-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.rv-gallery__item {
	width: calc(25% - 12px);
	min-width: 150px;
	background: var(--rv-surface);
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	box-shadow: var(--rv-shadow);
	overflow: hidden;
}

.rv-gallery__frame {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 140px;
	padding: 10px;
	background: #eee;
}

.rv-gallery__frame img {
	max-width: 100%;
	max-height: 200px;
	display: block;
}

.rv-gallery__meta {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 10px;
}

.rv-gallery__name {
	font-size: 11px;
	color: var(--rv-muted);
	word-break: break-all;
}

@media (max-width: 991px) {
	.rv-gallery__item {
		width: calc(50% - 12px);
	}
}

@media (max-width: 480px) {
	.rv-gallery__item {
		width: 100%;
	}
}
