/* Fase 9.3 — CSS verbatim de los bloques de estilo de Pages/Common/Licencia/ModuloGate.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. */
.mg-root {
    --mg-cobalt: #1a4fba;
    --mg-cobalt-deep: #0f3494;
    --mg-cobalt-light: #2d6ae0;
    --mg-cobalt-pale: #e8eef9;
    --mg-cobalt-subtle: #f0f4fb;
}

.mg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.mg-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    animation: mg-spin .8s linear infinite;
}

@keyframes mg-spin {
    to { transform: rotate(360deg); }
}

.mg-modal {
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15,23,42,.35);
    display: flex;
    flex-direction: column;
}

.mg-modal-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    background: linear-gradient(135deg, var(--mg-cobalt) 0%, var(--mg-cobalt-deep) 100%);
    border-radius: 14px 14px 0 0;
    color: #fff;
}

.mg-modal-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 5px;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.mg-modal-head h3 {
    margin: 0 0 2px;
    font-size: 15.5px;
    font-weight: 700;
}

.mg-modal-head p {
    margin: 0;
    font-size: 12.5px;
    opacity: .85;
}

.mg-modal-body {
    padding: 20px 22px;
    font-size: 13.5px;
    color: #1f2937;
}

.mg-mensaje {
    margin: 0 0 14px;
    color: #374151;
    line-height: 1.5;
}

.mg-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 12px;
    background: var(--mg-cobalt-subtle);
    border-radius: 5px;
    margin-bottom: 14px;
    font-size: 13px;
}

.mg-dias {
    font-weight: 400;
    color: #6b7280;
    font-size: 12px;
    margin-left: 4px;
}

.mg-precios {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 4px;
}

.mg-precio-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    font-size: 13px;
}

.mg-nota-igv {
    margin: 6px 0 14px;
    font-size: 11.5px;
    color: #9ca3af;
    font-style: italic;
}

.mg-alerta-promo {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 5px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.mg-alerta-promo i {
    margin-top: 1px;
    flex-shrink: 0;
}

.mg-pago {
    background: var(--mg-cobalt-pale);
    border-radius: 5px;
    padding: 14px 16px;
}

.mg-pago-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--mg-cobalt-deep);
    font-size: 13px;
    margin-bottom: 12px;
}

.mg-pago-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.mg-pago-field:last-of-type {
    margin-bottom: 0;
}

.mg-pago-label {
    font-size: 10.5px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mg-pago-value {
    font-size: 13px;
    color: #1f2937;
    line-height: 1.4;
}

.mg-pago-mono {
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
    word-break: break-all;
}

.mg-pago-instrucciones {
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px dashed rgba(15,52,148,.2);
    font-size: 12px;
    color: #4b5563;
    line-height: 1.5;
}

.mg-modal-foot {
    padding: 16px 22px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
}

.mg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    height: 34px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.mg-btn-primary {
    background: var(--mg-cobalt);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

.mg-btn-primary:hover {
    background: var(--mg-cobalt-deep);
}

.mg-btn-outline {
    background: #fff;
    color: var(--mg-cobalt);
    border: 1px solid var(--mg-cobalt);
    margin-right: auto;
}

.mg-btn-outline:hover {
    background: var(--mg-cobalt-pale);
}

/* ---- Aviso no bloqueante de vencimiento próximo (independiente del modal de arriba) ---- */
.mg-expiry-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    margin: 0 0 12px;
    border-radius: 5px;
    background: #fdf1de;
    border: 1px solid #e8b768;
}

.mg-expiry-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: #b8720f;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.mg-expiry-text strong {
    display: block;
    font-size: 13px;
    color: #1f2937;
    margin-bottom: 2px;
}

.mg-expiry-text span {
    font-size: 12px;
    color: #6b7280;
}

.mg-expiry-dias {
    margin-left: auto;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.mg-expiry-dias b {
    font-size: 18px;
    color: #b8720f;
    display: block;
    line-height: 1;
}

.mg-expiry-dias small {
    font-size: 10px;
    color: #9ca3af;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.mg-expiry-btn {
    flex-shrink: 0;
    padding: 7px 14px;
    height: 32px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid #b8720f;
    border-radius: 5px;
    background: #fff;
    color: #b8720f;
    cursor: pointer;
}

.mg-expiry-btn:hover {
    background: #fdf1de;
}
