/* PE Alertas — área privada /my-alerts/ (parte E). Medidas y colores del diseño aprobado (alertas/diseno-web/).
   Escritorio: columna de 1040 px. Móvil (≤767.98px): una columna con 20 px de margen. Sin bifurcar en PHP. */

.pe-area { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #222222; background: #FFFFFF; -webkit-text-size-adjust: 100%; }
.pe-area *, .pe-area *::before, .pe-area *::after { box-sizing: border-box; }
.pe-area [hidden] { display: none !important; }
.pe-area a { color: #222222; }
.pe-area p { margin: 0; }
.pe-area button { font-family: inherit; }
html.pe-area-modal-open, html.pe-area-modal-open body { overflow: hidden; }

/* Pestañas + email + Salir */
.pe-area__tabs { border-bottom: 1px solid #EBEBEB; }
.pe-area__tabs-in { max-width: 1040px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.pe-area__tablist { display: flex; gap: 32px; }
.pe-area__tablist a { display: inline-flex; align-items: center; min-height: 60px; font-size: 15px; color: #6A6A6A; text-decoration: none; }
.pe-area__tablist a.is-on { font-weight: 600; color: #222222; box-shadow: inset 0 -2px 0 #222222; }
.pe-area__who { display: flex; align-items: center; gap: 20px; font-size: 14px; color: #6A6A6A; min-width: 0; }
.pe-area__who-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-area__logout { min-height: 44px; padding: 0; border: 0; background: none; font-size: 14px; color: #222222; text-decoration: underline; cursor: pointer; }

.pe-area__main { max-width: 1040px; margin: 0 auto; padding: 40px 20px 64px; display: flex; flex-direction: column; gap: 16px; }
.pe-area__narrow { max-width: 600px; display: flex; flex-direction: column; }
.pe-area__h1 { margin: 0 !important; font-size: 32px !important; line-height: 38px !important; font-weight: 700 !important; color: #222222 !important; letter-spacing: 0 !important; text-transform: none !important; font-family: inherit !important; }
.pe-area__lead { font-size: 16px; line-height: 24px; color: #6A6A6A; }
.pe-area__lead--small { font-size: 15px; line-height: 22px; }
.pe-area__note { display: block; font-size: 13px; line-height: 20px; color: #6A6A6A; }
.pe-area__muted { color: #6A6A6A; }
.pe-area__empty { padding: 28px; border: 1px dashed #DDDDDD; border-radius: 16px; font-size: 15px; line-height: 22px; color: #6A6A6A; }
.pe-area__notice { padding: 14px 18px; border-radius: 10px; background: #E6F2E9; color: #1E5B33; font-size: 15px; line-height: 22px; }
.pe-area__ok { padding: 14px 18px; border-radius: 10px; background: #F0F0EE; font-size: 15px; line-height: 22px; }
.pe-area__error { font-size: 14px; line-height: 20px; color: #B42318; }
.pe-area__saved { margin-left: 12px; font-size: 13px; color: #1E5B33; }
.pe-area__foot { margin-top: 16px !important; font-size: 14px; color: #6A6A6A; }
.pe-area__hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Botones */
.pe-area__btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; margin: 0;
	border: 1px solid #222222; border-radius: 10px; background: #222222; color: #FFFFFF !important;
	font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none !important; cursor: pointer; white-space: nowrap;
}
.pe-area__btn[disabled] { opacity: .6; cursor: default; }
.pe-area__btn--full { display: flex; width: 100%; min-height: 52px; font-size: 16px; }
.pe-area__btn--ghost { background: #FFFFFF; color: #222222 !important; }
.pe-area__btn--line { background: #FFFFFF; color: #222222 !important; border-color: #DDDDDD; font-weight: 400; }
.pe-area__btn--text { background: none; border-color: transparent; color: #222222 !important; font-weight: 400; padding: 0 12px; }
.pe-area__btn--danger { color: #B42318 !important; }
.pe-area__btn--danger-line { background: #FFFFFF; color: #B42318 !important; border-color: #B42318; }
.pe-area__btn--sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.pe-area__btn--sm.pe-area__btn--line { padding: 0 16px; }
.pe-area__btn--sm.pe-area__btn--text { padding: 0 12px; }
.pe-area__textbtn { min-height: 44px; padding: 0; border: 0; background: none; font-size: 15px; font-weight: 600; color: #222222; text-decoration: underline; cursor: pointer; }
.pe-area__link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; }

/* Páginas sueltas (entrar, enlaces de los emails, baja) */
.pe-area__center { display: flex; justify-content: center; padding: 72px 20px 96px; background: #F7F7F5; }
.pe-area__card { width: 440px; max-width: 100%; padding: 40px; background: #FFFFFF; border: 1px solid #EBEBEB; border-radius: 16px; display: flex; flex-direction: column; gap: 16px; }
.pe-area__card .pe-area__h1 { font-size: 28px !important; line-height: 34px !important; }
.pe-area__card .pe-area__lead { font-size: 15px; line-height: 23px; }
.pe-area__box { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; padding: 22px; border: 1px solid #EBEBEB; border-radius: 16px; font-size: 16px; }
.pe-area__form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.pe-area__input { display: flex; flex-direction: column; gap: 2px; min-height: 56px; margin: 0; padding: 8px 14px; border: 1.5px solid #222222; border-radius: 10px; font-weight: 400; cursor: text; }
.pe-area__input span { font-size: 12px; line-height: 15px; color: #6A6A6A; }
.pe-area__input input { width: 100%; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; outline: none; background: transparent; box-shadow: none; font: inherit; font-size: 15px; line-height: 20px; color: #222222; }
.pe-area__input input::placeholder { color: #9A9A9A; opacity: 1; }

/* Mis alertas */
.pe-area__head { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.pe-area__main > .pe-area__lead { margin-bottom: 8px; }
.pe-area__alert { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 28px; border: 1px solid #EBEBEB; border-radius: 16px; }
.pe-area__alert.is-paused { background: #FAFAF8; }
.pe-area__alert-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pe-area__alert-title { display: flex; align-items: center; gap: 12px; font-size: 20px; line-height: 26px; font-weight: 700; }
.pe-area__alert.is-paused .pe-area__alert-title > span:first-child { color: #6A6A6A; }
.pe-area__alert-what { font-size: 15px; line-height: 22px; color: #6A6A6A; }
.pe-area__alert-stats { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; line-height: 20px; }
.pe-area__alert-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.pe-area__pill { flex: none; padding: 3px 10px; border-radius: 12px; font-size: 12px; line-height: 16px; font-weight: 600; }
.pe-area__pill.is-active { background: #E6F2E9; color: #1E5B33; }
.pe-area__pill.is-paused { background: #F0F0EE; color: #4A4A4A; }

/* Chips (filtros, tipos, dormitorios) */
.pe-area__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pe-area__chip { display: inline-flex; margin: 0; cursor: pointer; text-decoration: none !important; font-weight: 400; }
.pe-area__chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pe-area__chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid #DDDDDD; border-radius: 20px; font-size: 14px; color: #222222; white-space: nowrap; }
.pe-area__chip.is-on span, .pe-area__chip input:checked + span { background: #222222; border-color: #222222; color: #FFFFFF; font-weight: 600; }
.pe-area__chip.is-muted span { color: #6A6A6A; }
.pe-area__chip input:focus-visible + span { outline: 2px solid #222222; outline-offset: 2px; }
.pe-area__zchip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 8px 0 14px; border-radius: 20px; background: #F0F0EE; font-size: 14px; font-weight: 600; }
.pe-area__zchip button { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; font-size: 13px; color: #6A6A6A; cursor: pointer; }
.pe-area__addzone {
	-webkit-appearance: none; appearance: none; width: auto; max-width: 100%; height: auto; min-height: 40px; margin: 0; padding: 0 14px;
	border: 1px dashed #9A9A9A; border-radius: 20px; background: #FFFFFF; box-shadow: none; font: inherit; font-size: 14px; color: #222222; cursor: pointer;
}

/* Propiedades */
.pe-area__filters { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.pe-area__sortrow { display: flex; align-items: center; gap: 16px; flex: none; font-size: 14px; }
.pe-area__count { display: none; }
.pe-area__sort select {
	-webkit-appearance: none; appearance: none; height: auto; min-height: 40px; margin: 0; padding: 0 34px 0 14px;
	border: 1px solid #DDDDDD; border-radius: 10px; box-shadow: none; font: inherit; font-size: 14px; color: #222222; cursor: pointer;
	background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236A6A6A'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.pe-area__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; padding-top: 8px; }
.pe-area__prop { display: flex; flex-direction: column; gap: 12px; color: #222222; text-decoration: none !important; }
.pe-area__photo { display: block; height: 220px; border-radius: 16px; background: #E8E6E1; overflow: hidden; }
.pe-area__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pe-area__prop-body { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 20px; }
.pe-area__badges { display: flex; gap: 6px; padding-bottom: 2px; }
.pe-area__badge { padding: 3px 10px; border-radius: 12px; background: #F0F0EE; font-size: 12px; line-height: 16px; font-weight: 600; }
.pe-area__prop-top { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; line-height: 22px; font-weight: 600; }
.pe-area__prop-price { white-space: nowrap; }
.pe-area__more { display: flex; justify-content: center; padding-top: 16px; }

/* Ajustes */
.pe-area__narrow .pe-area__h1 { margin-bottom: 12px !important; }
.pe-area__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 22px 0; border-bottom: 1px solid #EBEBEB; }
.pe-area__row--stack { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 12px; padding: 26px 0; }
.pe-area__row--last { border-bottom: 0; }
.pe-area__row strong { font-size: 16px; font-weight: 600; }
.pe-area__row > .pe-area__muted, .pe-area__row-main .pe-area__muted { font-size: 15px; line-height: 22px; }
.pe-area__row-main { display: flex; flex-direction: column; gap: 4px; flex: 1 1 280px; min-width: 0; }
.pe-area__row-extra { flex: 1 1 100%; }
.pe-area__btnrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pe-area__seg { display: flex; flex: none; padding: 3px; border: 1px solid #DDDDDD; border-radius: 10px; }
.pe-area__seg label { display: flex; margin: 0 !important; line-height: 1; cursor: pointer; font-weight: 400; }
.pe-area__seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pe-area__seg span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 8px; font-size: 14px; color: #222222; }
.pe-area__seg input:checked + span { background: #222222; color: #FFFFFF; font-weight: 600; }
.pe-area__switch {
	-webkit-appearance: none; appearance: none; position: relative; flex: none; width: 48px; height: 28px; margin: 0;
	border: 0; border-radius: 14px; background: #DDDDDD; cursor: pointer; transition: background .15s;
}
.pe-area__switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: #FFFFFF; transition: left .15s; }
.pe-area__switch:checked { background: #222222; }
.pe-area__switch:checked::after { left: 23px; }
.pe-area__switch:focus-visible { outline: 2px solid #222222; outline-offset: 2px; }

/* Ventana de editar */
.pe-area__modal { position: fixed; inset: 0; z-index: 2147483000; /* Por encima del botón flotante de WPConsent (99999999). */ display: flex; align-items: center; justify-content: center; padding: 16px; }
.pe-area__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }
.pe-area__dialog {
	position: relative; width: 640px; max-width: 100%; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
	margin: 0; padding: 32px 36px; background: #FFFFFF; border-radius: 16px; display: flex; flex-direction: column; gap: 22px;
}
.pe-area__dialog-head { display: flex; justify-content: space-between; align-items: center; }
.pe-area__dialog-head h2 { margin: 0 !important; font-size: 24px !important; line-height: 30px !important; font-weight: 700 !important; color: #222222 !important; font-family: inherit !important; text-transform: none !important; letter-spacing: 0 !important; }
.pe-area__x { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -12px; padding: 0; border: 0; background: none; font-size: 18px; color: #222222; cursor: pointer; }
.pe-area__fs { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.pe-area__fs legend { float: left; width: 100%; margin: 0 0 10px; padding: 0; font-size: 15px; font-weight: 600; color: #222222; border: 0; }
.pe-area__two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pe-area__select { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 56px; margin: 0; padding: 8px 32px 8px 14px; border: 1px solid #DDDDDD; border-radius: 10px; font-weight: 400; cursor: pointer; }
.pe-area__select span { font-size: 12px; line-height: 15px; color: #6A6A6A; }
.pe-area__select select { -webkit-appearance: none; appearance: none; width: 100%; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; font: inherit; font-size: 15px; line-height: 20px; font-weight: 600; color: #222222; cursor: pointer; }
.pe-area__select::after { content: '▾'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #6A6A6A; }
.pe-area__toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0; padding: 14px 0; border-top: 1px solid #EBEBEB; border-bottom: 1px solid #EBEBEB; font-weight: 400; cursor: pointer; }
.pe-area__toggle-row > span { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.pe-area__dialog-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.pe-area__dialog-foot .pe-area__btn { min-height: 48px; }

/* Móvil */
@media (max-width: 767.98px) {
	.pe-area__tabs-in { flex-direction: column; align-items: stretch; gap: 0; }
	.pe-area__tablist { gap: 24px; overflow-x: auto; }
	.pe-area__tablist a { min-height: 52px; white-space: nowrap; }
	.pe-area__who { justify-content: space-between; gap: 12px; font-size: 13px; border-top: 1px solid #F0F0EE; }
	.pe-area__main { padding: 24px 20px 48px; gap: 14px; }
	.pe-area__h1 { font-size: 26px !important; line-height: 32px !important; }
	.pe-area__lead { font-size: 15px; line-height: 22px; }
	.pe-area__head { flex-direction: column; align-items: stretch; gap: 14px; }
	.pe-area__head .pe-area__btn { order: 3; }
	.pe-area__alert { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px; }
	.pe-area__alert-title { justify-content: space-between; font-size: 18px; line-height: 24px; }
	.pe-area__alert-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
	.pe-area__alert-actions > :first-child { grid-column: 1 / -1; min-height: 46px; }
	.pe-area__alert-actions .pe-area__btn--text, .pe-area__alert-actions .pe-area__btn--line { border: 1px solid #DDDDDD; padding: 0 8px; }
	.pe-area__alert.is-paused .pe-area__alert-actions { grid-template-columns: repeat(2, 1fr); }
	.pe-area__filters { flex-direction: column; align-items: stretch; gap: 12px; }
	.pe-area__chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
	.pe-area__chips--scroll::-webkit-scrollbar { display: none; }
	.pe-area__sortrow { justify-content: space-between; }
	.pe-area__count { display: inline; }
	.pe-area__grid { grid-template-columns: 1fr; gap: 24px; }
	.pe-area__photo { height: 230px; }
	.pe-area__center { padding: 32px 0 48px; background: #FFFFFF; }
	.pe-area__card { width: 100%; padding: 16px 24px; border: 0; border-radius: 0; }
	.pe-area__card .pe-area__h1 { font-size: 28px !important; line-height: 34px !important; }
	.pe-area__modal { padding: 0; align-items: flex-end; }
	.pe-area__dialog { width: 100%; max-height: 92vh; max-height: 92dvh; padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; gap: 18px; }
	.pe-area__dialog-foot { position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom)); margin: 0 -20px calc(-24px - env(safe-area-inset-bottom)); padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: #FFFFFF; border-top: 1px solid #EBEBEB; }
	.pe-area__dialog-foot .pe-area__btn:last-child { flex: 1; }
	.pe-area__btnrow { flex-direction: column; align-items: stretch; }
	.pe-area__row--stack > div, .pe-area__row--stack .pe-area__btn { width: 100%; }
	.pe-area__row--stack .pe-area__btn { white-space: normal; text-align: center; }
}

/* Colores de los botones con más peso: algún estilo de la web pisaba el blanco de los <a> con forma de botón. */
:is(#pe-area, #pe-area-layer) .pe-area__btn { color: #FFFFFF !important; }
:is(#pe-area, #pe-area-layer) .pe-area__btn--ghost, :is(#pe-area, #pe-area-layer) .pe-area__btn--line, :is(#pe-area, #pe-area-layer) .pe-area__btn--text { color: #222222 !important; }
:is(#pe-area, #pe-area-layer) .pe-area__btn--danger, :is(#pe-area, #pe-area-layer) .pe-area__btn--danger-line { color: #B42318 !important; }
:is(#pe-area, #pe-area-layer) .pe-area__foot, :is(#pe-area, #pe-area-layer) .pe-area__lead, :is(#pe-area, #pe-area-layer) .pe-area__note { margin-bottom: 0; }
:is(#pe-area, #pe-area-layer) .pe-area__foot { line-height: 20px; }
/* Filas con interruptor: el interruptor siempre a la derecha del texto, también en móvil. */
:is(#pe-area, #pe-area-layer) .pe-area__row:has(> .pe-area__switch) { flex-wrap: nowrap; }
:is(#pe-area, #pe-area-layer) .pe-area__row:has(> .pe-area__switch) .pe-area__row-main { flex: 1 1 0; }
