/* Notificaciones Masivas Mixtas – complementa alianzas-app.css (app-heading, app-button, app-disclaimer).
   Solo componentes nuevos con prefijo .ntf-. Ajusta los colores en las variables de abajo. */

@property --ntf-accent { syntax: "<color>"; inherits: true; initial-value: #1f8fd1; }

.ntf-landing {
    --ntf-navy: #12306b;
    --ntf-ink: #1c2a44;
    --ntf-muted: #5d6b82;
    --ntf-line: #dfe6f0;
    --ntf-bg: #f4f7fb;
    --ntf-accent: #1f8fd1;
    --ntf-ease: cubic-bezier(.22, .8, .24, 1);
    transition: --ntf-accent .5s var(--ntf-ease);
}
.ntf-landing[data-active="inmuebles"]   { --ntf-accent: #1f8fd1; }
.ntf-landing[data-active="vehiculos"]   { --ntf-accent: #12a67a; }
.ntf-landing[data-active="actividades"] { --ntf-accent: #ef8a1c; }
.ntf-landing[data-active="patentes"]    { --ntf-accent: #8a44b0; }
.ntf-landing .app-heading { margin-top: 16px; }

/* ---------- Selector (tarjetas) ---------- */

.ntf-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 24px 0 0; position: relative; z-index: 2; }
.ntf-tab {
    --c: #2aa6d6; --c2: #4cc4f0; --bg: #86d3f4;
    position: relative; display: flex; flex-direction: column; padding: 0 0 8px; background: linear-gradient(135deg, var(--c2), var(--c) 70%);
    border-radius: 14px; color: #fff !important; text-decoration: none !important; box-shadow: 0 4px 12px rgba(18, 48, 107, .18);
    transition: transform .35s var(--ntf-ease), box-shadow .35s var(--ntf-ease), outline-color .3s;
}
.ntf-tab[data-key="inmuebles"], .hero-banner--notification[data-key="inmuebles"]   { --c: #1f8fd1; --c2: #4cc4f0; --bg: #86d3f4; }
.ntf-tab[data-key="vehiculos"], .hero-banner--notification[data-key="vehiculos"]   { --c: #1a9460; --c2: #3fcf8f; --bg: #78d3a4; }
.ntf-tab[data-key="actividades"], .hero-banner--notification[data-key="actividades"] { --c: #ea711a; --c2: #ffa84a; --bg: #fdb56e; }
.ntf-tab[data-key="patentes"], .hero-banner--notification[data-key="patentes"]    { --c: #7d3fa6; --c2: #b575de; --bg: #c9a0e3; }

.ntf-tab strong { display: flex; align-items: center; justify-content: center; min-height: 58px; padding: 8px 10px; text-align: center;
    font: 700 18px/1.15 Roboto, sans-serif; letter-spacing: .01em; text-transform: uppercase; color: #fff; position: relative; overflow: hidden; border-radius: 14px 14px 0 0; }
.ntf-tab strong::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%); transform: translateX(-130%); pointer-events: none; }
.ntf-tab:hover strong::after { transform: translateX(130%); transition: transform .8s var(--ntf-ease); }
.ntf-tab-art { display: grid; place-items: center; flex: 1; margin: 0 8px; padding: 10px 8px; border-radius: 12px; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--bg) 55%, #fff), var(--bg) 75%); position: relative; transition: transform .4s var(--ntf-ease); }
.ntf-pic { width: 100%; max-width: 175px; height: auto; overflow: visible; animation: ntf-bob 3.4s ease-in-out infinite; }
.ntf-tab:nth-child(2) .ntf-pic { animation-delay: -.8s; } .ntf-tab:nth-child(3) .ntf-pic { animation-delay: -1.6s; } .ntf-tab:nth-child(4) .ntf-pic { animation-delay: -2.4s; }
@keyframes ntf-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.ntf-tab:hover { transform: translateY(-5px); box-shadow: 0 14px 26px rgba(18, 48, 107, .26); }
.ntf-tab:hover .ntf-tab-art { transform: scale(1.06) rotate(-1deg); }
.ntf-tab:focus-visible { outline: 3px solid var(--ntf-navy); outline-offset: 3px; }

.ntf-tab[aria-selected="true"] { transform: translateY(-4px); outline: 3px solid var(--c); outline-offset: 3px; box-shadow: 0 16px 30px color-mix(in srgb, var(--c) 45%, transparent); animation: ntf-pulse 2.4s ease-out infinite; }
@keyframes ntf-pulse { 0% { outline-offset: 3px; outline-color: var(--c); } 70%, 100% { outline-offset: 9px; outline-color: transparent; } }
.ntf-tab[aria-selected="true"] .ntf-tab-art::before { content: "Mostrando"; position: absolute; top: 7px; right: 7px; padding: 3px 8px 3px 16px; font: 700 10px/1 Roboto, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--c); background: radial-gradient(circle at 10px 50%, var(--c) 3px, transparent 3.5px), #fff; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.15); animation: ntf-in .5s var(--ntf-ease) both; }
@keyframes ntf-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* muesca que apunta al documento */
.ntf-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 50%; bottom: -17px; width: 18px; height: 18px; background: var(--c); transform: translateX(-50%) rotate(45deg); border-radius: 3px; z-index: -1; }

.ntf-ico, .ntf-btn svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Visor ---------- */
.ntf-viewer { margin-top: 18px; background: #fff; border: 1px solid var(--ntf-line); border-top: 5px solid var(--ntf-accent); border-radius: 14px;
    box-shadow: 0 10px 34px rgba(18, 48, 107, .1); overflow: hidden; transition: border-color .5s var(--ntf-ease); }
.ntf-viewer.is-switching .ntf-viewer-head { animation: ntf-swap .45s var(--ntf-ease); }
.ntf-viewer.is-switching .ntf-viewer-body { animation: ntf-swap-body .55s var(--ntf-ease); }
@keyframes ntf-swap { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes ntf-swap-body { from { opacity: 0; transform: translateY(14px) scale(.992); } to { opacity: 1; transform: none; } }

.ntf-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 22px; background: linear-gradient(180deg, #fff, var(--ntf-bg)); border-bottom: 1px solid var(--ntf-line); }
.ntf-viewer-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ntf-viewer-badge { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 11px; background: var(--ntf-accent); color: #fff; font: 700 13px/1 Roboto, sans-serif; letter-spacing: .06em; transition: background .5s var(--ntf-ease); }
.ntf-viewer-title h3 { margin: 0; font-size: 20px; line-height: 1.25; color: var(--ntf-navy); }
.ntf-viewer-title p { margin: 3px 0 0; font-size: 14px; color: var(--ntf-muted); }
.ntf-viewer-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.ntf-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; font: 500 14px/1 Roboto, sans-serif; color: var(--ntf-navy) !important; text-decoration: none !important;
    background: #fff; border: 1px solid var(--ntf-line); border-radius: 9px; cursor: pointer; transition: transform .25s var(--ntf-ease), box-shadow .25s, background .25s, color .25s, border-color .25s; }
.ntf-btn svg { width: 18px; height: 18px; }
.ntf-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(18, 48, 107, .14); border-color: var(--ntf-accent); }
.ntf-btn:focus-visible { outline: 3px solid var(--ntf-accent); outline-offset: 2px; }
.ntf-btn-main { background: var(--ntf-navy); border-color: var(--ntf-navy); color: #fff !important; }
.ntf-btn-main:hover { background: var(--ntf-accent); border-color: var(--ntf-accent); }

.ntf-viewer-body { position: relative; height: var(--ntf-sidebar-fit-height, 78vh); min-height: 0; max-height: none; background: #eef2f8; }
.ntf-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; opacity: 0; transition: opacity .5s; }
.ntf-viewer.is-ready .ntf-frame { opacity: 1; }

.ntf-loader { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: #eef2f8; transition: opacity .45s, visibility .45s; }
.ntf-viewer.is-ready .ntf-loader { opacity: 0; visibility: hidden; }
.ntf-loader-bar { width: min(260px, 60%); height: 5px; border-radius: 5px; background: #d6deea; overflow: hidden; position: relative; }
.ntf-loader-bar::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 5px; background: var(--ntf-accent); animation: ntf-load 1.15s ease-in-out infinite; }
@keyframes ntf-load { from { transform: translateX(-110%); } to { transform: translateX(270%); } }
.ntf-loader-text { font-size: 14px; color: var(--ntf-muted); letter-spacing: .02em; }

.ntf-fallback { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; background: #eef2f8; }
.ntf-fallback[hidden] { display: none; }
.ntf-fallback p { margin: 0; color: var(--ntf-ink); }

.ntf-viewer-body:fullscreen { height: 100vh; max-height: none; }
.ntf-mobile-hint { display: none; margin: 0; padding: 10px 16px; font-size: 13px; text-align: center; color: var(--ntf-muted); background: var(--ntf-bg); border-top: 1px solid var(--ntf-line); }
.ntf-noscript { margin-top: 12px; font-size: 14px; color: var(--ntf-muted); }

.ntf-js .ntf-tabs .ntf-tab { animation: ntf-pop .7s cubic-bezier(.34, 1.56, .64, 1) backwards; animation-delay: calc(var(--i, 0) * 90ms + .1s); }
@keyframes ntf-pop { from { opacity: 0; transform: translateY(30px) scale(.86); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
    .ntf-tabs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .ntf-tabs { gap: 10px; }
    .ntf-tab strong { font-size: 14px; min-height: 48px; }
    .ntf-viewer-head { padding: 14px; }
    .ntf-viewer-actions { width: 100%; }
    .ntf-viewer-actions .ntf-btn { flex: 1 1 auto; justify-content: center; }
    .ntf-viewer-actions #ntf-fullscreen { display: none; }
    .ntf-viewer-body { height: 70vh; min-height: 420px; }
    .ntf-mobile-hint { display: block; }
}
@media (prefers-reduced-motion: reduce) {
    .ntf-landing *, .ntf-landing *::before, .ntf-landing *::after { animation: none !important; transition-duration: .01ms !important; }
}
@media print { .ntf-viewer-actions, .ntf-mobile-hint { display: none !important; } }
.ntf-js .ntf-tabs .ntf-tab[aria-selected="true"] { animation: ntf-pop .7s cubic-bezier(.34, 1.56, .64, 1) .1s backwards, ntf-pulse 2.4s ease-out .9s infinite; }
