/**
 * ChancenCheck v2 - TypeForm Style
 * 
 * @package Chancenbuddy_ChancenCheck
 * @since 2.0.0
 */

/* Container */
.chancencheck-typeform {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 163, 224, 0.05) 0%, rgba(141, 198, 63, 0.05) 100%);
  padding: 2rem;
}

.typeform-container {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

/* Question Slide */
.question-slide {
  display: none;
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.question-slide.active {
  display: block;
}

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

/* Question Content */
.question-number {
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #00A3E0;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.question-title {
  font-family: 'Rubik', sans-serif;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.question-subtitle {
  font-family: 'Rubik', sans-serif;
  font-size: 16px;
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Answer Options */
.answer-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Chip Buttons */
.chip-option {
  background: #fff;
  border: 2px solid rgba(51, 51, 51, 0.15);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  font-family: 'Rubik', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.chip-option:hover {
  border-color: #00A3E0;
  background: rgba(0, 163, 224, 0.03);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 163, 224, 0.15);
}

.chip-option.selected {
  border-color: #00A3E0;
  background: rgba(0, 163, 224, 0.08);
  box-shadow: 0 4px 12px rgba(0, 163, 224, 0.2);
}

.chip-option.selected::before {
  content: '✓';
  position: absolute;
  right: 1.5rem;
  width: 24px;
  height: 24px;
  background: #00A3E0;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.chip-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.chip-text {
  flex: 1;
}

.chip-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.chip-description {
  display: block;
  font-size: 14px;
  color: #666;
  font-weight: 400;
}

/* Multiple Choice - Grid Layout */
.answer-options.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.answer-options.grid .chip-option {
  justify-content: center;
  text-align: center;
  flex-direction: column;
  padding: 1.5rem;
}

.answer-options.grid .chip-option.selected::before {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

/* Number Input */
.number-input-wrapper {
  position: relative;
  max-width: 300px;
}

.number-input {
  width: 100%;
  padding: 1.25rem 1.5rem;
  border: 2px solid rgba(51, 51, 51, 0.15);
  border-radius: 12px;
  font-family: 'Rubik', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.number-input:focus {
  outline: none;
  border-color: #00A3E0;
  box-shadow: 0 0 0 4px rgba(0, 163, 224, 0.1);
}

.number-input::placeholder {
  color: #ccc;
}

/* Text Input (für PLZ) */
.text-input {
  width: 100%;
  max-width: 300px;
  padding: 1.25rem 1.5rem;
  border: 2px solid rgba(51, 51, 51, 0.15);
  border-radius: 12px;
  font-family: 'Rubik', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #333;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.text-input:focus {
  outline: none;
  border-color: #00A3E0;
  box-shadow: 0 0 0 4px rgba(0, 163, 224, 0.1);
}

/* Navigation */
.question-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-nav {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-back {
  background: transparent;
  color: #666;
}

.btn-back:hover {
  color: #333;
  background: rgba(0, 0, 0, 0.05);
}

.btn-next {
  background: #00A3E0;
  color: white;
  margin-left: auto;
  box-shadow: 0 4px 12px rgba(0, 163, 224, 0.3);
}

.btn-next:hover {
  background: #0088b8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 163, 224, 0.4);
}

.btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Progress Bar */
.typeform-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

.typeform-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00A3E0, #8DC63F);
  transition: width 0.5s ease;
  width: 0;
}

/* Keyboard Hint */
.keyboard-hint {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-family: 'Rubik', sans-serif;
  font-size: 13px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.key {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

/* Loading State */
.question-loading {
  text-align: center;
  padding: 3rem;
}

.loading-dots {
  display: inline-flex;
  gap: 0.5rem;
}

.loading-dots span {
  width: 12px;
  height: 12px;
  background: #00A3E0;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
  .chancencheck-typeform {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 3rem;
  }
  
  .question-title {
    font-size: 24px;
  }
  
  .answer-options.grid {
    grid-template-columns: 1fr;
  }
  
  .chip-option {
    padding: 1rem;
  }
}