﻿:root {
    --brand: #172f4d;
    --brand-2: #2f4f73;
    --panel-w: 460px;
}

/* ===== LAYOUT ===== */

.nfse-shell {
    min-height: 100vh;
    display: flex;
    background: #eee;
}

.nfse-hero {
    flex: 1 1 auto;
    position: relative;
    background: url('/img/fundo.jpg') center/cover no-repeat;
    overflow: hidden;
}

.nfse-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 40%;
    background: linear-gradient(to top, rgba(23, 47, 77, .75), rgba(23, 47, 77, 0));
    pointer-events: none;
}

.nfse-hero-content {
    position: absolute;
    left: 48px;
    bottom: 42px;
    z-index: 1;
    max-width: 900px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.nfse-hero-title {
    font-size: clamp(24px, 3vw, 42px);
    font-weight: 800;
    margin: 0 0 8px;
}

.nfse-hero-sub {
    margin: 0;
    opacity: .9;
    max-width: 680px;
}

/* ===== PANEL ===== */

.nfse-panel {
    width: var(--panel-w);
    max-width: 100%;
    background: #fff;
    box-shadow: -12px 0 32px rgba(0, 0, 0, .12);
    padding: 28px 28px 18px;
    display: flex;
    flex-direction: column;
}

.nfse-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.nfse-logo img {
    max-height: 74px;
}

/* ===== FORM ===== */

.nfse-desc {
    margin: 6px 0 16px;
    color: #6c757d;
    font-size: 13px;
}

.nfse-field-label {
    font-weight: 700;
    color: #444;
    margin-bottom: 6px;
}

.nfse-input {
    border-radius: 6px;
    height: 44px;
}

.nfse-actions {
    margin-top: 18px;
}

/* ===== BUTTON ===== */

.nfse-btn {
    width: 100%;
    height: 52px;
    border-radius: 6px;
    background: var(--brand);
    border-color: var(--brand);
    font-weight: 800;
    position: relative;
}

/* hover NORMAL */
.nfse-btn:hover:not(.is-disabled),
.nfse-btn:focus-visible:not(.is-disabled) {
    background: #1e3c63;
    border-color: #1e3c63;
}

/* estado bloqueado (substitui [disabled]) */
.nfse-btn.is-disabled {
    background: #cfd6df !important;
    border-color: #cfd6df !important;
    color: #7a8699 !important;
    cursor: not-allowed;
}

/* Estado de loading do botão */
.nfse-btn.is-loading {
    background-color: #1e3c63 !important;
    /* azul padrão */
    border-color: #1e3c63 !important;
    color: #fff !important;
    cursor: wait;
}

/* garante que hover não sobrescreva durante loading */
.nfse-btn.is-loading:hover {
    background-color: #1e3c63 !important;
    border-color: #1e3c63 !important;
}


/* impede hover azul quando bloqueado */
.nfse-btn.is-disabled:hover,
.nfse-btn.is-disabled:focus-visible {
    background: #cfd6df !important;
    border-color: #cfd6df !important;
}

/* cadeado */
.nfse-btn.is-disabled::after {
    content: "\f023";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #7a8699;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

/* mostra cadeado no hover */
.nfse-btn.is-disabled:hover::after {
    opacity: 1;
}

.nfse-btn.is-disabled::after {
    content: "🔒";
    font-family: inherit;
}

/* ===== FOOTER ===== */

.nfse-footer-links {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #777;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.nfse-footer-links a {
    color: #777;
    text-decoration: none;
}

.nfse-footer-links a:hover {
    text-decoration: underline;
}

.nfse-footnote {
    margin-top: 18px;
    padding-top: 14px;
    /* border-top: 1px solid #eee; */
    font-size: 12px;
    color: #8a8a8a;
    text-align: center;
}

/* ===== TABS ===== */

.nfse-panel .nav-tabs {
    border-bottom: 0 !important;
    gap: 10px;
    margin: 10px 0 16px;
}

.nfse-panel .nav-tabs .nav-item {
    flex: 1;
}

.nfse-panel .nav-tabs .nav-link {
    width: 100%;
    height: 52px;
    border-radius: 6px !important;
    border: 0 !important;
    background: #efefef;
    color: #8a8a8a;
    font-weight: 800;
    transition: all .2s ease;
}

.nfse-panel .nav-tabs .nav-link:hover {
    background: #e4e4e4;
    color: #555;
}

.nfse-panel .nav-tabs .nav-link.active {
    background: var(--brand) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(23, 47, 77, .35);
}

.nfse-panel .nav-tabs .nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 47, 77, .35);
}

