<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Thank You</title>
  <?= $this->include("admin/layout/partials/styles") ?>
  <style>
    .olx-header {
      background: #002f34;
      border-bottom: 1px solid rgba(255,255,255,.08);
    }
    .olx-brand {
      color: #fff !important;
      font-weight: 700;
      letter-spacing: .3px;
    }
    .olx-header .nav-link {
      color: rgba(255,255,255,.9) !important;
    }
    .header-wide { max-width: 100%; }
    .location-pill {
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 999px;
      padding: 6px 12px;
      height: 44px;
      position: relative;
      flex: 0 0 auto;
      width: auto;
    }
    .location-pill-input {
      border: 0;
      outline: none;
      width: 140px;
      background: transparent;
    }
    .search-pill {
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 999px;
      padding: 6px 12px;
      height: 44px;
      position: relative;
    }
    .search-pill-input {
      border: 0;
      outline: none;
      width: 100%;
      background: transparent;
    }
    .search-pill-btn {
      height: 44px;
      width: 44px;
      border-radius: 999px;
      border: 0;
      background: #0b74ff;
      color: #fff;
    }
    .search-dyn-placeholder {
      position: absolute;
      left: 12px;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: #6c757d;
      pointer-events: none;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      opacity: .7;
      transition: transform .25s ease, opacity .25s ease;
    }
    .ui-autocomplete {
      z-index: 2000;
      max-height: 280px;
      overflow-y: auto;
      overflow-x: hidden;
      border-radius: 10px;
      border: 1px solid #e9ecef;
      box-shadow: 0 10px 30px rgba(0,0,0,.12);
      background: #fff;
      list-style: none;
      margin: 0;
      padding: 6px 0;
    }
    .ui-autocomplete .ui-menu-item { list-style: none; }
    .ui-menu-item-wrapper {
      padding: 10px 12px;
      font-size: 14px;
    }
    .ui-state-active, .ui-widget-content .ui-state-active {
      background: rgba(0,47,52,.08);
      border: 0;
      color: #002f34;
      margin: 0;
    }
    .city-suggest-dropdown {
      position: absolute;
      top: 48px;
      left: 0;
      width: 100%;
      max-width: 90vw;
      background: #fff;
      border: 1px solid #e9ecef;
      border-radius: 10px;
      box-shadow: 0 10px 30px rgba(0,0,0,.12);
      z-index: 2001;
      overflow: hidden;
    }
    .city-suggest-item {
      display: flex;
      align-items: center;
      padding: 10px 12px;
      cursor: pointer;
    }
    .city-suggest-item:hover { background: rgba(0,47,52,.06); }
    .city-suggest-item .icon {
      width: 22px;
      height: 22px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-right: 10px;
      color: #0b74ff;
    }
    .city-suggest-item .text { color: #002f34; }
    .city-suggest-sub { font-size: 12px; color: #6c757d; }
    .city-suggest-header {
      padding: 8px 12px;
      font-size: 12px;
      color: #6c757d;
      border-top: 1px solid #e9ecef;
    }
    .wrap { max-width: 720px; margin: 0 auto; }
    .card {
      background: #fff;
      border: 1px solid #e9ecef;
      border-radius: 12px;
      box-shadow: 0 8px 22px rgba(0,0,0,.08);
      overflow: hidden;
    }
    .head {
      background: linear-gradient(135deg, #22c55e, #16a34a);
      color: #fff;
      padding: 18px 20px;
    }
    .title { font-weight: 700; margin: 0; font-size: 18px; }
    .body { padding: 20px; }
    .info { font-size: 15px; }
    .btn {
      display: inline-block;
      padding: 10px 16px;
      border-radius: 999px;
      text-decoration: none;
      font-weight: 700;
    }
    .btn-primary { background: #0b74ff; color: #fff; }
    .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .pill {
      background: #f8f9fa;
      border: 1px solid #e9ecef;
      border-radius: 10px;
      padding: 14px;
      font-size: 16px;
    }
    .label { color: #6c757d; font-size: 13px; }
    .value { font-weight: 700; margin-top: 4px; }
  </style>
</head>
<body class="hold-transition layout-top-nav">
<div class="wrapper">
  <?= $this->include('frontend/partials/top_navbar') ?>
  <div class="content-wrapper">
    <section class="content">
      <div class="container py-4">
        <div class="wrap">
          <div class="card">
            <div class="head">
              <h1 class="title">Thank You</h1>
            </div>
            <div class="body">
              <p class="info">Your payment has been completed successfully.</p>
              <div class="row">
                <div class="pill">
                  <div class="label">Order ID</div>
                  <div class="value"><?php echo esc($orderId ?: '-') ?></div>
                </div>
                <div class="pill">
                  <div class="label">Amount Paid</div>
                  <div class="value">₹<?php echo number_format((float) $amount, 2) ?></div>
                </div>
              </div>
              <div class="pill mt-3">
                <div class="label">Shop</div>
                <div class="value"><?php echo esc(($shop->name ?? '')) ?></div>
              </div>
              <div class="mt-3">
                <a class="btn btn-primary" href="<?php echo url('/') ?>">Back to Home</a>
                <?php if (!empty($shop) && !empty($shop->id)): ?>
                  <a class="btn btn-primary ml-2" href="<?php echo url('shop/' . (int) $shop->id) ?>">Back to Shop</a>
                <?php endif ?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
</div>
<?= $this->include("admin/layout/partials/scripts") ?>
</body>
</html>
