/* CareCall — Main Styles
 * Design: 9:16 mobile-first, mint green + sky blue
 */

:root {
  /* Brand Colors */
  --primary: #7DD3C0;           /* Mint green */
  --primary-dark: #5CBAA8;
  --secondary: #87CEEB;         /* Sky blue */
  --secondary-dark: #6BB8D9;
  
  /* Neutrals */
  --bg: #FFFFFF;
  --bg-soft: #F8FAFA;
  --text: #2D3748;
  --text-light: #718096;
  --text-muted: #A0AEC0;
  
  /* UI */
  --white: #FFFFFF;
  --shadow: 0 4px 20px rgba(125, 211, 192, 0.15);
  --shadow-lg: 0 8px 40px rgba(125, 211, 192, 0.2);
  --radius: 16px;
  --radius-lg: 24px;
  
  /* 9:16 Container */
  --container-width: min(100vw, 450px);
  --container-height: 100vh;
  --container-height: 100dvh; /* Safari: accounts for address bar (overrides 100vh where supported) */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ============ 9:16 APP CONTAINER ============ */

.app-container {
  width: var(--container-width);
  height: var(--container-height);
  max-height: 100dvh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Desktop: Add subtle phone frame */
@media (min-width: 500px) {
  body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 50%, #d1d5db 100%);
  }
  
  .app-container {
    height: min(100vh - 40px, 800px);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.15);
    margin: 20px;
  }
}

/* ============ SCREENS (LAYERS) ============ */

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  padding: 2rem;
}

.screen.active {
  opacity: 1;
  visibility: visible;
}

/* ============ INVITE CODE SCREEN ============ */

.screen-invite {
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--white) 100%);
  justify-content: center;
  padding: 2rem;
}

.invite-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.invite-logo {
  width: 120px;
  height: 120px;
  border-radius: 20%;
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-lg);
}

