<!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"> 
    <script>var base_url = '<?php echo base_url(); ?>';</script>
</head>
<body>    
<style>
    body {
        font-family:'Open Sans',sans-serif;
        font-size: 13px;
        line-height: 1.42857143;
        color: #333;
        background-color: #fff;
        margin-top: 5px;
    }
    .table {
        text-align: center; 
        color: #222;   
        width: 90%;
        max-width: 1000px;
        background: #f8f8f8;
    }
    .table th {
        text-align: center;
        padding: 5px !important;
    }
    td {
        padding: 8px !important;
    }
    .main-block.container {
        padding: 10px;
    }
    .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;
        display: flex;
        justify-content: center;
            padding-top: 10px;
    }
    h3.text-center {
        display: block;
        width: 100%;
        color: #222;
        margin: 10px 0;
    }
    .cert, .lab {
        font-weight: bold;
        cursor: pointer;
        color: blue;
    }
    .div-flex {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .div-iframe iframe {
        border: none;
        width: 450px;
        height: 100%;
        /*object-fit: contain;*/
        margin: auto;
    }
    .div-iframe img {
        height: 90%;
        width: auto;
    }
    .cert-div-content iframe {
        width: 100%;
        height: 750px;
        border: 0px solid black;
        margin-top: 15px;
    }
        @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" style="border-right: 0px solid #ddd;">  
                        <?php if($data_video){ ?>
                            <div class="div-iframe">
                                <iframe src="<?php echo $data_video; ?>"></iframe> 
                            </div>
                        <?php } else if($data_mp4){ ?>
                        <div id="video360" class="dna-files dna-up" style="text-align: center;">
                            <video id="video" autoplay="" loop="" muted="" width="auto" >
                            <source src="<?php echo $data_mp4; ?>" type="video/mp4"></video>
                        </div>
                        <?php } else { ?>
                            <div class="col-md-4"></div>
                            <div class="col-md-4"><h1 class="text-center text-info">Video Coming Soon!</h1></div>
                        <?php } ?>
                    </div>                 
                </div>    
                <!-- <div class="col-md-6">
                    <div class="video-carousel">  
                        <?php if($data_still){ ?>
                            <div class="div-iframe">
                                <img src="<?php echo $data_still; ?>">
                            </div>
                        <?php } else { ?>
                            <div class="col-md-4"></div>
                            <div class="col-md-4"><h1 class="text-center text-info">Image Coming Soon!</h1></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">Stock#: <?= ($row->PACKET_NO) ??  ''; ?></h3>
                <table class="table table-bordered table-condensed">
                    <thead>
                        <tr>
                            <th>Lab</th>
                            <th>Report No.</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>Ratio</th>
                            <th>Measurement</th>
                            
                            <th>Dna</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td><?= ($row->LAB_SEQ) ? $row->LAB_SEQ : ''; ?></td>
                            <td><?= ($row->REPORT_NO) ? $row->REPORT_NO : ''; ?></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->Ratio; ?></td>
                            <td><?= ($row->LWD) ? $row->LWD : ''; ?></td>
                            
                            <td><span class="lab" title="Dna" onclick="dnaOpen('<?= $row->PACKET_NO ?>')">Link</span></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<script>
    const dnaOpen = (PACKET_NO) => {
        window.open(`https://dna.dnalinks.in/d/${PACKET_NO}`,'_blank,noreferrer');
    }
</script>
</body>
</html>