/* ==========================================================================
   Merchant Voice & Experience Survey Page Stylesheet
   Brand-aligned with LendingUSA 2026 Design System
   Fully Responsive & High-Performance across all screens (Mobile, Tablet, Desktop)
   ========================================================================== */

:root {
  --lusa-navy-dark: #002248;
  --lusa-navy-subtle: #0f294a;
  --lusa-blue-primary: #0072d6;
  --lusa-blue-hover: #005bb5;
  --lusa-blue-light: #ecf5ff;
  --lusa-blue-lighter: #f4f8fe;
  --lusa-blue-border: #dce9f8;
  --lusa-card-border: #e2ecf8;
  --lusa-text-main: #1b263b;
  --lusa-text-muted: #51637b;
  --lusa-text-light: #6e829f;
  --lusa-shadow-sm: 0 4px 12px rgba(0, 34, 72, 0.04);
  --lusa-shadow-md: 0 10px 30px rgba(0, 34, 72, 0.06);
  --lusa-shadow-lg: 0 20px 50px rgba(0, 34, 72, 0.08), 0 2px 6px rgba(0, 34, 72, 0.04);
  --lusa-radius-lg: 20px;
  --lusa-radius-md: 14px;
  --lusa-radius-sm: 8px;
  --lusa-radius-pill: 50px;
}

/* ==========================================================================
   Modern Sleek Scrollbar Styling (Cross-Browser)
   ========================================================================== */
html,
body,
:root,
body.page-template-merchant-survey,
body.page-template-merchant-onboarding-survey,
.merchant-survey-page,
.merchant-survey-card,
.merchant-survey-iframe-wrapper {
  scrollbar-width: thin !important;
  scrollbar-color: #0072d6 #f1f6fd !important;
}

/* WebKit (Chrome, Edge, Safari, Opera) */
::-webkit-scrollbar,
body.page-template-merchant-survey::-webkit-scrollbar,
body.page-template-merchant-onboarding-survey::-webkit-scrollbar,
.merchant-survey-page::-webkit-scrollbar,
.merchant-survey-card::-webkit-scrollbar,
.merchant-survey-iframe-wrapper::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

::-webkit-scrollbar-track,
body.page-template-merchant-survey::-webkit-scrollbar-track,
body.page-template-merchant-onboarding-survey::-webkit-scrollbar-track,
.merchant-survey-page::-webkit-scrollbar-track,
.merchant-survey-card::-webkit-scrollbar-track,
.merchant-survey-iframe-wrapper::-webkit-scrollbar-track {
  background: #f1f6fd !important;
  border-radius: 8px !important;
}

::-webkit-scrollbar-thumb,
body.page-template-merchant-survey::-webkit-scrollbar-thumb,
body.page-template-merchant-onboarding-survey::-webkit-scrollbar-thumb,
.merchant-survey-page::-webkit-scrollbar-thumb,
.merchant-survey-card::-webkit-scrollbar-thumb,
.merchant-survey-iframe-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0072d6 0%, #00a6f4 100%) !important;
  border-radius: 8px !important;
  border: 2px solid #f1f6fd !important;
  transition: background 0.25s ease;
}

::-webkit-scrollbar-thumb:hover,
body.page-template-merchant-survey::-webkit-scrollbar-thumb:hover,
body.page-template-merchant-onboarding-survey::-webkit-scrollbar-thumb:hover,
.merchant-survey-page::-webkit-scrollbar-thumb:hover,
.merchant-survey-card::-webkit-scrollbar-thumb:hover,
.merchant-survey-iframe-wrapper::-webkit-scrollbar-thumb:hover {
  background: #005bb5 !important;
}

