.proposta-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto; /* <--- Adicionado */
    display: flex;
    align-items: center;
    justify-content: center;
}

.proposta-modal-content {
    position: relative;
    background-color: #fff;
    padding: 10mm 10mm;
    width: 210mm; /* Tamanho A4 */
    min-height: 297mm;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.proposta-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.proposta-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.proposta-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.proposta-close:hover {
    color: #333;
}

.proposta-content {
    width: 210mm; /* AQUI você aumenta a largura da “folha” */
    box-sizing: border-box;
    background: white;
}

.proposta-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary, .btn-secondary {
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.fas {
    font-size: 1rem;
}

/* Estilos específicos do documento de proposta */
.proposta-documento {
    padding: 10px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    background-color: white;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.proposta-cabecalho {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.proposta-logo-container {
    width: 45%;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    overflow: hidden;
}

.proposta-logo {
    width: 100%;
    max-width: 200px;
    height: auto;
}

.proposta-info-empresa {
    width: 55%;
    border: 1px solid #000;
    border-radius: 10px;
    padding: 5px 10px;
}

.proposta-info-empresa h2 {
    margin: 0;
    font-size: 16px;
    text-align: center;
    margin-bottom: 5px;
}

.empresa-detalhes p {
    margin: 1px 0;
    font-size: 11px;
}

.proposta-cliente {
    border: 1px solid #000;
    border-radius: 10px;
    padding: 5px 10px;
    margin-bottom: 10px;
}

.proposta-cliente p {
    margin: 3px 0;
    padding-bottom: 3px;
}

.proposta-tabela {
    margin-bottom: 10px;
}

.tabela-header {
    display: flex;
    border: 1px solid #000;
    border-radius: 5px;
    padding: 3px 10px;
    margin-bottom: 5px;
    align-items: center;
}

.tabela-col-produto {
    width: 15%;
    font-weight: bold;
    text-align: center;
}

.tabela-col-descricao {
    width: 85%;
    font-weight: bold;
    padding-left: 10px;
}

.item-proposta {
    display: flex;
    border-bottom: 1px dotted #ccc;
    padding: 5px 0;
    margin-bottom: 5px;
}

.item-imagem {
    width: 15%;
    height: auto;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-imagem img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}

.item-detalhes {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    position: relative;
}

.item-titulo {
    width: 100%;
    font-weight: bold;
    margin: 0 0 3px 0 !important;
}

.item-detalhes p {
    margin: 2px 0;
    font-size: 11px;
}

.item-medidas {
    display: flex;
    gap: 15px;
    margin: 2px 0;
    font-size: 11px;
}

.item-info-direita {
    position: absolute;
    right: 0;
    top: 0;
    text-align: right;
}

.proposta-total {
    text-align: right;
    border: 1px solid #000;
    border-radius: 5px;
    padding: 3px 10px;
    margin: 10px 0;
}

.proposta-condicoes {
    margin: 10px 0;
}

.proposta-condicoes p {
    margin: 2px 0;
    font-size: 11px;
}

.proposta-assinaturas {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    padding: 0 50px;
}

.proposta-assinatura {
    text-align: center;
    width: 180px;
}

.proposta-assinatura hr {
    border: none;
    border-top: 1px solid #000;
    margin-bottom: 5px;
}

.proposta-data {
    text-align: right;
    margin-top: 20px;
    font-size: 11px;
}

/* Ajustes para impressão */
@media print {
    .proposta-modal-content {
        margin: 0;
        padding: 0;
        border: none;
        width: 210mm;
        height: 297mm;
        overflow: visible;
        box-shadow: none;
    }

    .proposta-close, .proposta-actions, .proposta-modal-header {
        display: none;
    }
    
    .proposta-documento {
        padding: 10mm;
    }
    
    @page {
        size: A4;
        margin: 0;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.proposta-modal.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.proposta-modal.active .proposta-modal-content {
    animation: slideIn 0.3s ease-out;
}

.proposta-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    margin: 10px 0;
}

.proposta-item:last-child {
    border-bottom: none;
}

.proposta-item p {
    margin: 5px 0;
}

.proposta-item strong {
    color: #1976d2;
}

/* Ajustes para garantir que o modal seja visível */
.proposta-modal.active {
    display: block !important;
    opacity: 1;
}

/* Melhorias na responsividade */
@media (max-width: 768px) {
    .proposta-modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 15px;
    }

    .proposta-cabecalho {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .proposta-info-empresa {
        text-align: center;
        width: 100%;
    }

    .proposta-assinaturas {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }


} 