/* Modal de visualização de PDF — página Legislação
   Paleta do site: teal #2c7a7b | verde #4CAF50 | teal claro #e0f2f1 */

body.leg-modal-aberto { overflow: hidden; }

.leg-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.leg-modal[hidden] { display: none; }

.leg-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 20, .85);
}

.leg-modal-box {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1000px, 100%);
    height: min(90vh, 100%);
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .5);
}

.leg-modal-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: #2c7a7b;
    color: #fff;
}

.leg-modal-topo h3 {
    margin: 0;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.leg-modal-acoes {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.leg-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 30px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: .3s;
    white-space: nowrap;
}

.leg-modal-btn-download { background: #4CAF50; color: #fff; }
.leg-modal-btn-download:hover { background: #3d9341; }

.leg-modal-btn-aba {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .5);
}
.leg-modal-btn-aba:hover { background: rgba(255, 255, 255, .28); }

.leg-modal-fechar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: .3s;
}
.leg-modal-fechar:hover { background: #fff; color: #2c7a7b; }

.leg-modal-corpo {
    flex: 1;
    min-height: 0;
    background: #f1f1f1;
}

.leg-modal-corpo iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.leg-modal-aviso {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 30px;
    text-align: center;
    color: #555;
}
.leg-modal-aviso i { font-size: 2.6rem; color: #2c7a7b; }
.leg-modal-aviso p { max-width: 420px; line-height: 1.6; }

@media (max-width: 640px) {
    .leg-modal { padding: 0; }
    .leg-modal-box { height: 100%; border-radius: 0; }
    .leg-modal-topo { flex-wrap: wrap; }
    .leg-modal-topo h3 { flex: 1 1 100%; }
    .leg-modal-acoes { width: 100%; }
    .leg-modal-btn { flex: 1; justify-content: center; }
    .leg-modal-fechar { margin-left: auto; }
}
