/*
Theme Name: Swadeen Woo Redirect
Theme URI: https://swadeen.pk
Author: Swadeen
Author URI: https://swadeen.pk
Description: A lightweight WooCommerce redirect/thank-you theme for Swadeen payments with a branded header and dashboard return button.
Version: 1.0.6
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: swadeen-woo-redirect
*/

:root {
  --sw-bg: #f8fafc;
  --sw-card: #ffffff;
  --sw-ink: #0f172a;
  --sw-muted: #64748b;
  --sw-blue: #2563eb;
  --sw-blue-dark: #1d4ed8;
  --sw-border: #e2e8f0;
  --sw-green: #059669;
  --sw-red: #dc2626;
  --sw-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.14), transparent 30rem),
    var(--sw-bg);
  color: var(--sw-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.swadeen-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.swadeen-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.swadeen-header-inner,
.swadeen-footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.swadeen-header-inner {
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.swadeen-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.swadeen-logo-img,
.swadeen-logo-link img,
.swadeen-logo-link .custom-logo {
  display: block;
  width: auto !important;
  height: auto !important;
  max-height: 86px !important;
  max-width: 430px !important;
  object-fit: contain;
}

.swadeen-logo-link .custom-logo-link {
  display: inline-flex;
  align-items: center;
  max-height: 86px;
  max-width: 430px;
}

.swadeen-header .custom-logo,
.swadeen-header .swadeen-logo-img {
  min-height: 58px;
}

.swadeen-logo-fallback {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
  font-size: 30px;
}

.swadeen-logo-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #0f172a);
  color: #fff;
  font-weight: 900;
}

.swadeen-header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--sw-border);
  border-radius: 999px;
  padding: 0 18px;
  background: #fff;
  color: #1e293b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.swadeen-header-action:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.14);
}

.swadeen-main {
  flex: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 62px 0 80px;
}

.swadeen-main > *,
.swadeen-main .swadeen-redirect-card {
  margin-left: auto;
  margin-right: auto;
}

body.woocommerce-order-received .swadeen-main,
body.page-template-swadeen-redirect .swadeen-main,
body.page-template-swadheen-redirect .swadeen-main {
  min-height: calc(100vh - 112px - 66px);
}

.swadeen-redirect-card {
  position: relative;
  overflow: hidden;
  width: min(860px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--sw-shadow);
}

.swadeen-redirect-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #10b981);
}

.swadeen-hero {
  padding: 48px 44px 34px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.14), transparent 18rem),
    radial-gradient(circle at 85% 20%, rgba(16, 185, 129, 0.14), transparent 20rem),
    #ffffff;
}

.swadeen-status-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(16,185,129,0.14), rgba(37,99,235,0.12));
  border: 1px solid rgba(16, 185, 129, 0.18);
  color: var(--sw-green);
  box-shadow: 0 16px 40px rgba(16,185,129,0.16);
}

.swadeen-kicker {
  margin: 0 0 12px;
  color: var(--sw-blue);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

.swadeen-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  color: #020617;
  font-weight: 950;
}

.swadeen-subtitle {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--sw-muted);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 650;
}

.swadeen-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 44px 44px;
}

.swadeen-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  padding: 0 26px;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.swadeen-button-primary {
  background: linear-gradient(135deg, var(--sw-blue), var(--sw-blue-dark));
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.26);
}
.swadeen-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 44px rgba(37, 99, 235, 0.32);
}

.swadeen-button-secondary {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid var(--sw-border);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}
.swadeen-button-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.10);
}

.swadeen-order-panel {
  margin: 0 44px 44px;
  border: 1px solid var(--sw-border);
  border-radius: 28px;
  background: #f8fafc;
  overflow: hidden;
}

.swadeen-order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.swadeen-order-item {
  min-height: 94px;
  padding: 22px 20px;
  border-right: 1px solid var(--sw-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.swadeen-order-item:last-child { border-right: 0; }

.swadeen-label {
  margin: 0 0 8px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.swadeen-value {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
  font-size: 15px;
  word-break: break-word;
}

.swadeen-note {
  margin: 0 44px 44px;
  border-radius: 24px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e40af;
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 750;
  text-align: center;
}

.swadeen-footer {
  border-top: 1px solid rgba(226, 232, 240, 0.88);
  background: rgba(255, 255, 255, 0.66);
}
.swadeen-footer-inner {
  padding: 22px 0;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.swadeen-hidden { display: none !important; }

@media (max-width: 720px) {
  .swadeen-header-inner { height: 92px; }
  .swadeen-header-action { display: none; }
  .swadeen-main { width: min(100%, calc(100% - 24px)); padding-top: 34px; }
  .swadeen-redirect-card { border-radius: 26px; }
  .swadeen-hero { padding: 38px 22px 28px; }
  .swadeen-actions { padding: 0 22px 32px; }
  .swadeen-button { width: 100%; }
  .swadeen-order-panel { margin: 0 22px 32px; }
  .swadeen-order-grid { grid-template-columns: 1fr; }
  .swadeen-order-item { border-right: 0; border-bottom: 1px solid var(--sw-border); }
  .swadeen-order-item:last-child { border-bottom: 0; }
  .swadeen-note { margin: 0 22px 32px; }
  .swadeen-footer-inner { flex-direction: column; text-align: center; }
}


@media (max-width: 640px) {
  .swadeen-header-inner { height: 84px; }
  .swadeen-logo-img,
  .swadeen-logo-link img,
  .swadeen-logo-link .custom-logo {
    max-height: 68px !important;
    max-width: 330px !important;
    min-height: 44px;
  }
  .swadeen-logo-link .custom-logo-link {
    max-height: 68px;
    max-width: 330px;
  }
}
