/* Fase 9.3 — CSS verbatim de los bloques de estilo de Pages/Common/MDSeleccionarUbigeoPage.razor. Igual que hoy, es global mientras el componente está en pantalla:
   se enlaza con <link> donde estaba el bloque. Cambios: @@ → @ y capas D-51. */
/* =====================================================
   PopupUbigeo.razor.css  — Vantastic Cobalt Blue
   ===================================================== */

/* OVERLAY */
.ubigeo-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-5);
    background: rgba(8, 24, 56, 0.52);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    animation: ubigeoOverlayIn 0.18s ease;
}

@keyframes ubigeoOverlayIn {
    from

{
    opacity: 0;
}

to {
    opacity: 1;
}

}

/* MODAL BOX */
.ubigeo-modal {
    background: #ffffff;
    border-radius: 12px;
    width: 520px;
    max-width: calc(100vw - 32px);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(14, 45, 100, 0.22), 0 2px 8px rgba(14, 45, 100, 0.10);
    animation: ubigeoModalIn 0.2s cubic-bezier(.34,1.3,.64,1);
}

@keyframes ubigeoModalIn {
    from

{
    transform: scale(0.94) translateY(8px);
    opacity: 0;
}

to {
    transform: scale(1) translateY(0);
    opacity: 1;
}

}

/* HEADER */
.ubigeo-modal-header {
    background: #1565C0;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.ubigeo-header-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    flex-shrink: 0;
}

.ubigeo-modal-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.2px;
}

.ubigeo-modal-subtitle {
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    margin: 3px 0 0;
}

/* BODY */
.ubigeo-modal-body {
    padding: 22px 24px 14px;
    background: #f3f7fb;
    overflow-y: auto;
    flex: 1;
}

/* SECTION LABEL */
.ubigeo-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #5589c4;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .ubigeo-section-label i {
        font-size: 11px;
        color: #5589c4;
    }

/* FIELD */
.ubigeo-field-group {
    margin-bottom: 14px;
}

.ubigeo-field-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #1a4fa0;
    text-transform: uppercase;
    letter-spacing: 0.55px;
    margin-bottom: 6px;
}

/* READONLY DISPLAY FIELD */
.ubigeo-readonly-field {
    background: #edf2fa;
    border: 1.5px dashed #c0d5ee;
    border-radius: 7px;
    padding: 9px 13px;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    transition: border-color 0.2s, background 0.2s;
}

    .ubigeo-readonly-field.has-value {
        background: #e8f0fb;
        border-color: #90b8e8;
        border-style: solid;
    }

        .ubigeo-readonly-field.has-value.distrito {
            background: #ddeafa;
            border-color: #1565C0;
        }

.ubigeo-field-icon {
    color: #7aabd4;
    font-size: 13px;
    flex-shrink: 0;
}

.ubigeo-readonly-field.has-value .ubigeo-field-icon {
    color: #3a7dc9;
}

.ubigeo-field-text {
    flex: 1;
    font-size: 13.5px;
    color: #7a9bbf;
    font-weight: 400;
}

.ubigeo-readonly-field.has-value .ubigeo-field-text {
    color: #1e3a5f;
    font-weight: 500;
}

.ubigeo-readonly-field.has-value.distrito .ubigeo-field-text {
    color: #1565C0;
    font-weight: 600;
}

/* CÓDIGO BADGE */
.ubigeo-code-badge {
    background: #1565C0;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 2px 9px;
    border-radius: 5px;
    flex-shrink: 0;
}

/* GRID DE DETALLE */
.ubigeo-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* DIVIDER */
.ubigeo-divider {
    border: none;
    border-top: 1px solid #d8e6f5;
    margin: 6px 0 16px;
}

/* SYNCFUSION DROP DOWN TREE — integración suave */
.ubigeo-sf-tree.e-dropdowntree,
::deep .ubigeo-sf-tree.e-dropdowntree .e-input-group {
    background: #ffffff !important;
    border: 1.5px solid #b5d0ee !important;
    border-radius: 7px !important;
    padding: 2px 4px !important;
    box-shadow: none !important;
    transition: border-color 0.2s;
}

    ::deep .ubigeo-sf-tree.e-dropdowntree .e-input-group:focus-within {
        border-color: #1565C0 !important;
        box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12) !important;
    }

::deep .ubigeo-sf-tree .e-input {
    font-size: 13.5px !important;
    color: #1e3a5f !important;
    padding: 6px 8px !important;
}

    ::deep .ubigeo-sf-tree .e-input::placeholder {
        color: #8aabcc !important;
    }

::deep .ubigeo-sf-tree .e-input-group-icon {
    color: #5589c4 !important;
}

/* FOOTER */
.ubigeo-modal-footer {
    padding: 14px 24px;
    background: #ffffff;
    border-top: 1px solid #dce8f5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* BOTONES */
.ubigeo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: 5px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    transition: filter 0.15s, transform 0.1s;
    letter-spacing: 0.2px;
}

    .ubigeo-btn:active {
        transform: scale(0.97);
    }

    .ubigeo-btn i {
        font-size: 14px;
        color: #ffffff;
    }

.ubigeo-btn-primary {
    background: #1565C0;
    color: #ffffff;
}

    .ubigeo-btn-primary:hover {
        background: #1254a8;
        filter: brightness(1.06);
    }

.ubigeo-btn-secondary {
    background: #dde8f5;
    color: #1a4fa0;
}

    .ubigeo-btn-secondary i {
        color: #1a4fa0;
    }

    .ubigeo-btn-secondary:hover {
        background: #ccdcf0;
    }

/* LOADING OVERLAY */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-bloqueo);
    background: rgba(8, 24, 56, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: ubigeoSpin 0.7s linear infinite;
}

@keyframes ubigeoSpin {
    to

{
    transform: rotate(360deg);
}

}