.invite-title {
  font-size: 2rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.invite-tagline {
  color: var(--text-light);
  font-size: 1.1rem;
  font-style: italic;
}

.invite-form {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.invite-form label {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.invite-form input {
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  text-align: center;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  text-transform: lowercase;
  letter-spacing: 1px;
}

.invite-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(125, 211, 192, 0.2);
}

.invite-form input::placeholder {
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}

.invite-form input.shake {
  animation: shakeInput 0.5s ease;
}

@keyframes shakeInput {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.invite-footer {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* ============ SPLASH SCREEN ============ */

.screen-splash {
  background: var(--white);
  cursor: pointer;
  justify-content: center;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: splashFadeIn 1s ease forwards;
}

.splash-logo {
  width: 140px;
  height: auto;
  margin-bottom: 1.5rem;
  animation: splashLogoIn 1s ease forwards;
}

.splash-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.splash-tagline {
  font-size: 1.15rem;
  color: var(--text-light);
  font-style: italic;
}

.splash-tap {
  position: absolute;
  bottom: 3rem;
  color: var(--text-muted);
  font-size: 1rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.2s forwards;
}

@keyframes splashFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splashLogoIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============ VIDEO-GUIDED ONBOARDING ============ */

.screen-onboarding {
  background: #F8FAFA;
  padding: 0;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  overscroll-behavior: none;
}

/* Video Container - wraps video + watermark + dots */
.video-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.onboarding-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.8s ease, opacity 0.8s ease;
  display: block;
  background: url('/assets/full-intro-onboarding-2.png') center/cover no-repeat;
}

.onboarding-video.blurred {
  filter: blur(15px) brightness(0.6);
}

/* Disable CSS transition during JS-driven outro fade */
.onboarding-video.fading-out {
  transition: none !important;
}

/* Disable CSS transition on onboarding screen during crossfade to dashboard */
.screen-onboarding.crossfading {
  transition: none !important;
}

/* Loading overlay — spinner floats on top of video's first frame */
.onboarding-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 5;
  border-radius: inherit;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.onboarding-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.onboarding-loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(125, 211, 192, 0.2);
  border-top-color: #7DD3C0;
  border-right-color: rgba(125, 211, 192, 0.6);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Desktop: slightly larger video */
@media (min-width: 500px) {
  .video-container {
    width: calc(100% - 24px);
    max-height: calc(100% - 24px);
    border-radius: 20px;
  }
}

/* Watermark Logo - positioned inside video container */
.video-watermark {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: auto;
  opacity: 0.75;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.video-blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.video-blur-overlay.active {
  opacity: 1;
}


/* Onboarding Content Overlay */
.onboarding-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 2rem;
}

.onboarding-step {
  width: 100%;
  max-width: 320px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
}

.onboarding-step.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Step 1: Tap to continue prompt */
.step-tap-prompt {
  text-align: center;
  cursor: pointer;
  padding: 2rem;
}

.step-tap-prompt p {
  color: var(--white);
  font-size: 1.1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

/* Step Input Cards */
.step-input-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-input-card label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.step-input-card input {
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text);
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.step-input-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(125, 211, 192, 0.2);
  background: var(--white);
}

.step-input-card input.shake {
  animation: shakeInput 0.5s ease;
  border-color: #E53E3E;
}

.step-input-card .phone-input-group {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.step-input-card .country-code {
  width: 110px;
  min-width: 110px;
  padding: 1rem 0.75rem;
  font-size: 1rem;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius);
  background: var(--bg-soft);
  flex-shrink: 0;
}

.step-input-card .phone-number {
  flex: 1;
  min-width: 0;
  text-align: left;
}

/* Frequency Options in Onboarding */
.step-input-card .frequency-options {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.step-input-card .freq-btn {
  flex: 1;
  padding: 1rem 0.5rem;
  border: 2px solid #E2E8F0;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.step-input-card .freq-btn.active {
  border-color: var(--primary);
  background: rgba(125, 211, 192, 0.15);
  color: var(--primary-dark);
}

.step-input-card .freq-btn:hover:not(.active) {
  border-color: var(--secondary);
}

.freq-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: -0.5rem;
}

/* Step Next Button */
.btn-step-next {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s, box-shadow 0.2s;
  margin-top: 0.5rem;
}

.btn-step-next:hover {
  box-shadow: var(--shadow-lg);
}

.btn-step-next:active {
  transform: scale(0.98);
}

/* Confirmation Card */
.confirmation-card {
  text-align: center;
  padding: 2.5rem 2rem;
}

.confirm-logo {
  width: 80px;
  height: auto;
  margin-bottom: 1rem;
}

.confirmation-card h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.confirm-text {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.confirm-text strong {
  color: var(--primary-dark);
}

.btn-complete {
  width: 100%;
  padding: 1.1rem 2rem;
  font-size: 1.15rem;
}

/* Progress Dots - positioned inside video container */
.onboarding-progress {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 20;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.progress-dot.active {
  background: var(--white);
  transform: scale(1.2);
}

.progress-dot.completed {
  background: var(--primary);
}

/* ============ NEW TIMESTAMP-BASED INPUT OVERLAYS ============ */

.onboarding-input {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
  padding-left: 2rem;
  padding-right: 2rem;
  z-index: 15;
}

.onboarding-input.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.input-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 340px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: inputCardIn 0.4s ease;
  /* Prevent any scroll behavior */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

@keyframes inputCardIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.input-card label {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.4;
}

.input-card input[type="text"],
.input-card input[type="tel"] {
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text);
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(125, 211, 192, 0.2);
  background: var(--white);
}

.input-card input::placeholder {
  color: var(--text-muted);
}

.input-card input.shake {
  animation: shakeInput 0.5s ease;
  border-color: #E53E3E;
}

.input-card .phone-input-group {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.input-card .country-code {
  width: 110px;
  min-width: 110px;
  padding: 1rem 0.75rem;
  font-size: 1rem;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius);
  background: var(--bg-soft);
  flex-shrink: 0;
}

.input-card .phone-number {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.input-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: -0.25rem;
}

.btn-input-continue {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s, box-shadow 0.2s;
  margin-top: 0.5rem;
}

.btn-input-continue:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-input-continue:active {
  transform: scale(0.98);
}

/* Video fade transition */
.onboarding-video {
  transition: filter 0.8s ease, opacity 1s ease;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group select {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(125, 211, 192, 0.2);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

/* Phone input with country code */
.phone-input-group {
  display: flex;
  gap: 0.5rem;
}

.country-code {
  width: 90px;
  flex-shrink: 0;
}

.phone-number {
  flex: 1;
}

/* Frequency selector */
.frequency-options {
  display: flex;
  gap: 0.5rem;
}

.freq-btn {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid #E2E8F0;
  background: var(--white);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.freq-btn.active {
  border-color: var(--primary);
  background: rgba(125, 211, 192, 0.1);
  color: var(--primary-dark);
}

.freq-btn:hover:not(.active) {
  border-color: var(--secondary);
}

/* Submit button */
.btn-primary {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s, box-shadow 0.2s;
  margin-top: 0.5rem;
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============ DASHBOARD SCREEN ============ */

.screen-dashboard {
  background: var(--bg-soft);
  justify-content: flex-start;
  padding: 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.dashboard-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.dashboard-logo {
  width: 40px;
  height: auto;
}

.user-greeting {
  font-size: 1rem;
  color: var(--text-light);
}

.user-greeting strong {
  color: var(--text);
}

.logout-btn {
  background: #E53E3E;
  border: none;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.logout-btn:hover {
  background: #C53030;
  transform: scale(1.02);
}

.logout-btn i {
  font-size: 0.75rem;
}

/* Companion Card */
.companion-card {
  width: 100%;
  background: linear-gradient(135deg, rgba(125, 211, 192, 0.1) 0%, rgba(135, 206, 235, 0.1) 100%);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(125, 211, 192, 0.2);
}

.companion-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.companion-avatar i {
  color: var(--white);
  font-size: 1.1rem;
}

.companion-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.companion-label {
  font-size: 0.8rem;
  color: var(--text-light);
}

.companion-info strong {
  font-size: 1.1rem;
  color: var(--text);
}

/* Next Call Info - right side of companion card */
.next-call-info {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
}

.next-call-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}

.next-call-time {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: right;
  white-space: nowrap;
}

.next-call-time.paused {
  color: #E53E3E;
  font-size: 0.8rem;
  font-weight: 600;
}

.next-call-time.callback {
  color: #6366F1;
}

/* Call Card */
.call-card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.call-card h2 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.call-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Pill Buttons */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-pill i {
  font-size: 1rem;
}

.btn-pill:hover {
  transform: translateY(-2px);
}

.btn-pill:active {
  transform: translateY(0);
}

.btn-pill-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(125, 211, 192, 0.4);
}

.btn-pill-primary:hover {
  box-shadow: 0 6px 25px rgba(125, 211, 192, 0.5);
}

.btn-pill-secondary {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-pill-secondary:hover {
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

/* Minutes Balance */
.minutes-balance {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: var(--shadow);
}

.minutes-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.minutes-label {
  color: var(--text-light);
  font-size: 0.9rem;
}

.minutes-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.free-badge {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.minutes-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.minutes-value.low {
  color: #E53E3E;
}

.upgrade-btn {
  width: 100%;
  padding: 0.6rem;
  border: 2px dashed rgba(125, 211, 192, 0.4);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(125, 211, 192, 0.06) 0%, rgba(135, 206, 235, 0.06) 100%);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.upgrade-btn:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(125, 211, 192, 0.12) 0%, rgba(135, 206, 235, 0.12) 100%);
  transform: scale(1.01);
}

.upgrade-btn i {
  color: #D69E2E;
}

/* ============ CALL HISTORY ============ */

.call-history-section {
  margin-top: 1rem;
}

.call-history-list {
  max-height: 200px;
  overflow-y: auto;
}

.call-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  color: var(--text-muted);
}

.call-history-empty i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.call-history-empty p {
  font-size: 0.9rem;
}

.call-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E2E8F0;
}

.call-history-item:last-child {
  border-bottom: none;
}

.call-history-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.call-history-date {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.call-history-time {
  font-size: 0.8rem;
  color: var(--text-light);
}

.call-history-duration {
  font-size: 0.85rem;
  color: var(--primary-dark);
  font-weight: 500;
}

.call-history-missed {
  color: #E53E3E;
}

/* ============ SETTINGS SECTION ============ */

.settings-section {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
  margin-top: 1rem;
}

.settings-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 1rem 0.75rem;
  border-bottom: 1px solid #E2E8F0;
  margin-bottom: 0.25rem;
}

/* My Details - Edit Fields */
.btn-edit {
  background: none;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  color: var(--text-light);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.4rem 0.55rem;
  transition: all 0.2s;
}

.btn-edit:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: rgba(125, 211, 192, 0.06);
}

.edit-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1rem 0.75rem;
}

.edit-row.hidden {
  display: none;
}

.edit-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.88rem;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  transition: border-color 0.2s;
}

.edit-input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-save {
  padding: 0.5rem 0.85rem;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-save:hover {
  background: var(--primary-dark);
}

.btn-cancel-edit {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #E2E8F0;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.btn-cancel-edit:hover {
  background: #CBD5E0;
  color: var(--text);
}

.detail-setting .setting-desc {
  font-family: monospace;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
}

/* Call Time Settings */
.call-time-setting {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.call-time-setting .setting-info {
  flex: 1;
}

.time-input {
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s;
  min-width: 100px;
  text-align: center;
}

.time-input:focus {
  outline: none;
  border-color: var(--primary);
}

.time-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: opacity(0.6);
}

.time-input:hover::-webkit-calendar-picker-indicator {
  filter: opacity(1);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
}

.setting-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.setting-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.setting-desc {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #E2E8F0;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Toggle inside time slot row - smaller */
.toggle-slot {
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.toggle-slot .toggle-slider:before {
  height: 18px;
  width: 18px;
}

.toggle-slot input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Disabled slot visual state */
.call-time-setting.slot-disabled .setting-info {
  opacity: 0.4;
}

.call-time-setting.slot-disabled .time-input {
  opacity: 0.3;
  pointer-events: none;
}

/* Pause / Stop Calling Button */
.btn-pause {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 20px;
  background: #E53E3E;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-pause:hover {
  background: #C53030;
  transform: scale(1.02);
}

.btn-pause.paused {
  background: var(--primary);
}

.btn-pause.paused:hover {
  background: var(--primary-dark);
}

/* Pause banner (shows when paused) */
.pause-banner {
  width: 100%;
  background: linear-gradient(135deg, #FEB2B2 0%, #FED7D7 100%);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-align: center;
  margin-bottom: 1rem;
  display: none;
}

.pause-banner.active {
  display: block;
}

.pause-banner-text {
  font-size: 0.9rem;
  color: #742A2A;
  font-weight: 500;
}

.pause-banner-sub {
  font-size: 0.75rem;
  color: #9B2C2C;
  margin-top: 0.25rem;
}

/* Pause Modal */
.pause-modal-content {
  max-width: 340px;
  text-align: center;
}

.pause-modal-icon {
  font-size: 2.5rem;
  color: #E53E3E;
  margin-bottom: 0.75rem;
}

.pause-info {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.pause-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pause-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.pause-option:hover {
  border-color: #E53E3E;
  background: #FFF5F5;
  color: #E53E3E;
}

.pause-option i {
  color: var(--text-light);
  transition: color 0.2s;
}

.pause-option:hover i {
  color: #E53E3E;
}

/* ============ STATUS MESSAGES ============ */

.status-message {
  width: 100%;
  max-width: 320px;
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.95rem;
  margin-top: 1rem;
  display: none;
}

.status-message.show {
  display: block;
}

.status-message.success {
  background: rgba(125, 211, 192, 0.15);
  color: #276749;
}

.status-message.error {
  background: #FED7D7;
  color: #C53030;
}

.status-message.loading {
  background: rgba(135, 206, 235, 0.15);
  color: #2B6CB0;
}

/* ============ LOADING SPINNER ============ */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
  margin-right: 0.5rem;
}

/* Spinner alone inside a button (no text next to it) */
.btn-input-continue .spinner {
  margin-right: 0;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ FAMILY DASHBOARD EXTRAS ============ */

.family-section {
  width: 100%;
  margin-top: 1rem;
}

.family-section h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.elderly-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
}

.elderly-info h4 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.elderly-info p {
  font-size: 0.85rem;
  color: var(--text-light);
}

.view-insights-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-soft);
  border: none;
  border-radius: var(--radius);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.view-insights-btn:hover {
  background: rgba(125, 211, 192, 0.15);
}

/* ============ DIRECT CALL (WEBRTC AI) ============ */

.direct-call-card {
  background: var(--white);
  border: 1px dashed var(--primary);
}

.btn-pill:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Active Call UI */
.direct-call-active {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(99, 102, 241, 0.05);
  border-radius: var(--radius);
}

.call-status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pulse-ring {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #10B981;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

.call-status-indicator span {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

/* Transcript Box */
.transcript-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 1rem;
  border: 1px solid #E2E8F0;
}

.transcript-content {
  font-size: 0.9rem;
  line-height: 1.6;
}

.transcript-content .user-text {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.transcript-content .ai-text {
  color: #6366F1;
  margin-bottom: 0.5rem;
}

.transcript-content .user-text::before {
  content: "You: ";
  font-weight: 600;
}

.transcript-content .ai-text::before {
  content: "AI: ";
  font-weight: 600;
}

/* End Call Button */
.btn-end-call {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: #EF4444;
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-end-call:hover {
  background: #DC2626;
}

/* Listening indicator animation */
.listening .pulse-ring {
  background: #F59E0B;
  animation: pulseFast 0.8s ease-in-out infinite;
}

@keyframes pulseFast {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
}

/* ============ EMERGENCY CALL SECTION ============ */

.emergency-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.5rem 0;
}

.btn-emergency {
  width: 100%;
  max-width: 280px;
  padding: 1.25rem 2rem;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 25px rgba(220, 38, 38, 0.4);
  animation: emergencyPulse 2s ease-in-out infinite;
}

.btn-emergency:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 35px rgba(220, 38, 38, 0.5);
}

.btn-emergency:active {
  transform: scale(0.98);
}

.btn-emergency:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  animation: none;
}

.btn-emergency i {
  font-size: 1.3rem;
}

/* Emergency Countdown Ring */
.countdown-ring {
  width: 28px;
  height: 28px;
  transform: rotate(-90deg);
  margin-left: 0.5rem;
}

.countdown-ring .countdown-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 3;
}

.countdown-ring .countdown-progress {
  fill: none;
  stroke: white;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100.5; /* 2 * PI * 16 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.1s linear;
}

.btn-emergency.confirm-mode {
  background: linear-gradient(135deg, #991B1B 0%, #7F1D1D 100%);
  animation: none;
}

@keyframes emergencyPulse {
  0%, 100% {
    box-shadow: 0 6px 25px rgba(220, 38, 38, 0.4);
  }
  50% {
    box-shadow: 0 6px 35px rgba(220, 38, 38, 0.6);
  }
}

.emergency-disclaimer {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}

.emergency-disclaimer:hover {
  color: var(--primary-dark);
}

.emergency-disclaimer i {
  color: var(--primary);
}

/* ============ MODAL STYLES ============ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 360px;
  width: 100%;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--text);
}

/* Emergency Modal Specific */
.emergency-modal-content {
  text-align: center;
}

.emergency-modal-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.emergency-modal-icon i {
  font-size: 1.5rem;
  color: #DC2626;
}

.emergency-modal-content h2 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.emergency-info {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.emergency-info strong {
  color: #DC2626;
}

.emergency-extra {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid #E2E8F0;
}

.btn-emergency-confirm {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.1s;
}

.btn-emergency-confirm:hover {
  transform: scale(1.02);
}

.btn-emergency-confirm:active {
  transform: scale(0.98);
}

/* ============ DANGER ZONE ============ */

.danger-zone {
  margin-top: 1.5rem;
  border: 1px solid #FEE2E2;
  background: linear-gradient(135deg, #FFF5F5 0%, #FEF2F2 100%);
}

.danger-title {
  color: #DC2626 !important;
}

.danger-item {
  border-top: 1px solid #FECACA;
}

.btn-danger {
  padding: 0.5rem 1rem;
  background: transparent;
  color: #DC2626;
  border: 1px solid #DC2626;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: #DC2626;
  color: white;
}

/* Reset Modal */
.reset-modal-content {
  text-align: center;
}

.reset-modal-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.reset-modal-icon i {
  font-size: 1.5rem;
  color: #DC2626;
}

.reset-modal-content h2 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.reset-warning {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.reset-list {
  text-align: left;
  padding-left: 1.5rem;
  margin: 0.75rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.reset-list li {
  margin-bottom: 0.25rem;
}

.reset-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn-secondary {
  flex: 1;
  padding: 0.875rem;
  background: var(--white);
  color: var(--text);
  border: 1px solid #E2E8F0;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #F1F5F9;
}

.btn-danger-confirm {
  flex: 1;
  padding: 0.875rem;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s;
}

.btn-danger-confirm:hover {
  transform: scale(1.02);
}

.btn-danger-confirm:active {
  transform: scale(0.98);
}

/* ============ UTILITY CLASSES ============ */

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ============ APP STORE LANDING SCREEN ============ */

.screen-store {
  background: var(--bg);
  padding: 0;
  justify-content: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

.store-scroll {
  width: 100%;
  padding: 1.25rem 1.5rem 3rem;
}

/* ---- App Header ---- */
.store-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.store-icon {
  width: 76px;
  height: 76px;
  border-radius: 17px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.store-app-info {
  flex: 1;
  min-width: 0;
}

.store-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.store-developer {
  font-size: 0.82rem;
  color: #007AFF;
  margin-bottom: 0.2rem;
  font-weight: 500;
}

.store-rating-inline {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.store-stars-sm {
  color: #FF9500;
  font-size: 0.72rem;
  letter-spacing: -1px;
}

.store-rating-text {
  color: var(--text-muted);
}

/* OPEN Button */
.store-open-btn {
  background: #007AFF;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s, opacity 0.2s;
  letter-spacing: 0.3px;
  min-width: 75px;
  text-align: center;
  margin-left: 0.35rem;
}

.store-open-btn:hover {
  opacity: 0.85;
}

.store-open-btn:active {
  transform: scale(0.94);
}

/* ---- Quick Info Tabs ---- */
.store-tabs {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.75rem 0;
  margin-bottom: 0.75rem;
  border-top: 1px solid #E5E5EA;
  border-bottom: 1px solid #E5E5EA;
}

.store-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
}

.store-tab-divider {
  width: 1px;
  height: 28px;
  background: #E5E5EA;
  flex-shrink: 0;
}

.store-tab-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-light);
}

.store-tab-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* ---- Preview Screenshots ---- */
.store-previews {
  display: flex;
  gap: 0.625rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-top: 0.25rem;
  padding-bottom: 1rem;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  scrollbar-width: none;
}

/* First card wrapper — left padding baked into the element */
.store-preview-first {
  flex: 0 0 auto;
  padding-left: 1.5rem;
  scroll-snap-align: start;
}

.store-previews::-webkit-scrollbar {
  display: none;
}

.store-preview-card {
  min-width: 170px;
  height: 300px;
  border-radius: 14px;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
}

/* ---- Video Preview Card ---- */
.store-preview-video {
  background: linear-gradient(160deg, var(--primary), var(--primary-dark));
}

.store-preview-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.preview-video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 10;
  letter-spacing: 0.3px;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

/* Mute/Unmute toggle on video preview */
.store-mute-toggle {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border: none;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.store-mute-toggle:active {
  transform: scale(0.94);
}

.store-mute-toggle i {
  font-size: 0.8rem;
}

.store-mute-toggle span {
  white-space: nowrap;
}

/* When unmuted — compact icon-only pill */
.store-mute-toggle.unmuted {
  padding: 0.35rem 0.55rem;
  background: rgba(0, 0, 0, 0.4);
}

.preview-vid-logo {
  width: 24px;
  height: auto;
  filter: brightness(10);
}

/* ---- Pattern Background Cards ---- */
.store-preview-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/icons/icon.png');
  background-size: 30px 30px;
  background-repeat: repeat;
  opacity: 0.12;
  z-index: 0;
  pointer-events: none;
}

.preview-content {
  text-align: center;
  color: white;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.preview-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.preview-icon-wrap i {
  font-size: 1.5rem;
  color: white;
}

.preview-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  line-height: 1.2;
}

.preview-content p {
  font-size: 0.82rem;
  opacity: 0.92;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ---- Sections ---- */
.store-section {
  padding: 1rem 0;
  border-top: 1px solid #E5E5EA;
}

.store-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
}

.store-section-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.store-version-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Description */
.store-description p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 0.6rem;
}

.store-description strong {
  color: var(--text);
}

/* Orange highlight for key selling points */
.store-highlight-orange {
  color: #E8820C;
  font-weight: 600;
}

/* Changelog */
.store-changelog {
  font-size: 0.86rem;
  color: var(--text-light);
  line-height: 1.8;
}

/* ---- Ratings & Reviews ---- */
.store-rating-overview {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.store-rating-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.rating-number {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.rating-outof {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.1rem;
}

.rating-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Rating Bars */
.store-rating-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  justify-content: center;
}

.rating-bar-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bar-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  min-width: 10px;
  text-align: right;
  font-weight: 600;
}

.bar-track {
  flex: 1;
  height: 5px;
  background: #E5E5EA;
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #FF9500;
  border-radius: 3px;
}

/* Reviews */
.store-reviews {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.store-review {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 0.875rem 1rem;
}

.review-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.review-title {
  font-size: 0.88rem;
  color: var(--text);
}

.review-stars {
  color: #FF9500;
  font-size: 0.72rem;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.review-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.review-body {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-top: 0.4rem;
}

/* ---- Information Grid ---- */
.store-info-grid {
  display: flex;
  flex-direction: column;
}

.store-info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid #F0F0F5;
}

.store-info-row:last-child {
  border-bottom: none;
}

.store-info-label {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.store-info-value {
  font-size: 0.84rem;
  color: var(--text);
  font-weight: 500;
}

/* ---- Footer ---- */
.store-footer {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.store-footer p {
  margin-bottom: 0.15rem;
}

.store-footer-email {
  color: #007AFF;
}

/* ============ PRICING PAGE ============ */

.screen-pricing {
  background: var(--bg-soft);
  padding: 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
}

/* Header */
.pricing-header {
  text-align: center;
  margin-bottom: 1.25rem;
  position: relative;
}

.pricing-back {
  position: absolute;
  left: 0;
  top: 0.15rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.pricing-back:hover {
  color: var(--primary-dark);
}

.pricing-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.pricing-subtitle {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* Billing Toggle */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.billing-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.billing-label.active {
  color: var(--text);
  font-weight: 600;
}

.billing-switch {
  width: 48px;
  height: 26px;
}

.billing-switch .toggle-slider:before {
  height: 20px;
  width: 20px;
}

.billing-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.billing-save-badge {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  letter-spacing: 0.3px;
}

/* Tier Cards Container */
.pricing-tiers {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Tier Card */
.tier-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  position: relative;
  transition: all 0.2s;
}

.tier-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Featured Tier (Best Value) */
.tier-featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(125, 211, 192, 0.04) 0%, var(--white) 30%);
  box-shadow: 0 4px 25px rgba(125, 211, 192, 0.25);
}

.tier-featured:hover {
  box-shadow: 0 8px 40px rgba(125, 211, 192, 0.35);
}

/* Best Value Badge */
.tier-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(125, 211, 192, 0.4);
}

/* Tier Header */
.tier-header {
  text-align: center;
  margin-bottom: 0.75rem;
}

.tier-featured .tier-header {
  margin-top: 0.5rem;
}

.tier-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.tier-tagline {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.3;
}

/* Tier Price */
.tier-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.15rem;
  margin-bottom: 0.25rem;
}

.tier-amount {
  display: flex;
  align-items: baseline;
}

.tier-currency {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.tier-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.tier-period {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Annual billing detail */
.tier-annual-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.tier-billed {
  font-size: 0.78rem;
  color: var(--text-light);
}

.tier-savings {
  font-size: 0.75rem;
  font-weight: 700;
  color: #059669;
  background: #ECFDF5;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

/* Minutes Display */
.tier-minutes {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 1rem;
  padding: 0.6rem;
  background: linear-gradient(135deg, rgba(125, 211, 192, 0.08) 0%, rgba(135, 206, 235, 0.08) 100%);
  border-radius: 10px;
}

.tier-minutes-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.tier-minutes-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Tier Button */
.tier-btn {
  width: 100%;
  padding: 0.85rem;
  border: 2px solid var(--primary);
  border-radius: 12px;
  background: var(--white);
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.tier-btn:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.01);
}

/* Featured tier button — filled */
.tier-btn-featured {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(125, 211, 192, 0.4);
}

.tier-btn-featured:hover {
  box-shadow: 0 6px 25px rgba(125, 211, 192, 0.5);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
}

/* Feature List */
.tier-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tier-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.35;
}

.tier-features li i {
  color: var(--primary);
  font-size: 0.7rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* Pricing T&Cs */
.pricing-terms {
  margin-top: 1.5rem;
  padding: 0 1rem;
}

.terms-box {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 1.2rem 1.3rem;
}

.terms-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.terms-subheading {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.7rem;
  margin-bottom: 0.25rem;
}

.terms-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.3rem;
}

.terms-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.terms-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.terms-links {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terms-links a {
  color: var(--primary);
  text-decoration: underline;
}

/* Pricing Footer */
.pricing-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-bottom: 2rem;
}

.pricing-free-note {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.pricing-free-note i {
  color: #D69E2E;
  margin-right: 0.3rem;
}

.pricing-cancel-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============ LANGUAGE SELECTOR ============ */

.language-select {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1rem;
  transition: border-color 0.2s;
}

.language-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(125, 211, 192, 0.15);
}

.detail-setting .setting-label i {
  margin-right: 0.3rem;
  color: var(--primary);
}

/* Language selector — stacked layout within detail-setting */
.detail-setting:has(.language-select) {
  flex-wrap: wrap;
}

.detail-setting:has(.language-select) .setting-info {
  width: 100%;
  margin-bottom: 0.4rem;
}

.detail-setting .language-select {
  margin-top: 0;
}
