<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="robots" content="noindex">
    <meta name="googlebot" content="noindex">
    <title>DNA</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"> 
    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600&display=swap" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/css/main.css"/>
    <script>var base_url = '<?php echo base_url(); ?>';</script>
</head>
<body>    
<style>
    body {
        font-family: "Times New Roman";
        font-size: 13px;
        line-height: 1.42857143;
        color: #333;
        background-color: #fff;
    }
    .table {
        text-align: center; 
        color: #222;   
        width: 90%;
        max-width: 960px;
        background: #f8f8f8;
    }
    .table th {
        text-align: center;
        text-transform: uppercase;
        padding: 5px !important;
    }
    td {
        padding: 8px !important;
    }
    .main-block.container {
        padding: 0;
    }
    .video-carousel, .still-carousel {
        /*width: 650px;
        height: 555px;*/
        width: 100%;
        height: 100%;
        margin: 0 auto;
    }
    .div-iframe {
        /*width: 640px;
        height: 550px !important;*/
        width: 100%;
        height: 85vh !important;
    }
    h3.text-center {
        display: block;
        width: 100%;
        color: #222;
        margin: 10px 0;
    }
    .cert, .lab {
        animation: blink 0.8s infinite;
        font-weight: bold;
        cursor: pointer;
    }
    .div-flex {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
        @keyframes blink {
            0% {
                color: #000;
            }
            49% {
                color: #f18888;
            }
            50% {
                color: #f18888;
            }
            100% {
                color: #000;
            }
        }
    @media only screen and (max-width: 768px) {
        .table {
            display: flex;
            justify-content: space-between;
            align-content: center;
            flex-direction: row;
            text-align: left;
            font-size: 14px;
        }
        .table th {
            text-align: left;
            font-weight: 600;       
            color: #444; 
            padding: 8px !important;  
        }
        .table th, .table td {
            border-top: 0 !important;
            border-bottom: 1px solid #ddd !important;  
        }
        thead , tbody {
            width: 100%;
        }
        .table tr {
            display: flex;
            flex-direction: column;
            align-items: stretch;
        }
    }
    @media (max-width: 640px) {
        .video-carousel, .still-carousel {
            width: 100%;
            height: 555px;
            margin: 0 auto;
        }
        .div-iframe {
            width: 100%;
            height: 550px !important;
        }
        .div-iframe iframe {
            border: none;
            width: 100%;
            height: 100%;
            object-fit: contain;
            margin: auto;
        }
    }
</style>
<?php error_reporting(0); 
$row = $record[0]; ?> 
<?php if(empty($record)){ ?>
<div id="Notavailable"><div id="loading-image"><img src="<?php echo base_url(); ?>assets/images/dna/BelgiumNY_Soldout.png" class="LoderImage" /></div></div>
<?php } ?>
<div class="main-block container-fluid">
    <div class="row">            
        <div class="col-md-12 no-pad">
            <div class="col-md-12 img-div">    
                <div class="col-md-12">
                    <div class="video-carousel">  
                        <?php if($data_video_2){ ?>
                            <div class="div-iframe">
                                <iframe src="<?php echo $data_video_2; ?>"></iframe> 
                            </div>
                        <?php } ?>
                    </div>                 
                </div>         
            </div>         
        </div>
    </div>
    <div class="row">
        <div class="col-md-12 detail-div">
            <div class="col-md-12 div-flex">
                <h3 class="text-center">Report No: <?= ($row->REPORT_NO) ? $row->REPORT_NO : ''; ?></h3>
                <table class="table table-bordered table-condensed">
                    <thead>
                        <tr>
                            <th>Lab</th>
                            <th>Shape</th>
                            <th>Carat</th>
                            <th>Clarity</th>
                            <th>Color</th>
                            <th>Cut</th>
                            <th>Pol</th>
                            <th>Symm</th>
                            <th>Fluor</th>
                            <th>Depth%</th>
                            <th>Table%</th>
                            <th>LWD</th>
                            <th>DNA</th>
                            <th>Certificate</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td><?= ($row->LAB_SEQ) ? $row->LAB_SEQ : ''; ?></td>
                            <td><?= ($row->SHAPE_SEQ) ? $row->SHAPE_SEQ : ''; ?></td>
                            <td><?= ($row->CTS) ? $row->CTS : ''; ?></td>
                            <td><?= ($row->PURITY_SEQ) ? $row->PURITY_SEQ : ''; ?></td>
                            <td><?= ($row->COLOR_SEQ) ? $row->COLOR_SEQ : ''; ?></td>
                            <td><?= ($row->CUT_SEQ) ? $row->CUT_SEQ : ''; ?></td>
                            <td><?= ($row->POLISH_SEQ) ? $row->POLISH_SEQ : ''; ?></td>
                            <td><?= ($row->SYMM_SEQ) ? $row->SYMM_SEQ : ''; ?></td>
                            <td><?= ($row->FLS_SEQ) ? $row->FLS_SEQ : ''; ?></td>
                            <td><?= ($row->DEPTH_PER) ? $row->DEPTH_PER : ''; ?></td>
                            <td><?= ($row->TABLE_PER) ? $row->TABLE_PER : ''; ?></td>
                            <td><?= ($row->LWD) ? $row->LWD : ''; ?></td>
                            <td><span class="lab" title="DNA" onclick="dnaOpen('<?= $row->PACKET_NO ?>')">DNA</span></td>
                            <td><span class="cert" title="Certificate" onclick="showCert()">Cert</span></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="row m-top-15" id="cert_div" style="display: none;">
        <div class="col-md-12 detail-div">           
            <div class="col-lg-12 col-md-12 col-sm-12 cert-div-content no-pad">
                <?php if($data_cert){ ?>
                    <iframe src="<?php echo $data_cert; ?>"></iframe>
                <?php } ?>
            </div>
        </div>
    </div>
</div>
<script>
    const showCert = () => {
        const certDiv = document.getElementById('cert_div');
        certDiv.style.display = 'block';
        certDiv.scrollIntoView({behavior: "smooth"});
    }
    const dnaOpen = (PACKET_NO) => {
        window.open(`https://dna.dnalink.in/d/${PACKET_NO}`,'_blank,noreferrer');
    }
</script>
</body>
</html>