@import url("/assets/condominios/css/paginas.css?v=1");

/* ============================================================
   Efectos globales de condominios — ripple, toast, skeleton, tablas
   ============================================================ */

/* --- Fix: la utilidad .hidden no carga en el login (banners de error visibles) --- */
.hidden {
    display: none !important;
}

/* --- Ripple (onda al hacer click) ---
   OJO: excluir .sr-only / .sr-only-focusable. Son los enlaces de salto
   ("Ir al contenido principal") que Bootstrap esconde con
   position:absolute + width:1px; si se les pone position:relative
   aparecen como una píldora gris cortada en la esquina superior izquierda. */
.btn:not(.sr-only):not(.sr-only-focusable),
.es-button, .portal-btn, .portal-btn-lg, .portal-btn-outline, .portal-mini-btn,
a.link-item {
    position: relative;
    overflow: hidden;
}
.ripple-efecto {
    position: absolute;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.25;
    transform: scale(0);
    animation: rippleExpand .6s ease-out;
    pointer-events: none;
}
@keyframes rippleExpand {
    to { transform: scale(2.6); opacity: 0; }
}

/* --- Toast / alert: entrada deslizante --- */
.frappe-toast,
.toast,
.msgprint,
.indicator-pill.floating {
    animation: toastIn .28s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Skeleton de carga (shimmer) --- */
.skeleton,
.skeleton-shimmer {
    position: relative;
    overflow: hidden;
    background: #f0ede6 !important;
    border-radius: 8px;
    color: transparent !important;
}
.skeleton::after,
.skeleton-shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
    animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* --- Hover más profundo en filas de tablas --- */
.list-row:hover,
.grid-row:hover,
.dt-row:hover,
.rpt-table tbody tr:hover,
.portal-tabla tbody tr:hover {
    background: #fdf3e0 !important;
    box-shadow: inset 3px 0 0 var(--cc-naranja, #e8b830), 0 2px 8px rgba(60, 40, 10, .08) !important;
    transition: background .15s ease, box-shadow .15s ease;
}

@media (prefers-reduced-motion: reduce) {
    .ripple-efecto,
    .skeleton::after,
    .skeleton-shimmer::after,
    .frappe-toast,
    .toast,
    .msgprint {
        animation: none !important;
    }
}

/* ============================================================
   Estado vacío de las listas
   ------------------------------------------------------------
   NO inyectar un emoji con ::before: en Frappe 16 `.no-result` es
   un flex centrado, así que el pseudo-elemento se vuelve un ítem
   más y el emoji gigante aparece pegado a la izquierda, tapando el
   texto. Frappe ya dibuja su propio icono; aquí solo se ajusta el
   color y el tamaño del texto.
   ============================================================ */
.empty-state,
.no-result,
.no-records,
.frappe-list .empty-state,
.datatable .dt-empty-state {
    color: #8a7a5c;
    font-size: 14px;
}

.no-result .text-muted,
.no-records .text-muted {
    color: #8a7a5c !important;
}

html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .no-result,
html[data-theme="dark"] .no-records,
html[data-theme="dark"] .no-result .text-muted,
html[data-theme="dark"] .no-records .text-muted {
    color: #9aa0ab !important;
}

/* ============================================================
   Skeleton de lista (filas placeholder con shimmer)
   ============================================================ */
.skeleton-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0ede6;
}
.skeleton-row .sk {
    height: 12px;
    border-radius: 6px;
    background: #f0ede6;
    position: relative;
    overflow: hidden;
}
.skeleton-row .sk::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
    animation: shimmer 1.4s infinite;
}
.skeleton-row .sk.w40 { width: 40%; }
.skeleton-row .sk.w30 { width: 30%; }
.skeleton-row .sk.w20 { width: 20%; }
.skeleton-row .sk.w15 { width: 15%; }

/* ============================================================
   MOVIMIENTO GLOBAL — desk completo (19/10)
   ============================================================ */

/* Entrada del contenido al cambiar de ruta.
   Las páginas propias (.cc-pagina) traen su propia animación. */
@keyframes ccEntraPagina {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
.layout-main-section:not(.cc-pagina) {
    animation: ccEntraPagina .30s cubic-bezier(.2, .7, .3, 1) both;
}

/* Widgets y accesos: elevación al pasar el puntero */
.number-widget-box,
.shortcut-widget-box,
.links-widget-box,
.dashboard-widget-box {
    transition: transform .18s ease, box-shadow .22s ease, border-color .18s ease;
}
.number-widget-box:hover,
.shortcut-widget-box:hover,
.links-widget-box:hover,
.dashboard-widget-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px -14px rgba(28, 25, 23, .35);
    border-color: rgba(200, 144, 0, .35);
}

/* Botones: hundido al presionar y anillo de foco ámbar */
.btn:not(.btn-xs) {
    transition: transform .14s ease, box-shadow .18s ease, background .16s ease, border-color .16s ease;
}
.btn:not(.btn-xs):active:not(:disabled) {
    transform: translateY(1px) scale(.995);
}
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #e8b830;
    outline-offset: 2px;
}

/* Campos: borde ámbar y halo suave al enfocar */
.form-control:focus,
.input-with-feedback:focus,
textarea.form-control:focus {
    border-color: #c89000;
    box-shadow: 0 0 0 3px rgba(200, 144, 0, .14);
}

/* Diálogos: entrada corta, sin rebote */
@keyframes ccModal {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to   { opacity: 1; transform: none; }
}
.modal-content,
.msgprint-dialog .modal-content {
    animation: ccModal .26s cubic-bezier(.2, .7, .3, 1) both;
}

/* Menú lateral: el icono respira al pasar */
.body-sidebar .standard-sidebar-item .sidebar-item-icon,
.body-sidebar .standard-sidebar-item svg {
    transition: transform .18s ease, color .18s ease;
}
.body-sidebar .standard-sidebar-item:hover .sidebar-item-icon,
.body-sidebar .standard-sidebar-item:hover svg {
    transform: scale(1.08);
}

/* Barra de desplazamiento discreta, con ámbar al pasar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(200, 144, 0, .30);
    border: 2px solid transparent;
    background-clip: content-box;
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 144, 0, .55);
    background-clip: content-box;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(232, 184, 48, .28); background-clip: content-box; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(232, 184, 48, .5); background-clip: content-box; }

@media (prefers-reduced-motion: reduce) {
    .layout-main-section:not(.cc-pagina),
    .modal-content,
    .msgprint-dialog .modal-content {
        animation: none !important;
    }
    .number-widget-box,
    .shortcut-widget-box,
    .links-widget-box,
    .dashboard-widget-box,
    .btn,
    .body-sidebar .standard-sidebar-item svg {
        transition: none !important;
    }
    .number-widget-box:hover,
    .shortcut-widget-box:hover,
    .links-widget-box:hover,
    .dashboard-widget-box:hover {
        transform: none !important;
    }
}
