
/* --- ESTILOS GERAIS (DESKTOP) --- */
.shipping-title {
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: bold;
    color: #000;
}
    .label-custom { font-size: 0.85rem; font-weight: 700; color: #000; text-transform: uppercase; letter-spacing: 0.5px; }
    .value-custom { font-size: 0.85rem; color: #212529; font-weight: 500; }
    .badge-status { font-size: 0.7rem; font-weight: 900; }

/* --- ESTILOS GERAIS --- */

.shipping-grid { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.shipping-card {
    background: #fff; 
    border: 1px solid #e9ecef; 
    border-radius: 6px;
    padding: 10px; 
    text-align: center; 
    cursor: pointer;
    transition: all 0.3s ease; 
    display: flex; 
    flex-direction: column;
    justify-content: center; 
    min-height: 60px; 
    flex: 1 1 calc(25% - 10px);
    min-width: 140px; 
    box-sizing: border-box;
    font-size: 13px;

}
.shipping-card.active {
    border: 2px solid #27ae60 !important;
    background-color: #f0fff4 !important;
    box-shadow: 0 0 8px rgba(39, 174, 96, 0.4);
    transition: all 0.2s ease;
}

/* --- AJUSTE DINÂMICO DO COMBO (SELECT2) --- */
.select2-container .select2-selection--single {
    /* Permite que a altura cresça conforme o conteúdo */
    height: auto !important; 
    min-height: 38px !important; /* Altura mínima padrão do Bootstrap */
    display: flex !important;
    align-items: center !important;
    padding: 6px 0 !important; /* Espaço interno superior e inferior */
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    /* Força a quebra de linha e ajusta o respiro do texto */
    white-space: normal !important; 
    word-wrap: break-word !important; 
    line-height: 1.5 !important; /* Melhora a leitura entre linhas */
    padding-left: 12px !important;
    padding-right: 30px !important; /* Evita que o texto fique sob a seta */
    color: #444 !important;
}

/* Centraliza a seta do combo verticalmente, independente da altura do texto */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    display: flex !important;
    align-items: center !important;
    right: 5px !important;
}
/* --- AJUSTES MOBILE (Telas até 768px) --- */
@media (max-width: 768px) {
    
    /* 1. Reset da Estrutura da Tabela */
    [name="fieldList_Produtos"] thead { display: none !important; }
    
    [name="fieldList_Produtos"] table, 
    [name="fieldList_Produtos"] tbody, 
    [name="fieldList_Produtos"] tfoot, 
    [name="fieldList_Produtos"] tr,
    [name="fieldList_Produtos"] td {
        display: block !important;
        width: 100% !important;
    }

    /* 2. Estilização das Linhas de Dados (Body) */
    [name="fieldList_Produtos"] tbody tr {
        margin-bottom: 20px;
        padding: 12px;
        background: #fff;
        border: 1px solid #ddd !important;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    /* 3. Injeção de Cabeçalhos (Apenas no Body) */
    [name="fieldList_Produtos"] tbody td:nth-child(4)::before { content: "Produto"; }
    [name="fieldList_Produtos"] tbody td:nth-child(5)::before { content: "Valor Unitário"; }
    [name="fieldList_Produtos"] tbody td:nth-child(6)::before { content: "Desconto"; }
    [name="fieldList_Produtos"] tbody td:nth-child(7)::before { content: "Valor Total"; }

    [name="fieldList_Produtos"] tbody td::before {
        display: block; font-weight: bold; font-size: 11px;
        color: #777; margin-bottom: 3px; text-transform: uppercase;
    }

    /* 4. RODAPÉ (TFOOT) - ONDE ESTÃO OS TOTAIS */
    [name="fieldList_Produtos"] tfoot tr {
        background: #f9f9f9;
        padding: 10px;
        border-top: 2px solid #27ae60 !important;
        margin-top: 10px;
    }

    /* Esconde células vazias do rodapé no mobile */
    [name="fieldList_Produtos"] tfoot td:empty {
        display: none !important;
    }

    /* Estiliza a célula que contém o valor da soma */
    [name="fieldList_Produtos"] tfoot td {
        text-align: right !important;
        font-weight: bold;
        font-size: 16px;
        color: #27ae60;
        padding: 8px 0 !important;
    }

    /* Esconde campos ocultos técnicos */
    [name="fieldList_Produtos"] tbody td:nth-child(1),
    [name="fieldList_Produtos"] tbody td:nth-child(2),
    [name="fieldList_Produtos"] tbody td:nth-child(3) {
        display: none !important;
    }
}

.parcela-card {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 20px 24px;
    margin-bottom: 18px;
    background: #fff;
    transition: all .2s ease;
    cursor: pointer;
    width: 100%;
}

.parcela-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.parcela-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.parcela-left {
    flex: 1;
}

.parcela-title {
    font-weight: 600;
    font-size: 17px;
    margin-bottom: 5px;
}

.parcela-info {
    color: #6b7280;
    font-size: 14px;
}

.parcela-status {
    margin-left: 10px;
}

.parcela-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    padding: 6px 12px;
    white-space: nowrap;
}

.parcela-valor {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.parcela-vencimento {
    font-size: 16px;
    color: #6b7280;
}

.btn-pix {
    background: linear-gradient(135deg, #563d7c, #6f42c1);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 600;
    transition: .2s;
    white-space: nowrap;
}

.btn-pix:hover {
    opacity: 0.9;
}

/* Mobile */
@media (max-width: 768px) {

    .parcela-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .parcela-status-badge {
        display: contents;
    }

    .btn-pix {
        width: 100%;
        margin-top: 15px;
    }
}

.status-pendente-border {
    border-left: 5px solid #0ea5e9;
}
.status-pago-border {
    border-left: 5px solid #10b981;
}