/* KC PWA Launcher CSS */
:root {
  --kc-pwa-primary: #3b82f6; /* Vibrant Blue */
  --kc-pwa-primary-hover: #2563eb;
  --kc-pwa-bg: rgba(255, 255, 255, 0.85);
  --kc-pwa-text: #1f2937;
  --kc-pwa-text-muted: #6b7280;
  --kc-pwa-border: rgba(255, 255, 255, 0.5);
  --kc-pwa-shadow: 0 10px 40px -10px rgba(0,0,0,0.2), 0 0 20px rgba(59, 130, 246, 0.1);
  --kc-pwa-zindex: 999999;
}

@media (prefers-color-scheme: dark) {
  :root {
    --kc-pwa-bg: rgba(17, 24, 39, 0.85);
    --kc-pwa-text: #f9fafb;
    --kc-pwa-text-muted: #9ca3af;
    --kc-pwa-border: rgba(255, 255, 255, 0.1);
    --kc-pwa-shadow: 0 10px 40px -10px rgba(0,0,0,0.5), 0 0 20px rgba(59, 130, 246, 0.2);
  }
}

.kc-pwa-hidden {
  display: none !important;
}

/* Overlay for focus */
.kc-pwa-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: calc(var(--kc-pwa-zindex) - 1);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

#kc-pwa-prompt.is-visible .kc-pwa-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Main Dialog - Premium Glassmorphism Look */
.kc-pwa-dialog {
  position: fixed;
  top: -100%;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 420px;
  background: var(--kc-pwa-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--kc-pwa-border);
  border-radius: 0 0 24px 24px;
  padding: 24px 20px 32px;
  box-shadow: var(--kc-pwa-shadow);
  z-index: var(--kc-pwa-zindex);
  transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--kc-pwa-text);
}

@media (min-width: 768px) {
  .kc-pwa-dialog {
    top: 24px;
    bottom: auto;
    border-radius: 24px;
    opacity: 0;
    transform: translate(-50%, -20px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
  }
  
  #kc-pwa-prompt.is-visible .kc-pwa-dialog {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
  }
}

#kc-pwa-prompt.is-visible .kc-pwa-dialog {
  top: 0;
}

/* Close Button */
.kc-pwa-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  line-height: 1;
  color: var(--kc-pwa-text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s ease;
}

.kc-pwa-close:hover {
  background: rgba(128, 128, 128, 0.1);
  color: var(--kc-pwa-text);
  transform: rotate(90deg);
}

/* Header Section */
.kc-pwa-header {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.kc-pwa-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--kc-pwa-primary), #8b5cf6);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
  flex-shrink: 0;
}

.kc-pwa-title-container {
  flex-grow: 1;
}

.kc-pwa-title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  margin: 0 0 4px 0 !important;
  color: var(--kc-pwa-text) !important;
  letter-spacing: -0.02em;
  line-height: 1.2 !important;
}

.kc-pwa-subtitle {
  font-size: 0.875rem !important;
  color: var(--kc-pwa-text-muted) !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

/* Action Button */
.kc-pwa-actions {
  display: flex;
  gap: 12px;
}

.kc-pwa-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.01em;
}

.kc-pwa-btn-primary {
  background: linear-gradient(135deg, var(--kc-pwa-primary), #60a5fa);
  color: white;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.25);
  position: relative;
  overflow: hidden;
}

.kc-pwa-btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.kc-pwa-btn-primary:hover::after {
  left: 100%;
}

.kc-pwa-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.kc-pwa-btn-primary:active {
  transform: translateY(1px);
}
