/* OLU Propiedades — panel privado (usa las variables de public.css). */
.olup-panel { padding-bottom: 96px; }
.olup-panel .olup-wrap { max-width: 1240px; }
.olup-panel .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.olup-hero--compact { padding: 118px 0 64px; }
@media (min-width: 1000px) { .olup-hero--compact { padding: 150px 0 80px; } }

/* Encabezado del panel */
.olup-phead {
	background: radial-gradient(120% 140% at 90% 0%, rgba(116, 86, 241, .35) 0%, rgba(16, 33, 54, 0) 55%), var(--olup-navy);
	color: #fff; padding: 112px 0 0;
}
@media (min-width: 1000px) { .olup-phead { padding-top: 140px; } }
.olup-phead__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.olup-phead__title { color: #fff; font-size: clamp(26px, 4.4vw, 38px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: 10px; }
.olup-phead__user { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 14px; color: #d5dbe3; }
.olup-phead__user a { color: #c9bdfb !important; font-weight: 600; text-decoration: none; }
.olup-phead__user a:hover { text-decoration: underline; }
.olup-pnav { display: flex; gap: 6px; overflow-x: auto; margin-top: 22px; padding-bottom: 14px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.olup-pnav a {
	flex: 0 0 auto; color: #d5dbe3 !important; text-decoration: none; font-size: 14px; font-weight: 600;
	padding: 10px 14px; border-radius: 999px; white-space: nowrap; min-height: 42px; display: inline-flex; align-items: center;
}
.olup-pnav a:hover { background: rgba(255, 255, 255, .08); }
.olup-pnav a.is-active { background: #fff; color: var(--olup-navy) !important; }
.olup-pnav a.olup-pnav__new { background: var(--olup-violet); color: #fff !important; }
.olup-pnav a.olup-pnav__new.is-active, .olup-pnav a.olup-pnav__new:hover { background: var(--olup-violet-dark); }

/* Avisos */
.olup-alert { margin-top: 20px; padding: 14px 18px; border-radius: 12px; font-size: 15px; }
.olup-alert ul { margin: 6px 0 0 18px; padding: 0; }
.olup-alert a { font-weight: 700; margin-left: 8px; }
.olup-alert--ok { background: #e7f7ed; color: #14532d; border: 1px solid #b7e4c7; }
.olup-alert--error { background: #fdecec; color: #7f1d1d; border: 1px solid #f5c2c2; }

/* Botones y enlaces del panel */
.olup-btn--sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.olup .olup-btn--danger { color: #b42318 !important; }
.olup-link, .olup-panel button.olup-link {
	background: none !important; border: 0 !important; padding: 8px 4px; min-height: 40px; cursor: pointer;
	color: var(--olup-violet-dark) !important; font-weight: 600; font-size: 14px; text-decoration: none; box-shadow: none !important;
}
.olup-link:hover { text-decoration: underline; }
.olup-panel button.olup-link--danger { color: #b42318 !important; }
.olup-inline { display: inline; margin: 0; }

/* Formularios */
.olup-input { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.olup-input label { font-size: 13px; font-weight: 700; color: var(--olup-navy); }
.olup-input small, .olup-hint { font-size: 13px; color: var(--olup-slate); line-height: 1.4; }
.olup-panel input[type=text], .olup-panel input[type=password], .olup-panel input[type=search], .olup-panel input[type=number],
.olup-panel select, .olup-panel textarea {
	width: 100%; min-height: 46px; border: 1px solid #d3d9e2; border-radius: 10px; background: #fff;
	color: var(--olup-navy); font-size: 16px; padding: 10px 12px; margin: 0; box-shadow: none;
}
.olup-panel textarea { min-height: 180px; line-height: 1.5; resize: vertical; }
.olup-panel input:focus, .olup-panel select:focus, .olup-panel textarea:focus { border-color: var(--olup-violet); outline: 3px solid rgba(116, 86, 241, .2); }
.olup-panel .is-invalid { border-color: #d92d20 !important; }
.olup-field-error { color: #b42318 !important; font-weight: 600; }
.olup-checkline, .olup-radio { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 40px; cursor: pointer; }
.olup-checkline input, .olup-radio input { width: 20px; height: 20px; margin: 0; accent-color: var(--olup-violet); flex: none; }
.olup-fields { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 14px; }
@media (min-width: 640px) { .olup-fields { grid-template-columns: 1fr 1fr; } .olup-fields--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .olup-fields--4 { grid-template-columns: repeat(4, 1fr); } }
.olup-input--wide { grid-column: 1 / -1; }
.olup-input-pair { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }

.olup-card-box { background: #fff; border: 1px solid var(--olup-line); border-radius: var(--olup-radius); padding: 20px; margin-top: 20px; }
@media (min-width: 768px) { .olup-card-box { padding: 24px 26px; } }
.olup-card-box h2 { font-size: 19px; font-weight: 800; margin-bottom: 12px; }
.olup-card-box--official { border: 2px solid var(--olup-violet); }

/* Editor */
.olup-editor__grid { display: grid; gap: 0 28px; grid-template-columns: 1fr; }
@media (min-width: 1024px) {
	.olup-editor__grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
	.olup-editor__side { position: sticky; top: 90px; }
}
@media (max-width: 1023px) { .olup-editor__side { order: -1; } }
.olup-radios { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
@media (min-width: 1024px) { .olup-radios { grid-template-columns: 1fr; } }
.olup-publish .olup-btn { margin-top: 10px; }
.olup-publish__state { font-size: 15px; }
.olup-more__row { display: flex; flex-wrap: wrap; gap: 10px; }

.olup-savebar { display: none; }
@media (max-width: 1023px) {
	.olup-savebar {
		display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97);
		border-top: 1px solid var(--olup-line); box-shadow: 0 -8px 24px rgba(16, 33, 54, .08);
	}
	.olup-savebar .olup-btn { flex: 1; }
	.olup-publish { display: none; }
}

/* Fotos */
.olup-photos { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .olup-photos { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .olup-photos { grid-template-columns: repeat(4, 1fr); } }
.olup-photo { position: relative; border-radius: 12px; overflow: hidden; border: 2px solid var(--olup-line); background: var(--olup-soft); aspect-ratio: 4 / 3; cursor: grab; }
.olup-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.olup-photo.is-principal { border-color: var(--olup-violet); box-shadow: 0 0 0 2px rgba(116, 86, 241, .25); }
.olup-photo.is-dragging { opacity: .45; }
.olup-photo__tag { display: none; position: absolute; left: 8px; top: 8px; background: var(--olup-violet); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.olup-photo.is-principal .olup-photo__tag { display: block; }
.olup-photo__bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px; padding: 4px; background: rgba(16, 33, 54, .82); }
.olup-panel .olup-photo__bar button {
	background: transparent !important; color: #fff !important; border: 0 !important; min-height: 34px; min-width: 34px;
	padding: 4px 6px; font-size: 12px; font-weight: 600; border-radius: 6px; cursor: pointer; box-shadow: none !important;
}
.olup-panel .olup-photo__bar button:hover { background: rgba(255, 255, 255, .16) !important; }
.olup-photo.is-principal [data-act=principal] { color: #ffd166 !important; }
.olup-dropzone { margin-top: 14px; border: 2px dashed #cdd5e0; border-radius: 12px; padding: 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.olup-dropzone p { color: var(--olup-slate); font-size: 13px; }
.olup-dropzone.is-over { border-color: var(--olup-violet); background: rgba(116, 86, 241, .06); }
.olup-upload-status { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--olup-navy); }
.olup-upload-status.is-error { color: #b42318; }

/* Listado */
.olup-search { display: flex; gap: 10px; margin-top: 22px; }
.olup-search input { flex: 1; }
.olup-panel .olup-count { margin: 18px 0 10px; }
.olup-plist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.olup-pitem { background: #fff; border: 1px solid var(--olup-line); border-radius: var(--olup-radius); padding: 14px; display: grid; grid-template-columns: 76px 1fr; gap: 12px 14px; align-items: start; }
@media (min-width: 900px) { .olup-pitem { grid-template-columns: 96px 1fr auto; align-items: center; padding: 16px 20px; } }
.olup-pitem__thumb { display: block; width: 76px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--olup-soft); }
@media (min-width: 900px) { .olup-pitem__thumb { width: 96px; height: 76px; } }
.olup-pitem__thumb img, .olup-pitem__thumb span { width: 100%; height: 100%; object-fit: cover; display: block; }
.olup-pitem__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.olup-pitem__title { font-size: 17px; font-weight: 700; line-height: 1.3; margin-top: 6px; }
.olup-pitem__title a { text-decoration: none; }
.olup-pitem__title a:hover { color: var(--olup-violet-dark); }
.olup-pitem__meta { font-size: 14px; color: var(--olup-slate); margin-top: 4px; }
.olup-pitem__meta strong { color: var(--olup-navy); }
.olup-pitem__date { font-size: 12px; color: #7b8794; margin-top: 2px; }
.olup-pitem__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; border-top: 1px solid var(--olup-line); padding-top: 8px; }
@media (min-width: 900px) { .olup-pitem__actions { grid-column: auto; border-top: 0; padding-top: 0; justify-content: flex-end; max-width: 420px; } }
.olup-pub, .olup-est { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eef1f5; color: #475467; }
.olup-pub--publish { background: #e7f7ed; color: #14532d; }
.olup-pub--private { background: #fff4df; color: #8a5a00; }
.olup-pub--trash { background: #fdecec; color: #7f1d1d; }
.olup-est--disponible { background: #eceaff; color: #4a2fc0; }
.olup-est--reservada { background: #fff4df; color: #8a5a00; }
.olup-est--vendida, .olup-est--alquilada { background: #102136; color: #fff; }

/* Login */
.olup-login__card { max-width: 440px; margin: -40px auto 0; position: relative; z-index: 2; background: #fff; border-radius: var(--olup-radius); box-shadow: 0 18px 40px rgba(16, 33, 54, .12); padding: 24px; }
.olup-login__card .olup-alert { margin: 0 0 16px; }
.olup-form { display: flex; flex-direction: column; gap: 16px; }
.olup-login__help { text-align: center; margin-top: 16px; font-size: 14px; }
.olup-login__help a, .olup-login__back a { color: var(--olup-violet-dark) !important; font-weight: 600; }
.olup-login__back { text-align: center; margin-top: 22px; font-size: 14px; }

.olup-settings__actions { margin-top: 20px; display: flex; justify-content: flex-end; }

/* El tema aplica estilos propios a los botones: se fijan los del panel. */
.olup .olup-btn--ghost, .olup button.olup-btn--ghost {
	background: #fff !important; color: var(--olup-navy) !important; border: 2px solid var(--olup-line) !important;
	border-radius: 999px !important; box-shadow: none !important; text-transform: none !important; letter-spacing: 0 !important;
}
.olup .olup-btn--ghost:hover, .olup button.olup-btn--ghost:hover { border-color: var(--olup-violet) !important; color: var(--olup-violet-dark) !important; }
.olup button.olup-btn--ghost.olup-btn--danger { color: #b42318 !important; }
.olup button.olup-btn--primary { border-radius: 999px !important; text-transform: none !important; letter-spacing: 0 !important; }
.olup button.olup-btn { font-weight: 700; font-size: 15px; line-height: 1.2; }
.olup button.olup-btn--sm { font-size: 14px; }
@media (max-width: 479px) {
	.olup-photos { grid-template-columns: 1fr; }
	.olup-photo { aspect-ratio: 16 / 10; }
	.olup-photo__bar { flex-wrap: nowrap; }
}

.olup-empty-trash { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; }

/* OLU Assistant (burbuja global del sitio): en el editor del panel, cuando existe la barra
   inferior de guardado (menos de 1024 px), la burbuja sube por encima de la barra para no
   tapar botones. Solo afecta al editor del panel; en el resto del sitio no cambia nada. */
@media (max-width: 1023px) {
	body.olup-panel-page.olup-has-savebar #oluab-toggle { bottom: calc(92px + env(safe-area-inset-bottom)) !important; }
	body.olup-panel-page.olup-has-savebar #oluab-panel { bottom: calc(160px + env(safe-area-inset-bottom)) !important; max-height: calc(100vh - 190px) !important; overflow: auto; }
}

/* --- Asistencia de IA en el editor ---------------------------------------- */
.olup-ia {
	margin-top: 18px;
	padding: 16px;
	border: 1px solid var(--olup-borde, #e2e6ec);
	border-radius: 10px;
	background: var(--olup-suave, #f7f9fc);
}
.olup-ia__intro { margin: 0 0 12px; }
.olup-ia__acciones {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.olup-ia__estado {
	margin: 10px 0 0;
	font-size: 14px;
	min-height: 1.2em;
}
.olup-ia__estado--error { color: #b3261e; }
.olup-ia__salida { margin-top: 14px; }
.olup-ia__salida textarea {
	width: 100%;
	font-family: inherit;
	background: #fff;
}
/* El aviso de datos no verificados tiene que verse: es lo que separa una ficha
   correcta de una oferta falsa publicada con el nombre de la inmobiliaria. */
.olup-ia__avisos {
	margin: 10px 0;
	padding: 10px 12px;
	border-left: 4px solid #b3261e;
	background: #fdecea;
	border-radius: 4px;
	font-size: 14px;
}
@media (max-width: 640px) {
	.olup-ia__acciones { flex-direction: column; }
	.olup-ia__acciones .olup-btn { width: 100%; }
}

/* ---- Composición audiovisual -------------------------------------------- */
/* Comparte la escala y los colores del bloque de IA a propósito: son dos
   asistencias del mismo editor y dos diseños distintos harían pensar que una
   pertenece a otra parte del producto. */
.olup-video__formatos { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; }
.olup-video__acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.olup-video__estado { margin-top: 8px; font-size: 13px; color: #555; min-height: 1.2em; }
.olup-video__estado--error { color: #8c1d18; }
.olup-video__estado--ok { color: #1b5e20; }
.olup-video__lista { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.olup-video__lista li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.olup-video__lista small { color: #666; font-size: 12px; }

/* ---- Plan y consumo ------------------------------------------------------ */
.olup-plan { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; background: #f3f5f7; border-left: 4px solid #2b4c7e; }
.olup-plan--alerta { background: #fdf4e7; border-left-color: #b26a00; }
.olup-plan__frase { margin: 0; font-size: 14px; }
.olup-plan__nota { margin: 6px 0 0; font-size: 12px; color: #666; }
.olup-plan__barra { margin-top: 8px; height: 6px; border-radius: 3px; background: #dfe4e9; overflow: hidden; }
.olup-plan__barra span { display: block; height: 100%; background: #2b4c7e; }
.olup-plan--alerta .olup-plan__barra span { background: #b26a00; }
