<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?php echo $heading_title; ?></title>
  </head>
  <body>
    <style>
    html {
      background: url(<?php echo $imagebackground; ?>) <?php echo $repeatbackground; ?> ;
      font-family: "Lato", sans-serif;
      height: 100%;
      <?php if ($norepeat == Type_BackgroundRepeat::Tp_NoRepeat) {?>
      -webkit-background-size: cover;
      -moz-background-size: cover;
      -o-background-size: cover;
      background-size: cover;
      <?php } ?>
    }

    #content {
      font-size: 36px;
      position: absolute;
      width: 90%;
      max-width: 600px;
      max-height: 100%;
      top: 50%;
      left: 50%;
      -webkit-transform: translate(-50%,-50%);
      -moz-transform: translate(-50%,-50%);
      -ms-transform: translate(-50%,-50%);
      transform: translate(-50%,-50%);
      -webkit-box-sizing: border-box;
      -moz-box-sizing: border-box;
      box-sizing: border-box;
    }
    .maintenance {
      padding: 15px 0;
    }
    .button-container {
      min-width: 190px;
      width: 60%;
      margin: .8em auto 0;
    }
    .button-container:after {
      content: "";
      display: block;
      clear: both;
    }

    .logo-idade-minima {
      display: block;
      margin: 0 auto .8em auto;
      max-width: 100%;
      max-height: 300px;
    }

    .frase-idade-minima{
      font-size: 1em;
      text-align: center;
      width: 100%;
      color: <?php echo $this->config->get('wg24_futura_of_age_text_color')?>;
    }

    .btn-idade-minima {
      border: none;
      background-color: <?php echo $this->config->get('wg24_top_cart_bgcol')?>;
      color: <?php echo $this->config->get('wg24_topcart_te_colo')?>;
      font-size: .7em;
      padding: .4em .85em;
      -webkit-box-sizing: border-box;
      -moz-box-sizing: border-box;
      box-sizing: border-box;
      cursor: pointer;
      border-radius: 8px;
    }

    .btn-idade-minima:hover {
      background-color:<?php echo $this->config->get('wg24_l_hcolor')?>;
      -webkit-transition: background 1000ms ease;
      -moz-transition: background 1000ms ease;
      -ms-transition: background 1000ms ease;
      -o-transition: background 1000ms ease;
      transition: background 1000ms ease;
    }

    </style>

    <section class="main-container col1-layout">
        <article class="col-main">
                <div id="content">
                  <div class="maintenance">
                    <div class="logo-idade-minima">
                      <img class="logo-idade-minima" src="<?php echo $logoofage; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>">
                    </div>
                    <div class="frase-idade-minima">
                      <span><?php echo $text_message_ofage; ?></span>
                    </div>
                    <div class="button-container">
                      <button type="button" onclick="linkYes();" style="float: left;" value="1" class="btn-idade-minima" title="<?php echo $text_yes; ?>">
                        <span><?php echo $text_yes; ?></span>
                      </button>
                      <button type="button" onclick="linkNo();" style="float: right;" value="0" class="btn-idade-minima" title="<?php echo $text_no; ?>">
                        <span><?php echo $text_no; ?></span>
                      </button>
                    </div>
                  </div>
                </div>
        </article>
    </section>

    <script type="text/javascript">
      function setCookie(name,value,days) {
        var expires = "";
        if (days) {
          var date = new Date();
          date.setTime(date.getTime() + (days*24*60*60*1000));
          expires = "; expires=" + date.toUTCString();
        }
        document.cookie = name + "=" + (value || "")  + expires + "; path=/";
      }

        function linkNo(){
          location = '<?php echo $link_no; ?>';
        }

        function linkYes(){
          setCookie('ofage', true, 1);
          location = '<?php echo $link_yes; ?>';
        }
    </script>
  </body>
</html>
