/**
 * Acqua Source Digital Cards - Frontend Card Styles
 * Scoped under .asdc- namespace
 */

:root {
  --asdc-page-bg: #ffffff;
  --asdc-navy-primary: #1b2856;
  --asdc-navy-button: #1d2856;
  --asdc-navy-button-hover: #151e42;
  --asdc-cyan-wave: #00a3e0;
  --asdc-card-bg: #ffffff;
  --asdc-card-border: #efefef;
  --asdc-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --asdc-arrow-dark: #222222;
  --asdc-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html.asdc-html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  background-color: var(--asdc-page-bg);
}

body.asdc-body {
  font-family: var(--asdc-font);
  background-color: var(--asdc-page-bg);
  color: var(--asdc-navy-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base resets scoped to asdc elements */
.asdc-html *,
.asdc-html *::before,
.asdc-html *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Stage & Viewport Wrapper */
.asdc-viewport-stage {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 50% 12%, #f8fafd 0%, #edf1f8 100%);
  padding: 52px 24px 84px;
  box-sizing: border-box;
}

.asdc-card-viewport {
  width: 100%;
  max-width: 520px;
  min-height: auto;
  background-color: var(--asdc-card-bg);
  border: 1px solid var(--asdc-card-border);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(27, 40, 86, 0.075), 0 4px 16px rgba(0, 0, 0, 0.035);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: max-width 0.38s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.38s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

/* Simulator Explicit Modes */
.asdc-card-viewport.mode-mobile {
  max-width: 430px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 16px 48px rgba(0, 0, 0, 0.08);
}
.asdc-card-viewport.mode-mobile .asdc-card-container {
  max-width: 430px;
  padding: 40px 24px 56px;
}
.asdc-card-viewport.mode-tablet {
  max-width: 500px;
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(27, 40, 86, 0.06), 0 2px 10px rgba(0, 0, 0, 0.03);
}
.asdc-card-viewport.mode-desktop {
  max-width: 520px;
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(27, 40, 86, 0.075), 0 4px 16px rgba(0, 0, 0, 0.035);
}

/* Main Inner Container */
.asdc-card-container {
  width: 100%;
  max-width: 490px;
  background-color: var(--asdc-card-bg);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 46px 38px 60px;
  margin: 0 auto;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              border-radius 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.asdc-desktop-footer {
  margin-top: 24px;
  text-align: center;
  font-family: var(--asdc-font);
  font-size: 11px;
  font-weight: 500;
  color: #7b8599;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  user-select: none;
}

/* Header Content Block (Indented to align with card values) */
.asdc-top-identity {
  padding-left: 24px;
  padding-right: 12px;
}

/* Animations */
@keyframes asdcSpringUp {
  0% {
    opacity: 0;
    transform: translate3d(0, 28px, 0) scale(0.985);
    filter: blur(4px);
  }
  65% {
    opacity: 1;
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0px);
  }
}

@keyframes asdcTextReveal {
  0% {
    opacity: 0;
    transform: translate3d(-12px, 14px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes asdcWaveFloat {
  0%, 100% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(1.5px) translateY(-1px);
  }
}

/* Brand Logo Header */
.asdc-brand-header {
  margin-bottom: 38px;
  display: inline-block;
  user-select: none;
  animation: asdcSpringUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.asdc-brand-header:hover {
  transform: translateY(-2px);
}

.asdc-brand-logo-img,
.asdc-brand-logo-svg {
  width: 194px;
  height: auto;
  display: block;
  overflow: visible;
}

.asdc-brand-logo-svg path {
  transition: transform 0.35s ease;
}

.asdc-brand-header:hover .asdc-brand-logo-svg path:nth-of-type(1) {
  animation: asdcWaveFloat 1.6s ease-in-out infinite;
}

.asdc-brand-header:hover .asdc-brand-logo-svg path:nth-of-type(2) {
  animation: asdcWaveFloat 1.6s ease-in-out 0.25s infinite;
}

.asdc-brand-logo-img,
.asdc-custom-logo-img {
  max-width: 194px;
  max-height: 48px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Profile Identity Row, Avatar & Name */
.asdc-profile-header {
  margin-bottom: 36px;
  animation: asdcSpringUp 0.78s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.asdc-profile-identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.asdc-profile-text-col {
  flex: 1;
  min-width: 0;
}

.asdc-profile-avatar-slot {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background-color: #f6f8fb;
  border: 2px solid var(--asdc-card-border);
  box-shadow: 0 6px 18px rgba(27, 40, 86, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.asdc-profile-avatar-slot:hover {
  transform: translateY(-2.5px) scale(1.02);
  box-shadow: 0 10px 24px rgba(27, 40, 86, 0.13);
}

.asdc-profile-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asdc-profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asdc-profile-name {
  font-size: 32px;
  line-height: 1.16;
  color: var(--asdc-navy-primary);
  letter-spacing: -0.015em;
  margin: 0 0 10px 0;
}

.asdc-profile-name .asdc-first-name {
  display: block;
  font-weight: 500;
  animation: asdcTextReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.asdc-profile-name .asdc-last-name {
  display: block;
  font-weight: 700;
  animation: asdcTextReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1) 0.03s;
}

.asdc-profile-header:hover .asdc-first-name,
.asdc-profile-header:hover .asdc-last-name {
  transform: translateX(3px);
}

.asdc-profile-role {
  font-size: 16.5px;
  font-weight: 400;
  color: var(--asdc-navy-primary);
  letter-spacing: -0.005em;
  margin: 0;
  animation: asdcTextReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}

.asdc-company-tagline {
  font-size: 17px;
  font-weight: 500;
  color: var(--asdc-navy-primary);
}

/* Optional Social Media Row */
.asdc-social-links-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  animation: asdcSpringUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.asdc-social-icon-link {
  color: var(--asdc-navy-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  text-decoration: none !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.asdc-social-icon-link:hover {
  transform: translateY(-3px) scale(1.12);
  color: var(--asdc-cyan-wave);
}

.asdc-social-icon-link:active {
  transform: translateY(0) scale(0.96);
}

/* Full-Width Dark Navy Save Contact Bar */
.asdc-save-contact-btn {
  width: 100%;
  background-color: var(--asdc-navy-button);
  color: #ffffff !important;
  border: none;
  border-radius: 13px;
  padding: 17px 22px 17px 24px;
  font-family: var(--asdc-font);
  font-size: 16.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: 0 4px 10px rgba(29, 40, 86, 0.22);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  animation: asdcSpringUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both;
}

.asdc-save-contact-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.asdc-save-contact-btn:hover {
  background-color: var(--asdc-navy-button-hover);
  transform: translateY(-2.5px);
  box-shadow: 0 10px 22px rgba(29, 40, 86, 0.3);
}

.asdc-save-contact-btn:hover::after {
  left: 140%;
}

.asdc-save-contact-btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 4px 10px rgba(29, 40, 86, 0.22);
}

.asdc-save-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.asdc-save-contact-btn:hover .asdc-save-contact-icon {
  transform: scale(1.14) translateX(-2px);
}

/* Explicit Fallback for Android Devices when Intent cannot be opened */
.asdc-contact-fallback {
  text-align: center;
  font-size: 13px;
  color: #666666;
  margin-top: -4px;
  margin-bottom: 16px;
  line-height: 1.5;
  animation: asdcFadeIn 0.35s ease both;
}

.asdc-contact-fallback-link {
  color: var(--asdc-cyan-wave);
  text-decoration: underline;
  font-weight: 500;
  display: inline-block;
  margin-left: 4px;
  cursor: pointer;
  transition: color 0.18s ease;
}

.asdc-contact-fallback-link:hover {
  color: var(--asdc-navy-primary);
}

/* Stacked White Contact Cards */
.asdc-contact-cards-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.asdc-contact-card {
  width: 100%;
  background-color: var(--asdc-card-bg);
  border: 1px solid var(--asdc-card-border);
  border-radius: 10px;
  box-shadow: var(--asdc-card-shadow);
  padding: 15px 18px 16px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  text-decoration: none !important;
  color: var(--asdc-navy-primary) !important;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease;
  position: relative;
  animation: asdcSpringUp 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
}

.asdc-contact-card:nth-child(1) { animation-delay: 0.32s; }
.asdc-contact-card:nth-child(2) { animation-delay: 0.40s; }
.asdc-contact-card:nth-child(3) { animation-delay: 0.48s; }
.asdc-contact-card:nth-child(4) { animation-delay: 0.56s; }
.asdc-contact-card:nth-child(5) { animation-delay: 0.64s; }
.asdc-contact-card:nth-child(6) { animation-delay: 0.72s; }

.asdc-contact-card:hover {
  background-color: var(--asdc-card-bg);
  border-color: var(--asdc-card-border);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
}

.asdc-contact-card:active {
  transform: translateY(-1px) scale(0.995);
  box-shadow: var(--asdc-card-shadow);
}

.asdc-contact-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  padding-right: 12px;
}

/* Small Icon + Uppercase Label Row */
.asdc-contact-label-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 4px;
}

.asdc-field-icon {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--asdc-navy-primary);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.asdc-contact-card:hover .asdc-field-icon {
  transform: scale(1.18) rotate(-5deg);
}

.asdc-contact-label {
  font-size: 9.5px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--asdc-navy-primary);
  line-height: 1;
}

/* Value Indented to Align Under the Label Text */
.asdc-contact-value-group {
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.asdc-contact-card:hover .asdc-contact-value-group {
  transform: translateX(2.5px);
}

.asdc-contact-value {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--asdc-navy-primary);
  line-height: 1.35;
  word-break: break-word;
}

/* Extension Wording & Number — Same Size (13.5px) & Bold (700) as Landline */
.asdc-contact-extension {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--asdc-navy-primary);
  line-height: 1.35;
  margin-top: 2px;
}

/* Top-Right Up-Right Arrow (↗) */
.asdc-card-arrow-icon {
  color: var(--asdc-arrow-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.asdc-contact-card:hover .asdc-card-arrow-icon {
  transform: translate(3px, -3px);
}

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS
   ========================================================================== */

/* Mobile Breakpoint (< 540px) */
@media (max-width: 540px) {
  .asdc-viewport-stage {
    padding: 0;
    align-items: flex-start;
    background: var(--asdc-page-bg);
    min-height: 100vh;
  }

  .asdc-card-viewport {
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: var(--asdc-page-bg);
  }

  .asdc-card-container {
    max-width: 100%;
    padding: 38px 20px 56px;
    padding-top: max(36px, env(safe-area-inset-top, 20px));
    padding-bottom: max(56px, env(safe-area-inset-bottom, 24px));
    padding-left: max(20px, env(safe-area-inset-left, 16px));
    padding-right: max(20px, env(safe-area-inset-right, 16px));
  }

  .asdc-top-identity {
    padding-left: 12px;
    padding-right: 8px;
  }

  .asdc-brand-header {
    margin-bottom: 28px;
  }

  .asdc-brand-logo-img,
  .asdc-brand-logo-svg {
    width: clamp(170px, 48vw, 194px);
    height: auto;
    max-height: 48px;
    object-fit: contain;
  }

  .asdc-profile-header {
    margin-bottom: 28px;
  }

  .asdc-profile-identity-row {
    gap: 14px;
  }

  .asdc-profile-name {
    font-size: clamp(26px, 7vw, 32px);
    line-height: 1.15;
    margin-bottom: 8px;
  }

  .asdc-profile-role {
    font-size: clamp(14.5px, 3.8vw, 16px);
  }

  .asdc-profile-avatar-slot {
    width: 72px;
    height: 72px;
  }

  .asdc-save-contact-btn {
    padding: 16px 20px 16px 22px;
    font-size: 16px;
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .asdc-save-contact-btn:active {
    transform: scale(0.985);
  }

  .asdc-contact-card {
    padding: 14px 16px 15px 20px;
    border-radius: 10px;
  }

  .asdc-contact-card:active {
    transform: scale(0.99);
    background-color: #fafbfc;
  }

  .asdc-contact-value-group {
    padding-left: 24px;
  }

  .asdc-contact-value {
    font-size: 13.5px;
  }

  .asdc-contact-extension {
    font-size: 13px;
  }

  .asdc-desktop-footer {
    display: none;
  }
}

/* Extra-Small Mobile Screens (< 360px) */
@media (max-width: 360px) {
  .asdc-card-container {
    padding: 30px 14px 48px;
  }

  .asdc-top-identity {
    padding-left: 8px;
    padding-right: 4px;
  }

  .asdc-profile-avatar-slot {
    width: 62px;
    height: 62px;
  }

  .asdc-contact-card {
    padding: 12px 14px 13px 16px;
  }

  .asdc-contact-value-group {
    padding-left: 18px;
  }

  .asdc-contact-value,
  .asdc-contact-extension {
    font-size: 12.5px;
  }
}

/* Tablet Breakpoint (541px - 1023px) */
@media (min-width: 541px) and (max-width: 1023px) {
  .asdc-viewport-stage {
    justify-content: center;
    padding: 36px 20px 72px;
    background: radial-gradient(circle at 50% 10%, #f7f9fd 0%, #ebf0f8 100%);
  }

  .asdc-card-viewport {
    max-width: 500px;
    border-radius: 20px;
    border: 1px solid var(--asdc-card-border);
    box-shadow: 0 18px 48px rgba(27, 40, 86, 0.06), 0 2px 10px rgba(0, 0, 0, 0.03);
  }

  .asdc-card-container {
    max-width: 500px;
    padding: 52px 42px 64px;
  }
}

/* Desktop Breakpoint (1024px+) */
@media (min-width: 1024px) {
  .asdc-viewport-stage {
    justify-content: center;
    padding: 52px 24px 84px;
    background: radial-gradient(circle at 50% 12%, #f8fafd 0%, #edf1f8 100%);
  }

  .asdc-card-viewport {
    max-width: 520px;
    border-radius: 24px;
    border: 1px solid var(--asdc-card-border);
    box-shadow: 0 24px 64px rgba(27, 40, 86, 0.075), 0 4px 16px rgba(0, 0, 0, 0.035);
  }

  .asdc-card-container {
    max-width: 520px;
    padding: 58px 48px 66px;
  }
}

/* Toast Feedback Notification */
.asdc-toast-notification {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--asdc-navy-primary);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 8px 24px rgba(27, 40, 86, 0.25);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.26s ease;
}

.asdc-toast-notification.asdc-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Accessibility: Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .asdc-html *,
  .asdc-html *::before,
  .asdc-html *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