/* ===== MODAL ===== */

.nfse-modal .modal-content {
    border-radius: 10px;
    background: #fff !important;
}

.nfse-modal .modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid #eee;
}

.nfse-modal .modal-title {
    font-size: 18px;
    font-weight: 800;
}

.nfse-modal .modal-body {
    padding: 18px 22px;
}

.nfse-qrbox {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin-bottom: 18px;
}

.nfse-qrbox img {
    width: 140px;
    height: 140px;
    object-fit: contain;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .nfse-hero {
        display: none !important;
    }

    .nfse-panel {
        width: 100% !important;
        min-height: 100vh;
        box-shadow: none !important;
        padding: 16px;
    }

    .nfse-btn {
        height: 56px;
        font-size: 16px;
    }
}

.btn-brand {
    background-color: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #fff !important;
    font-weight: 800;
}

.btn-brand:hover,
.btn-brand:focus-visible {
    background-color: #1e3c63 !important;
    border-color: #1e3c63 !important;
    color: #fff !important;
}

.btn-brand:disabled,
.btn-brand.disabled {
    background-color: #cfd6df !important;
    border-color: #cfd6df !important;
    color: #7a8699 !important;
    opacity: 1 !important;
    cursor: not-allowed;
}

/* Alert modal no estilo do portal */
.nfse-alert .modal-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.nfse-alert .modal-title {
    font-weight: 800;
}

.nfse-alert .modal-body {
    padding: 14px 16px;
    font-size: 14px;
    color: #444;
}

.nfse-alert .modal-body i {
    color: var(--brand);
    font-size: 18px;
}

.nfse-alert .modal-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}

/* ALERT: herda o mesmo estilo do modal grande */
#modalAlert .modal-content {
    border-radius: 10px;
    overflow: hidden;
    background: #fff !important;
    border: 0 !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

/* igualar paddings do modal grande */
#modalAlert .modal-header {
    padding: 18px 22px !important;
    border-bottom: 1px solid #eee !important;
}

#modalAlert .modal-title {
    font-size: 18px !important;
    font-weight: 800 !important;
}

#modalAlert .modal-body {
    padding: 18px 22px !important;
    font-size: 14px;
    color: #444;
}

#modalAlert .modal-footer {
    padding: 16px 22px !important;
    border-top: 1px solid #eee !important;
    display: flex;
    justify-content: flex-end;
}

/* ícone do alerta */
#modalAlert .modal-body i {
    color: var(--brand);
    font-size: 18px;
}

/* Cards das informações */
.nfse-kv-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 16px;
}

.nfse-kv {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
}

/* Item individual */
.nfse-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Ajuste de label */
.nfse-k {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #777;
}

/* Valor padrão */
.nfse-v {
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

/* Valor em destaque (preço) */
.nfse-v-highlight {
    color: var(--brand);
    font-size: 15px;
}

/* Código fiscal mais técnico */
.nfse-v-mono {
    font-family: monospace;
    letter-spacing: .5px;
    word-break: break-all;
}

/* Nota fiscal separada visualmente */
.nfse-note {
    background: #fff;
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 12px;
}

@media (max-width: 991px) {
    .nfse-kv {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .nfse-kv {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}