/* ========================================
   AppCosmoADM - Estilos de la Aplicacion (Dark)
   ======================================== */

/* ========================================
   App Loading Skeleton
   ======================================== */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(91,163,224,0.2);
    border-top: 4px solid #5ba3e0;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   Overlay Ocupado (busy state)
   ======================================== */
.overlay-ocupado {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 20, 0.75);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-content-ocupado {
    background: #1a2944;
    border: 1px solid #253a56;
    border-radius: 14px;
    padding: 32px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    font-size: 14px;
    color: #cdd9e5;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ========================================
   Reconnect Modal
   ======================================== */
#components-reconnect-modal              { display: none; }
#components-reconnect-modal.components-reconnect-show     { display: block; }
#components-reconnect-modal.components-reconnect-failed   { display: block; }
#components-reconnect-modal.components-reconnect-rejected { display: block; }

.reconnect-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 20, 0.82);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reconnect-box {
    background: #1a2944;
    border: 1px solid #253a56;
    border-radius: 16px;
    padding: 40px 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.6);
    max-width: 380px;
    width: 90%;
    text-align: center;
}

.reconnect-title {
    font-size: 17px;
    font-weight: 700;
    color: #cdd9e5;
    margin-top: 4px;
}

.reconnect-msg {
    font-size: 13.5px;
    color: #7a9ab5;
    line-height: 1.5;
    display: none;
}

/* Mensajes visibles segun estado */
#components-reconnect-modal.components-reconnect-show     .reconnect-msg--connecting { display: block; }
#components-reconnect-modal.components-reconnect-failed   .reconnect-msg--failed     { display: block; }
#components-reconnect-modal.components-reconnect-rejected .reconnect-msg--rejected   { display: block; }

/* Botones visibles segun estado */
.reconnect-btn { display: none; }

#components-reconnect-modal.components-reconnect-show     .reconnect-btn--retry  { display: none; }
#components-reconnect-modal.components-reconnect-failed   .reconnect-btn--retry  { display: inline-flex; }
#components-reconnect-modal.components-reconnect-failed   .reconnect-btn--reload { display: inline-flex; }
#components-reconnect-modal.components-reconnect-rejected .reconnect-btn--reload { display: inline-flex; }

.reconnect-btn {
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 22px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.reconnect-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

.reconnect-btn--retry {
    background: linear-gradient(135deg, #1a5fa0 0%, #2881c5 100%);
    color: #ffffff;
}

.reconnect-btn--reload {
    background: #253a56;
    color: #cdd9e5;
    border: 1px solid #2a3f5a;
}

/* Blazor error UI */
#blazor-error-ui {
    background: #1a3a60;
    color: #cdd9e5;
    bottom: 0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 99999;
    font-size: 14px;
    border-top: 1px solid #253a56;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    color: rgba(205,217,229,0.6);
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb-bar {
    position: fixed;
    top: var(--header-height, 48px);
    left: var(--sidebar-width, 220px);
    right: 0;
    z-index: 99;
    background: rgba(13, 21, 37, 0.95);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #253a56;
    padding: 6px 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #7a9ab5;
    box-shadow: 0 1px 6px rgba(0,0,0,0.25);
}

/* ========================================
   Footer
   ======================================== */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 5px 0;
    font-size: 12px;
    color: #3a5a7a;
    border-top: 1px solid #1a2944;
    background-color: #0d1525;
    z-index: 50;
}

/* ========================================
   Popup notificaciones
   ======================================== */
.popup-notificaciones {
    position: absolute;
    right: 0;
    top: 44px;
    background: #1a2944;
    border: 1px solid #253a56;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.5);
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
    padding: 8px 0;
    color: #7a9ab5;
}

/* ========================================
   Shortcut dropdown (accesos directos)
   ======================================== */
.shortcut-wrap {
    position: relative;
}

.shortcut-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #ffffff;
}

.shortcut-toggle:hover {
    background: rgba(255,255,255,0.12);
}

.shortcut-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    background: #1a2944;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.5);
    min-width: 220px;
    z-index: 9999;
    overflow: hidden;
    border: 1px solid #253a56;
}

.shortcut-header {
    padding: 9px 16px;
    font-size: 11px;
    font-weight: 700;
    color: #4a6a8a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid #253a56;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13.5px;
    color: #cdd9e5;
    transition: background 0.12s ease;
}

.shortcut-item:hover {
    background: rgba(255,255,255,0.06);
}

.shortcut-item .rz-icon {
    color: #7a9ab5 !important;
    font-size: 18px !important;
}

/* ========================================
   Notificaciones wrapper
   ======================================== */
.notif-wrap {
    position: relative;
}

.notif-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #ffffff;
}

.notif-toggle:hover {
    background: rgba(255,255,255,0.12);
}
