/* Animated Demo - Coded mockup of Konexion in action */

.demo-animated {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  background: #f3f2ef;
  aspect-ratio: 16 / 10;
}

.demo-animated__linkedin-mockup {
  position: relative;
  width: 100%;
  height: 100%;
  background: #f3f2ef;
  padding: 20px;
  overflow: hidden;
}

/* LinkedIn header mockup */
.demo-linkedin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: 8px 16px;
  margin: -20px -20px 20px -20px;
  border-bottom: 1px solid #e0e0e0;
}

.demo-linkedin-logo {
  font-size: 24px;
  color: #0a66c2;
  font-weight: 700;
}

.demo-linkedin-nav {
  display: flex;
  gap: 24px;
  font-size: 0.8rem;
  color: #666;
}

/* Profile card mockup */
.demo-profile-card {
  background: white;
  border-radius: 8px;
  padding: 24px;
  max-width: 600px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.demo-profile-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.demo-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  font-weight: 600;
  flex-shrink: 0;
}

.demo-profile-info h3 {
  margin: 0 0 4px 0;
  font-size: 1.25rem;
  color: #000;
}

.demo-profile-info p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

.demo-profile-detail {
  color: #0a66c2;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Konexion button */
.demo-konexion-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.demo-konexion-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

.demo-konexion-btn::before {
  content: 'K';
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Konexion panel */
.demo-konexion-panel {
  position: absolute;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100%;
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 90;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.demo-konexion-panel.open {
  right: 0;
}

.demo-panel-header {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-panel-title {
  font-weight: 600;
  font-size: 1rem;
  color: #1565c0;
}

.demo-panel-status {
  font-size: 0.75rem;
  color: #2ed573;
  font-weight: 500;
}

.demo-panel-contact {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.demo-panel-contact-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.demo-panel-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 18px;
}

.demo-panel-contact-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
}

.demo-panel-contact-title {
  font-size: 0.8rem;
  color: #666;
  margin: 2px 0 0 0;
}

.demo-panel-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
}

.demo-panel-tab {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  font-size: 0.8rem;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
}

.demo-panel-tab.active {
  color: #1565c0;
  border-bottom-color: #1565c0;
  font-weight: 600;
}

.demo-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.demo-interactions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.demo-interactions-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.demo-new-btn {
  background: #1565c0;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-new-btn:hover {
  background: #0d47a1;
}

.demo-interaction-stats {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 16px;
}

.demo-interaction-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-interaction-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 0.85rem;
}

.demo-interaction-date {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.demo-interaction-type {
  color: #666;
}

/* Interaction modal */
.demo-interaction-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 400px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 110;
}

.demo-interaction-modal.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.demo-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo-modal-title {
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
}

.demo-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 24px;
  height: 24px;
}

.demo-modal-body {
  padding: 20px;
}

.demo-form-group {
  margin-bottom: 16px;
}

.demo-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.demo-form-input,
.demo-form-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
}

.demo-form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

.demo-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.demo-btn-cancel {
  padding: 8px 20px;
  border: 1px solid #ddd;
  background: white;
  color: #666;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}

.demo-btn-create {
  padding: 8px 24px;
  border: none;
  background: #1565c0;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

/* Typing animation */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #1565c0;
  margin-left: 2px;
  animation: blink 1s infinite;
}

/* Highlight pulse */
@keyframes highlight-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(46, 213, 115, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(46, 213, 115, 0);
  }
}

.demo-highlight {
  animation: highlight-pulse 2s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
  .demo-animated {
    aspect-ratio: 4 / 3;
  }

  .demo-konexion-panel {
    width: 320px;
  }

  .demo-interaction-modal {
    max-width: 90%;
  }
}
