/* ============================================================
   MUNICIPALIDAD DE SALTA - CORE V2
   Archivo: libertad/css/municipal-core.css

   Debe cargarse después de municipal-theme.css
   y antes de los componentes específicos.
============================================================ */


/* ============================================================
   COMPORTAMIENTO GENERAL
============================================================ */

body.muni-v2 {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.muni-v2 *,
.muni-v2 *::before,
.muni-v2 *::after {
    box-sizing: border-box;
}

.muni-v2 a,
.muni-v2 button,
.muni-v2 input,
.muni-v2 select,
.muni-v2 textarea {
    transition:
        color var(--muni-transition-fast),
        background-color var(--muni-transition-fast),
        border-color var(--muni-transition-fast),
        box-shadow var(--muni-transition-fast),
        opacity var(--muni-transition-fast),
        transform var(--muni-transition-fast);
}


/* ============================================================
   SELECCIÓN DE TEXTO
============================================================ */

.muni-v2 ::selection {
    background: var(--muni-primary);
    color: var(--muni-text-inverse);
}

.muni-v2 ::-moz-selection {
    background: var(--muni-primary);
    color: var(--muni-text-inverse);
}


/* ============================================================
   ENLACES
============================================================ */

.muni-v2 a {
    color: var(--muni-primary);
    text-decoration: none;
}

.muni-v2 a:hover {
    color: var(--muni-primary-hover);
}

.muni-v2 a:focus {
    outline: none;
}


/* ============================================================
   FOCO ACCESIBLE
============================================================ */

.muni-v2 button:focus,
.muni-v2 input:focus,
.muni-v2 select:focus,
.muni-v2 textarea:focus,
.muni-v2 a:focus-visible {
    outline: none;
}

.muni-v2 button:focus-visible,
.muni-v2 a:focus-visible {
    box-shadow: 0 0 0 3px rgba(13, 111, 194, 0.18);
}


/* ============================================================
   PLACEHOLDERS
============================================================ */

.muni-v2 input::placeholder,
.muni-v2 textarea::placeholder {
    color: var(--muni-text-light);
    opacity: 1;
}


/* ============================================================
   ESTADOS DESHABILITADOS
============================================================ */

.muni-v2 button:disabled,
.muni-v2 input:disabled,
.muni-v2 select:disabled,
.muni-v2 textarea:disabled,
.muni-v2 .is-disabled {
    opacity: 0.58;
    cursor: not-allowed;
    pointer-events: none;
}


/* ============================================================
   SCROLLBAR GENERAL
============================================================ */

.muni-v2 {
    scrollbar-width: thin;
    scrollbar-color: #b8c5d3 transparent;
}

.muni-v2 ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.muni-v2 ::-webkit-scrollbar-track {
    background: transparent;
}

.muni-v2 ::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: var(--muni-radius-pill);
    background: #b8c5d3;
    background-clip: padding-box;
}

.muni-v2 ::-webkit-scrollbar-thumb:hover {
    background: #94a6b8;
    background-clip: padding-box;
}


/* ============================================================
   IMÁGENES
============================================================ */

.muni-v2 img {
    max-width: 100%;
    height: auto;
}


/* ============================================================
   CURSORES
============================================================ */

.muni-v2 button,
.muni-v2 [role="button"],
.muni-v2 .muni-clickable {
    cursor: pointer;
}


/* ============================================================
   ANIMACIONES REUTILIZABLES
============================================================ */

@keyframes muni-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes muni-fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes muni-scale-in {
    from {
        opacity: 0;
        transform: scale(0.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes muni-pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}

@keyframes muni-shimmer {
    0% {
        background-position: -700px 0;
    }

    100% {
        background-position: 700px 0;
    }
}

.muni-v2 .muni-fade-in {
    animation: muni-fade-in 0.25s ease both;
}

.muni-v2 .muni-fade-up {
    animation: muni-fade-up 0.3s ease both;
}

.muni-v2 .muni-scale-in {
    animation: muni-scale-in 0.22s ease both;
}


/* ============================================================
   HOVER ELEVADO
============================================================ */

.muni-v2 .muni-hover-lift {
    transition:
        transform var(--muni-transition-fast),
        box-shadow var(--muni-transition-fast);
}

.muni-v2 .muni-hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--muni-shadow);
}


/* ============================================================
   TEXTO TRUNCADO
============================================================ */

.muni-v2 .muni-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.muni-v2 .muni-line-clamp-2 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


/* ============================================================
   VISIBILIDAD
============================================================ */

.muni-v2 .muni-hidden {
    display: none !important;
}

.muni-v2 .muni-invisible {
    visibility: hidden !important;
}

.muni-v2 .muni-visible {
    visibility: visible !important;
}


/* ============================================================
   SKELETON LOADING
============================================================ */

.muni-v2 .muni-skeleton {
    overflow: hidden;
    border-radius: var(--muni-radius-sm);
    background:
        linear-gradient(
            90deg,
            #eef2f6 25%,
            #f8fafc 50%,
            #eef2f6 75%
        );
    background-size: 700px 100%;
    animation: muni-shimmer 1.4s infinite linear;
}

.muni-v2 .muni-skeleton-text {
    width: 100%;
    height: 12px;
}

.muni-v2 .muni-skeleton-title {
    width: 60%;
    height: 18px;
}

.muni-v2 .muni-skeleton-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}


/* ============================================================
   OVERLAY DE CARGA
============================================================ */

.muni-v2 .muni-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: var(--muni-z-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(2px);
}

.muni-v2 .muni-loading-overlay.is-fixed {
    position: fixed;
    border-radius: 0;
}


/* ============================================================
   CONTENEDOR DE CONTENIDO
============================================================ */

.muni-v2 .muni-container {
    width: 100%;
    max-width: var(--muni-content-max-width);
    margin-right: auto;
    margin-left: auto;
}


/* ============================================================
   DIVISORES
============================================================ */

.muni-v2 .muni-divider {
    width: 100%;
    height: 1px;
    margin: var(--muni-space-5) 0;
    border: 0;
    background: var(--muni-border-soft);
}

.muni-v2 .muni-divider-vertical {
    width: 1px;
    min-height: 24px;
    background: var(--muni-border-soft);
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (prefers-reduced-motion: reduce) {
    .muni-v2 *,
    .muni-v2 *::before,
    .muni-v2 *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}