@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--rs-primary, #631656);
}

.btn-primary {
    color: #fff;
    background-color: var(--rs-primary, #631656);
    border-color: var(--rs-primary-hover, #4f1145);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* ── Blazor Error UI (dark theme) ─────────────────────────────────────────── */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    border-top: 3px solid #ef4444;
    background: #1c1c1f;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
    animation: slideUpErr 0.3s ease;
}

@keyframes slideUpErr {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.blazor-error-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.blazor-error-icon {
    color: #ef4444;
    font-size: 22px;
    flex-shrink: 0;
}

.blazor-error-text {
    flex: 1;
    color: #e4e4e7;
    font-size: 14px;
}

.blazor-error-reload {
    padding: 6px 16px;
    background: var(--rs-primary, #631656);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.blazor-error-reload:hover { background: var(--rs-primary-light, #8b3d7c); }

.blazor-error-dismiss {
    color: #71717a;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    transition: color 0.2s;
}

.blazor-error-dismiss:hover { color: #e4e4e7; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Ha ocurrido un error.";
}

/* ── Reconnect Modal (dark theme) ─────────────────────────────────────────── */
#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

/* Blazor añade estas clases al div automáticamente */
#components-reconnect-modal.components-reconnect-show    { display: flex; }
#components-reconnect-modal.components-reconnect-failed  { display: flex; }
#components-reconnect-modal.components-reconnect-rejected { display: flex; }

.reconnect-modal-content {
    background: #1c1c1f;
    border: 1px solid #27272a;
    border-radius: 16px;
    padding: 36px 40px;
    min-width: 300px;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

/* Mostrar sólo el estado activo */
.reconnect-state { display: none; flex-direction: column; align-items: center; gap: 12px; }

#components-reconnect-modal.components-reconnect-show     .reconnect-show     { display: flex; }
#components-reconnect-modal.components-reconnect-failed   .reconnect-failed   { display: flex; }
#components-reconnect-modal.components-reconnect-rejected .reconnect-rejected { display: flex; }

.reconnect-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #27272a;
    border-top-color: var(--rs-primary, #631656);
    border-radius: 50%;
    animation: reconnect-spin 0.8s linear infinite;
    margin-bottom: 4px;
}

@keyframes reconnect-spin {
    to { transform: rotate(360deg); }
}

.reconnect-icon {
    font-size: 40px;
    color: #f59e0b;
}

.reconnect-text {
    color: #e4e4e7;
    font-size: 15px;
    font-weight: 500;
}

.reconnect-btn {
    display: inline-block;
    margin-top: 4px;
    padding: 9px 28px;
    background: var(--rs-primary-gradient, linear-gradient(135deg, #631656, #8b3d7c));
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.reconnect-btn:hover { opacity: 0.85; color: #fff; }


/* Estilos para el di�logo de ruta */
.route-dialog .rz-dialog-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

.route-dialog .rz-dialog-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 !important;
}

.route-dialog .rz-dialog-title-bar {
    flex-shrink: 0;
}