/* Estilos para la previsualización de factura */

.invoice-preview {
    max-width: 100%;
    height: 100%;
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    border: 1px solid #e0e0e0;
    position: sticky;
    top: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.3s ease;
    position: relative;
}

.invoice-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(220, 53, 69, 0.25);
}

.invoice-preview .card-header {
    background: #dc3545;
    color: #fff;
    padding: 1.25rem;
    border-bottom: 1px solid #c82333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.invoice-preview .card-header::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #dc3545, #9a1c28);
    border-radius: 50%;
    opacity: 0.3;
    z-index: 0;
}

.invoice-preview .card-header h5 {
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index:

.invoice-preview .whatsapp-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e0e0e0;
}

.invoice-preview .whatsapp-header i {
    margin-right: 10px;
}

.invoice-preview h4 {
    color: #ff6b00;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.05);
    position: relative;
    display: inline-block;
}

.invoice-preview h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b00, #c06e2d);
    border-radius: 3px;
}

.invoice-preview h5 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.invoice-preview .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.invoice-preview .table th {
    background: linear-gradient(135deg, #ff6b00, #c06e2d);
    color: white;
    border-bottom: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.invoice-preview .table td,
.invoice-preview .table th {
    padding: 0.85rem;
    vertical-align: middle;
}

.invoice-preview .table tfoot tr:first-child td {
    border-top: 2px solid #dee2e6;
}

.invoice-preview .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.invoice-preview .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.invoice-preview .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
    transition: all 0.4s ease;
    z-index: -1;
}

.invoice-preview .btn:hover::before {
    left: 100%;
}

.invoice-preview .btn i {
    margin-right: 0.5rem;
}

.invoice-preview p {
    margin-bottom: 0.5rem;
    color: #666;
}

/* Estilos para la insignia de PDF añadido */
.pdf-badge {
    animation: pulse 2s infinite;
    font-weight: bold;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Estilos para dispositivos móviles */
@media (max-width: 991.98px) {
    .invoice-preview {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }
    
    .invoice-preview .card-body {
        max-height: 500px;
    }
}

.invoice-preview p span {
    color: #333;
    font-weight: 500;
}

.invoice-preview .alert {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Estilos para WhatsApp */
.whatsapp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    background-color: #f0f8f0;
    padding: 12px 15px;
    border-radius: 12px;
    border-left: 4px solid #25D366;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.1);
}

.whatsapp-header img {
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: pulse 2s infinite;
}

.whatsapp-header .whatsapp-text {
    color: #25D366;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

/* Estilos para el código de barras */
.barcode-container {
    text-align: center;
    margin-top: 25px;
    padding: 18px 0;
    border-top: 1px dashed #ddd;
    background-color: #f9f9f9;
    border-radius: 0 0 12px 12px;
    position: relative;
}

.barcode-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background-color: #ff6b00;
    border-radius: 50%;
    box-shadow: -50px 0 0 #ff6b00, 50px 0 0 #ff6b00;
}

.barcode-container img {
    max-width: 90%;
    height: 65px;
    filter: contrast(1.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    background-color: white;
    padding: 5px;
}

/* Estilos para la sección de totales */
.totals-section {
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 12px;
    padding: 18px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 107, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.totals-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b00, #c06e2d);
    border-radius: 0 0 0 60px;
    opacity: 0.1;
}

.totals-section .d-flex {
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.totals-section .fw-bold {
    color: #ff6b00;
    font-size: 1.1rem;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .invoice-preview .card-body {
        padding: 1rem;
    }

    .invoice-preview .table-responsive {
        margin-bottom: 1rem;
        border: 0;
    }

    .invoice-preview .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .invoice-preview .btn:last-child {
        margin-bottom: 0;
    }
    
    .barcode-container img {
        height: 50px;
    }
}