/* Team 7 Digital Business Card & QR System Styling
   Faithful to https://qrco.de/bh06W9 with modern enhancements */

body.qr-body {
  background-color: #f2efe8;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #333333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================
   1. Welcome / Preloader Screen
   ========================================= */
.qr-preloader {
  position: fixed;
  inset: 0;
  background-color: #ffffff;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.qr-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.qr-preloader-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: #e2ede8;
  overflow: hidden;
}

.qr-preloader-bar-inner {
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background-color: #0e3c2f;
  animation: indeterminateLoading 1.4s infinite cubic-bezier(0.65, 0.815, 0.735, 0.395);
}

@keyframes indeterminateLoading {
  0% {
    left: -50%;
    width: 50%;
  }

  50% {
    left: 25%;
    width: 60%;
  }

  100% {
    left: 100%;
    width: 40%;
  }
}

.qr-preloader-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  animation: logoPulse 1.6s infinite ease-in-out;
}

@keyframes logoPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

/* =========================================
   2. Digital Business Card Container
   ========================================= */
.qr-page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 0 0 60px;
}

.qr-card-container {
  width: 100%;
  max-width: 600px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  .qr-card-container {
    margin: 30px auto;
    border-radius: 20px;
  }
}

/* =========================================
   3. Card Header
   ========================================= */
.qr-card-header {
  background: #0e3c2f;
  color: #ffffff;
  padding: 36px 20px 24px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-avatar-badge {
  width: 86px;
  height: 86px;
  background: #ffffff;
  border-radius: 24px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.qr-avatar-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
}

.qr-profile-name {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.qr-profile-job {
  font-size: 13px;
  font-weight: 700;
  color: #a8d5c8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 20px;
}

/* Quick Action Header Buttons (Call & Email) */
.qr-header-actions {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 280px;
  justify-content: center;
}

.qr-header-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.qr-header-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
  color: #ffffff;
}

.qr-header-btn svg {
  width: 20px;
  height: 20px;
  margin-bottom: 4px;
  stroke: #ffffff;
}

.qr-header-btn span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* =========================================
   4. Card Body Rows
   ========================================= */
.qr-card-body {
  padding: 24px 20px;
  background: #ffffff;
  flex-grow: 1;
}

.qr-summary-row {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 18px;
  padding: 0 10px;
}

.qr-separator {
  height: 1px;
  background-color: #edf2f0;
  margin: 14px 0;
}

.qr-info-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 8px 4px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
  border-radius: 8px;
}

.qr-info-row:hover {
  background-color: #f7faf8;
}

.qr-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef5f2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qr-info-icon svg {
  width: 18px;
  height: 18px;
  stroke: #0e3c2f;
}

.qr-info-content {
  flex-grow: 1;
}

.qr-info-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 2px;
}

.qr-info-content h4 a {
  color: #111827;
}

.qr-info-content h4 a:hover {
  color: #e3262a;
}

.qr-info-content small {
  font-size: 12px;
  color: #6b7280;
  display: block;
}

.btn-show-map {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #0e3c2f;
  background: #eef5f2;
  padding: 6px 14px;
  border-radius: 20px;
  margin-top: 8px;
  text-decoration: none;
}

.btn-show-map:hover {
  background: #0e3c2f;
  color: #ffffff;
}

/* Social Media Channels */
.qr-social-section {
  padding: 10px 4px 0;
}

.qr-social-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: block;
}

.qr-social-icons {
  display: flex;
  gap: 12px;
}

.qr-social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0a66c2;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.qr-social-btn.website-btn {
  background: #0e3c2f;
}

.qr-social-btn:hover {
  transform: translateY(-3px);
  color: #ffffff;
}

.qr-social-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* =========================================
   5. Action Buttons (Download vCard & Share)
   ========================================= */
.qr-bottom-actions {
  padding: 24px 20px 20px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid #edf2f0;
}

.btn-vcard-download {
  width: 100%;
  background: #f2efe8;
  color: #0e3c2f;
  border: 1px solid #dcd7ca;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 15px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.btn-vcard-download:hover {
  background: #0e3c2f;
  color: #ffffff;
  border-color: #0e3c2f;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 60, 47, 0.2);
}

.btn-vcard-download svg {
  width: 18px;
  height: 18px;
}

.btn-vcard-share {
  width: 100%;
  background: #ffffff;
  color: #4b5563;
  border: 1px solid #d1d5db;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.btn-vcard-share:hover {
  border-color: #0e3c2f;
  color: #0e3c2f;
  background: #f9fafb;
}

.btn-vcard-share svg {
  width: 18px;
  height: 18px;
}

/* Secondary QR modal trigger */
.btn-qr-show-code {
  width: 100%;
  background: transparent;
  color: #0e3c2f;
  border: 1px dashed #0e3c2f;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.btn-qr-show-code:hover {
  background: rgba(14, 60, 47, 0.05);
}

.qr-footer-link {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #0e3c2f;
  margin-top: 14px;
  display: block;
}

.qr-footer-link:hover {
  color: #e3262a;
}

/* =========================================
   6. Modals (Share, Save Contact & QR View)
   ========================================= */
.qr-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.qr-modal-backdrop.is-open {
  display: flex;
}

.qr-modal-box {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
  from {
    transform: scale(0.92);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.qr-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  color: #6b7280;
}

.qr-modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.qr-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #0e3c2f;
  margin: 0 0 6px;
}

.qr-modal-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px;
}

.qr-share-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0 0 20px;
}

.qr-share-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  transition: all 0.15s ease;
}

.qr-share-item a:hover {
  background: #eef5f2;
  border-color: #0e3c2f;
  color: #0e3c2f;
}

.qr-share-item svg {
  width: 20px;
  height: 20px;
}

.qr-copy-box {
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 6px;
  margin-top: 12px;
}

.qr-copy-input {
  border: none;
  background: transparent;
  padding: 6px 10px;
  font-size: 13px;
  color: #374151;
  flex-grow: 1;
  outline: none;
}

.qr-copy-btn {
  background: #0e3c2f;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.qr-copy-btn:hover {
  background: #165643;
}

.qr-copy-toast {
  display: none;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #0e3c2f;
  background: #d1fae5;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
}

/* =========================================
   7. QR Directory Page (/qr)
   ========================================= */
.qr-dir-hero {
  background: #0e3c2f;
  color: #ffffff;
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
}

.qr-dir-hero .qr-dir-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.qr-dir-title {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 12px;
}

.qr-dir-desc {
  font-size: 16px;
  color: #b5d8cc;
  max-width: 560px;
  margin: 0 auto 30px;
}

.qr-dir-search-wrap {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.qr-dir-search-input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  border-radius: 30px;
  border: none;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  outline: none;
}

.qr-dir-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: #6b7280;
}

.qr-dir-section {
  padding: 50px 0 80px;
  background: #f8f7f4;
}

.qr-dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.qr-dir-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.qr-dir-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
  border-color: #0e3c2f;
}

.qr-dir-card-header {
  background: #0e3c2f;
  padding: 24px;
  text-align: center;
  color: #ffffff;
}

.qr-dir-avatar {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: #ffffff;
  padding: 4px;
  margin: 0 auto 12px;
}

.qr-dir-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}

.qr-dir-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-grow: 1;
}

.qr-code-canvas-container {
  width: 140px;
  height: 140px;
  background: #ffffff;
  padding: 8px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code-canvas-container img,
.qr-code-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.qr-dir-btn-group {
  display: flex;
  gap: 8px;
  width: 100%;
}

.qr-dir-btn-group a,
.qr-dir-btn-group button {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
}