<?php
declare(strict_types=1);
$ph = preg_replace('/[^0-9+]/', '', setting('phone', '8085548615'));
if ($ph !== '' && $ph[0] !== '+') {
    $telHref = 'tel:+91' . $ph;
} else {
    $telHref = 'tel:' . $ph;
}
$mail = setting('email', 'info@bhattenterprise.in');
$addr = setting('address', 'Bilaspur, Chhattisgarh');
?>
  <div class="ot-offcanvas allow-natural-scroll">
    <div class="ot-offcanvas-header d-flex justify-content-between align-items-center mb-50">
      <div class="ot-offcanvas-logo">
        <a href="index.php"><img src="<?= asset('assets/img/logo/logo.png') ?>" alt="<?= h(setting('company_name', SITE_NAME)) ?>"></a>
      </div>
      <div class="ot-offcanvas-close">
        <button type="button" class="ot-offcanvas-close-toggle" aria-label="Close menu">
          <i class="fa-solid fa-xmark"></i>
        </button>
      </div>
    </div>
    <div class="ot-offcanvas-wrapper">
      <div class="ot-offcanvas-menu mb-50 d-xl-none">
        <nav></nav>
      </div>
      <div class="ot-offcanvas-dsc mb-40">
        <h3 class="ot-offcanvas-title mb-10"><?= h(setting('company_name', SITE_NAME)) ?></h3>
        <p><?= h(setting('company_tagline', SITE_TAGLINE)) ?></p>
      </div>
      <div class="ot-offcanvas-info mb-40 d-none d-xl-block">
        <h3 class="ot-offcanvas-title mb-20">Contact Information</h3>
        <div class="ot-offcanvas-info-content">
          <a href="<?= h($telHref) ?>">
            <div class="ot-offcanvas-info-item d-flex align-items-center">
              <div class="ot-offcanvas-info-icon mr-15"><span><i class="fa-solid fa-phone"></i></span></div>
              <div class="ot-offcanvas-info-text">
                <span>Call Us:</span>
                <span><?= h(setting('phone_display', setting('phone', '8085548615'))) ?></span>
              </div>
            </div>
          </a>
          <a href="mailto:<?= h($mail) ?>">
            <div class="ot-offcanvas-info-item d-flex align-items-center">
              <div class="ot-offcanvas-info-icon mr-15"><span><i class="fa-solid fa-envelope"></i></span></div>
              <div class="ot-offcanvas-info-text">
                <span>Mail Us:</span>
                <span><?= h($mail) ?></span>
              </div>
            </div>
          </a>
          <div class="ot-offcanvas-info-item d-flex align-items-center">
            <div class="ot-offcanvas-info-icon mr-15"><span><i class="fa-solid fa-location-dot"></i></span></div>
            <div class="ot-offcanvas-info-text ot-location">
              <span>Address:</span>
              <span><?= h($addr) ?></span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="body-overlay"></div>
  <div class="popup-search-box">
    <button type="button" class="searchClose" aria-label="Close search"><i class="fa-solid fa-xmark"></i></button>
    <form action="services.php" method="get">
      <input type="text" name="q" placeholder="Search services..." value="">
      <button type="submit"><i class="fa-solid fa-magnifying-glass"></i></button>
    </form>
  </div>