/* Ensure iframe and card NEVER display an original grey scrollbar */
#merchantSurveyIframe,
.merchant-survey-iframe {
  overflow: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#merchantSurveyIframe::-webkit-scrollbar,
.merchant-survey-iframe::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.merchant-survey-iframe-wrapper {
  overflow: hidden !important;
}

/* ==========================================================================
   Base Page Wrapper
   ========================================================================== */
.merchant-survey-page {
  background: linear-gradient(180deg, #ecf5ff 0%, #f4f8fe 320px, #ffffff 680px, #ffffff 100%);
  color: var(--lusa-text-main);
  min-height: 100vh;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Ambient Glow */
.merchant-survey-bg-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1440px;
  height: 520px;
  background: radial-gradient(circle at 50% 10%, rgba(0, 114, 214, 0.08) 0%, rgba(236, 245, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Main Section */
.merchant-survey-section {
  position: relative;
  z-index: 1;
  padding: 48px 0 80px;
}

/* Container Limit (Desktop Base - Wide Layout) */
.merchant-survey-container {
  width: 96%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

/* ==========================================================================
   Header Content Card & Copy
   ========================================================================== */
.merchant-survey-header-card {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 36px;
}

/* Eyebrow Badge */
.merchant-survey-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 114, 214, 0.08);
  border: 1px solid rgba(0, 114, 214, 0.2);
  color: var(--lusa-blue-primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: var(--lusa-radius-pill);
  margin-bottom: 20px;
  box-shadow: var(--lusa-shadow-sm);
  transition: all 0.25s ease;
}

.merchant-survey-eyebrow svg {
  display: inline-block;
  flex-shrink: 0;
}

/* Main Heading (Fluid Responsive Typography) */
.merchant-survey-title {
  color: var(--lusa-navy-dark);
  font-size: clamp(1.6rem, 4.2vw, 2.65rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
}

.merchant-survey-title .highlight-blue {
  color: var(--lusa-blue-primary);
  background: linear-gradient(135deg, #0072d6 0%, #00a6f4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

/* Sub-text Row with Clock */
.merchant-survey-subtext-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--lusa-blue-border);
  padding: 8px 20px;
  border-radius: var(--lusa-radius-pill);
  box-shadow: 0 4px 14px rgba(0, 34, 72, 0.04);
  margin-bottom: 22px;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
}

.merchant-survey-subtext-wrap:hover {
  border-color: #b0d4fa;
  box-shadow: 0 6px 18px rgba(0, 114, 214, 0.08);
  transform: translateY(-1px);
}

.merchant-survey-time-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 114, 214, 0.12);
  color: var(--lusa-blue-primary);
  flex-shrink: 0;
}

.merchant-survey-subtext {
  color: var(--lusa-navy-dark);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

/* Main Paragraph */
.merchant-survey-paragraph {
  color: var(--lusa-text-muted);
  font-size: 1.06rem;
  line-height: 1.7;
  max-width: 740px;
  margin: 0 auto 24px;
}

/* Trust & Value Micro-Pill Indicators */
.merchant-survey-pillars {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
  margin-bottom: 12px;
}

.merchant-survey-pillar-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2d3748;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 6px 16px;
  border-radius: var(--lusa-radius-pill);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.25s ease;
}

.merchant-survey-pillar-item:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.merchant-survey-pillar-item svg {
  color: #10b981; /* Fresh success green check */
  flex-shrink: 0;
}

/* ==========================================================================
   Survey Card & iFrame Container (Premium Framing & Edge-Clipping)
   ========================================================================== */
.merchant-survey-card {
  background: #ffffff;
  border: 1px solid var(--lusa-card-border);
  border-radius: var(--lusa-radius-lg);
  box-shadow: var(--lusa-shadow-lg);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Top Accent Stripe on Card */
.merchant-survey-card-header {
  height: 5px;
  background: linear-gradient(90deg, #0072d6 0%, #00a6f4 50%, #0072d6 100%);
  width: 100%;
}

/* iFrame Wrapper & Relative Container */
.merchant-survey-iframe-wrapper {
  position: relative;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 480px;
  background: #ffffff;
  overflow: hidden;
  pointer-events: auto !important;
  touch-action: auto !important;
  transition: min-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* The Survey iFrame */
.merchant-survey-iframe {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  min-height: 480px;
  height: 480px;
  border: 0 !important;
  outline: none;
  display: block;
  background: #ffffff;
  position: relative;
  z-index: 2;
  pointer-events: auto !important;
  touch-action: auto !important;
  opacity: 0;
  transition: opacity 0.35s ease, height 0.3s cubic-bezier(0.4, 0, 0.2, 1), min-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.merchant-survey-iframe.is-ready {
  opacity: 1;
}

.merchant-survey-iframe::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ==========================================================================
   Branded Thank You State (Shown when iFrame is hidden upon completion)
   ========================================================================== */
.merchant-survey-thankyou {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px;
  background: #ffffff;
  animation: surveyFadeIn 0.35s ease-out forwards;
}

@keyframes surveyFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.merchant-survey-thankyou-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid rgba(16, 185, 129, 0.25);
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.merchant-survey-thankyou-title {
  color: var(--lusa-navy-dark);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.3px;
  margin: 0 0 12px;
}

/* Remove default theme red line/pseudo-elements on all mobile/tablet screens */
.merchant-survey-thankyou-title:before,
.merchant-survey-thankyou-title::before,
.merchant-survey-thankyou-title:after,
.merchant-survey-thankyou-title::after,
.merchant-survey-thankyou h2:before,
.merchant-survey-thankyou h2::before,
.merchant-survey-thankyou h2:after,
.merchant-survey-thankyou h2::after,
.merchant-survey-card h2:before,
.merchant-survey-card h2::before,
.merchant-survey-card h2:after,
.merchant-survey-card h2::after,
.merchant-survey-page h2:before,
.merchant-survey-page h2::before,
.merchant-survey-page h2:after,
.merchant-survey-page h2::after {
  content: none !important;
  display: none !important;
  background: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.merchant-survey-thankyou-desc {
  color: var(--lusa-text-muted);
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 580px;
  margin: 0 auto;
}

.merchant-survey-card.is-completed {
  min-height: auto !important;
}

.merchant-survey-card.is-completed .merchant-survey-iframe-wrapper {
  min-height: auto !important;
  height: auto !important;
}

/* Support Help Card Beneath Survey */
.merchant-survey-help-card {
  max-width: 800px;
  margin: 36px auto 0;
  background: #f8fbff;
  border: 1px dashed #bdd7f5;
  border-radius: var(--lusa-radius-md);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.merchant-survey-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 114, 214, 0.1);
  color: var(--lusa-blue-primary);
  flex-shrink: 0;
}

.merchant-survey-help-text {
  font-size: 0.92rem;
  color: var(--lusa-text-muted);
  line-height: 1.55;
  margin: 0;
}

.merchant-survey-help-text strong {
  color: var(--lusa-navy-dark);
}

.merchant-survey-help-text a {
  color: var(--lusa-blue-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.merchant-survey-help-text a:hover {
  color: var(--lusa-blue-hover);
  text-decoration: underline;
}

/* Reset Footer Overlap spacing for survey templates */
body.page-template-merchant-survey #wrapper-footer,
body.page-template-merchant-onboarding-survey #wrapper-footer,
.parent-page-template-merchant-survey ~ #wrapper-footer,
.merchant-survey-page ~ #wrapper-footer,
#wrapper-footer {
  padding-top: 60px !important;
}

/* ==========================================================================
   Responsive Breakpoints (Desktop, Tablet, Mobile Excellence)
   Tailored for 1024px, 1200px, 1366px, 1440px, 1920px Full HD, 2K/4K, Tablets & Mobile
   ========================================================================== */

/* Ultra-Wide, 2K & 4K Monitors (1921px and above) */
@media screen and (min-width: 1921px) {
  .merchant-survey-container {
    width: 96%;
    max-width: 1750px;
  }
  .merchant-survey-header-card {
    max-width: 960px;
  }
}

/* 1920px Full HD Displays (1441px to 1920px) */
@media screen and (min-width: 1441px) and (max-width: 1920px) {
  .merchant-survey-container {
    width: 96%;
    max-width: 1600px;
  }
  .merchant-survey-header-card {
    max-width: 920px;
  }
}

/* 1440px Laptops & Displays (1367px to 1440px) */
@media screen and (min-width: 1367px) and (max-width: 1440px) {
  .merchant-survey-container {
    width: 96%;
    max-width: 1380px;
  }
}

/* 1366px Laptops (1200px to 1366px) */
@media screen and (min-width: 1200px) and (max-width: 1366px) {
  .merchant-survey-container {
    width: 97%;
    max-width: 1320px;
  }
}

/* 1200px Displays (1025px to 1199px) */
@media screen and (min-width: 1025px) and (max-width: 1199px) {
  .merchant-survey-container {
    width: 97%;
    max-width: 1160px;
  }
}

/* 1024px Displays / iPad Pro Landscape (992px to 1024px) */
@media screen and (min-width: 992px) and (max-width: 1024px) {
  .merchant-survey-container {
    width: 98%;
    max-width: 1004px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Tablets (768px to 991px - iPad, Android Tablets, Surface) */
@media screen and (max-width: 991px) {
  .merchant-survey-section {
    padding: 60px 0 64px;
  }

  .merchant-survey-container {
    width: 100%;
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  .merchant-survey-card {
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 34, 72, 0.07);
  }

  .merchant-survey-iframe-wrapper,
  .merchant-survey-iframe {
    width: 100% !important;
    min-width: 100% !important;
    min-height: 480px;
  }

  .merchant-survey-header-card {
    margin-bottom: 30px;
  }

  .merchant-survey-paragraph {
    font-size: 1.02rem;
  }

  .merchant-survey-pillars {
    gap: 10px 16px;
  }
}

/* Mobile Screens (481px to 767px - Large Phones, Phablets, Landscape) */
@media screen and (max-width: 767px) {
  .merchant-survey-section {
    padding: 50px 0 50px;
    padding-top: clamp(42px, calc(36.27px + 1.79vw), 50px);
  }

  .merchant-survey-container {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .merchant-survey-card {
    border-radius: 14px;
    border: 1px solid var(--lusa-card-border);
    box-shadow: 0 4px 20px rgba(0, 34, 72, 0.07);
    margin: 0;
  }

  .merchant-survey-iframe-wrapper,
  .merchant-survey-iframe {
    width: 100% !important;
    min-width: 100% !important;
    min-height: 480px;
  }

  .merchant-survey-header-card {
    margin-bottom: 24px;
  }

  .merchant-survey-eyebrow {
    font-size: 0.76rem;
    padding: 6px 14px;
    letter-spacing: 1.1px;
    margin-bottom: 16px;
  }

  .merchant-survey-title {
    font-size: clamp(1.45rem, 5vw, 1.85rem);
    line-height: 1.25;
    margin-bottom: 14px;
  }

  .merchant-survey-subtext-wrap {
    padding: 8px 16px;
    gap: 8px;
    margin-bottom: 16px;
    width: auto;
    max-width: 100%;
    display: inline-flex;
    border-radius: 14px;
  }

  .merchant-survey-time-icon {
    width: 22px;
    height: 22px;
  }

  .merchant-survey-time-icon svg {
    width: 14px;
    height: 14px;
  }

  .merchant-survey-subtext {
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .merchant-survey-paragraph {
    font-size: 0.94rem;
    line-height: 1.62;
    margin-bottom: 16px;
    text-align: center;
  }

  .merchant-survey-pillars {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 16px;
    padding: 0 4px;
  }

  .merchant-survey-pillar-item {
    font-size: 0.84rem;
    padding: 5px 14px;
  }

  .merchant-survey-help-card {
    flex-direction: column;
    padding: 18px 16px;
    gap: 12px;
    margin-top: 26px;
  }

  .merchant-survey-help-text {
    font-size: 0.88rem;
  }
}

/* Extra Small Devices (320px to 480px - iPhone SE, Compact Mobile) */
@media screen and (max-width: 480px) {
  .merchant-survey-section {
    padding: 50px 0 44px;
  }

  .merchant-survey-container {
    width: 100%;
    max-width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }

  .merchant-survey-card {
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 34, 72, 0.06);
  }

  .merchant-survey-iframe-wrapper,
  .merchant-survey-iframe {
    width: 100% !important;
    min-width: 100% !important;
    min-height: 460px;
  }

  .merchant-survey-eyebrow {
    font-size: 0.72rem;
    padding: 6px 14px;
    letter-spacing: 0.9px;
    margin-bottom: 14px;
  }

  .merchant-survey-title {
    font-size: 1.42rem;
    line-height: 1.25;
    margin-bottom: 12px;
  }

  .merchant-survey-subtext-wrap {
    padding: 7px 14px;
    margin-bottom: 14px;
  }

  .merchant-survey-subtext {
    font-size: 0.86rem;
  }

  .merchant-survey-paragraph {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 14px;
  }

  .merchant-survey-pillars {
    gap: 8px;
    margin-bottom: 14px;
  }

  .merchant-survey-pillar-item {
    font-size: 0.82rem;
    padding: 5px 12px;
  }

  .merchant-survey-help-card {
    padding: 16px 14px;
  }

  .merchant-survey-help-text {
    font-size: 0.84rem;
    line-height: 1.5;
  }
}
