/* Home Tab CSS - Header pill, pickers, language toggle, analyze button */

.home-content {
  padding: 20px;
  position: relative;
  min-height: 100%;
  padding-bottom: 40px; /* space for disclaimer */
}

/* Header Pill - Creative Demo Status */
.header-pill {
  text-align: center;
  margin-bottom: 25px;
  padding: 0;
  position: relative;
}

.pill-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  justify-content: center;
}

.pill-status {
  font-weight: 700;
  color: #6a5acd;
  font-size: 0.9em;
  position: relative;
  padding: 6px 12px;
  background: linear-gradient(
    135deg,
    rgba(106, 90, 205, 0.25),
    rgba(106, 90, 205, 0.15)
  );
  border-radius: 15px;
  border: 2px solid rgba(106, 90, 205, 0.6);
  box-shadow: 0 3px 12px rgba(106, 90, 205, 0.4);
  transform: scale(1);
}

.pill-separator {
  color: #ff9a9e;
  font-weight: 600;
  font-size: 1.3em;
  animation: pulse 2s ease-in-out infinite;
}

.pill-avoiding {
  font-weight: 600;
  color: #ff6b6b;
  font-size: 0.95em;
  position: relative;
  padding: 8px 16px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 107, 0.1),
    rgba(255, 107, 107, 0.05)
  );
  border-radius: 20px;
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.pill-avoiding::before {
  content: "⚠️";
  margin-right: 6px;
  font-size: 0.8em;
}

.pill-edit-btn {
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
  border: none;
  color: #5d4037;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 3px 12px rgba(255, 154, 158, 0.3);
}

.pill-edit-btn:hover {
  background: linear-gradient(135deg, #fecfef, #ff9a9e);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 154, 158, 0.4);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* Compact Pickers Section */
.pickers-section {
  margin-bottom: 25px;
}

.picker-group {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(233, 236, 239, 0.5);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.picker-group::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff9a9e, #fecfef, #4caf50);
  border-radius: 15px 15px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.picker-group:hover::before {
  opacity: 1;
}

.picker-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.picker-label {
  font-weight: 600;
  color: #5d4037;
  margin-bottom: 15px;
  font-size: 1em;
  text-align: center;
}

/* Chip Picker */
.chip-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.chip {
  padding: 10px 16px;
  background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
  border: 2px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.3s ease;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  transform: scale(1);
}

.chip::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.chip:hover::before {
  left: 100%;
}

.chip:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.chip.selected {
  background: linear-gradient(135deg, #66bb6a, #81c784);
  border-color: #66bb6a;
  color: #ffffff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 187, 106, 0.3);
  animation: chipSelect 0.3s ease-out;
}

@keyframes chipSelect {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: translateY(-2px) scale(1.05);
  }
}

/* Language Toggle */
.language-toggle {
  display: flex;
  background: #f8f9fa;
  border-radius: 25px;
  padding: 4px;
  gap: 2px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
}

.toggle-option {
  flex: 1;
  padding: 8px 12px;
  text-align: center;
  cursor: pointer;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 500;
  transition: all 0.3s ease;
  color: #666;
  position: relative;
  overflow: hidden;
}

.toggle-option::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 154, 158, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.toggle-option:hover::before {
  left: 100%;
}

.toggle-option.active {
  background: linear-gradient(135deg, #66bb6a, #81c784);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 187, 106, 0.3);
  transform: scale(1.05);
}

.toggle-option:hover:not(.active) {
  background: rgba(102, 187, 106, 0.1);
  color: #66bb6a;
  transform: scale(1.02);
}

/* Optional Text Section */
.optional-text-section {
  margin-bottom: 25px;
}

.text-toggle {
  text-align: center;
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.text-toggle::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 154, 158, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.text-toggle:hover::before {
  left: 100%;
}

.text-toggle:hover {
  background: rgba(255, 154, 158, 0.1);
  transform: translateY(-1px);
}

.toggle-link {
  color: #6a5acd;
  font-size: 0.9em;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s ease;
}

.text-toggle:hover .toggle-link {
  color: #5a4acd;
}

.toggle-arrow {
  margin-left: 8px;
  color: #6a5acd;
  font-size: 0.8em;
  transition: transform 0.3s ease;
  display: inline-block;
}

.text-toggle.expanded .toggle-arrow {
  transform: rotate(180deg);
}

.text-input-container {
  margin-top: 15px;
  animation: slideDown 0.3s ease-out;
}

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

.optional-text-input {
  width: 100%;
  padding: 15px;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
}

.optional-text-input:focus {
  outline: none;
  border-color: #6a5acd;
  box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.15);
}

/* Scope Notes */
.scope-notes {
  margin-bottom: 25px;
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(233, 236, 239, 0.5);
}

.scope-note {
  font-size: 0.8em;
  color: #666;
  margin-bottom: 8px;
  font-style: italic;
  line-height: 1.4;
}

.pdpa-note {
  font-size: 0.75em;
  color: #999;
  opacity: 0.8;
  line-height: 1.3;
}

.future-hint {
  font-size: 0.8em;
  color: #6a5acd;
  font-weight: 600;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(106, 90, 205, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(106, 90, 205, 0.2);
  animation: pulse 2s ease-in-out infinite;
}

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

/* CTA Button */
.analyze-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(45deg, #6a5acd, #9370db);
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(106, 90, 205, 0.3);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.analyze-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(45deg, #ccc, #ddd);
  box-shadow: none;
}

.analyze-btn:not(:disabled):hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(106, 90, 205, 0.4);
}

.analyze-btn:not(:disabled)::before {
  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;
}

.analyze-btn:not(:disabled):hover::before {
  left: 100%;
}

/* Disclaimer under chat box */
.pdpa-text {
  margin-top: 6px;
  margin-bottom: 8px;
  font-size: 10px;
  font-style: italic;
  line-height: 1.25;
  color: #999;
  opacity: 0.8;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .picker-group {
    padding: 15px;
    margin-bottom: 12px;
  }

  .chip {
    padding: 8px 14px;
    font-size: 0.85em;
  }

  .language-toggle {
    flex-direction: column;
    gap: 4px;
  }

  .toggle-option {
    padding: 10px 8px;
    font-size: 0.8em;
  }

  .header-pill {
    margin-bottom: 20px;
  }

  .pill-content {
    gap: 12px;
  }

  .pill-status {
    font-size: 1em;
    padding: 8px 16px;
  }

  .pill-avoiding {
    font-size: 0.85em;
    padding: 6px 12px;
  }

  .pill-edit-btn {
    padding: 6px 12px;
    font-size: 0.75em;
  }

  .analyze-btn {
    padding: 16px;
    font-size: 15px;
  }

  .scope-notes {
    margin-bottom: 20px;
  }

  .scope-note {
    font-size: 0.75em;
  }

  .pdpa-note {
    font-size: 0.7em;
  }
}
