/* Genedle Styles */

#genedle-root {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Clue Card */
.pg-clue-card {
  background: var(--lightgray);
  border: 1px solid var(--gray);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.pg-clue-section {
  margin-bottom: 1.25rem;
}

.pg-clue-section:last-child {
  margin-bottom: 0;
}

.pg-clue-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.pg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pg-chip {
  background: var(--light);
  border: 1px solid var(--darkgray);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--dark);
}

.pg-chip.matched {
  background: #2ea043;
  color: white;
  border-color: #2ea043;
}

.pg-chip.unmatched {
  background: var(--gray);
  color: var(--light);
  border-color: var(--gray);
}

.pg-flags {
  display: flex;
  gap: 1rem;
}

.pg-flag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.pg-flag-icon {
  font-size: 1.2rem;
}

/* Input */
.pg-input-section {
  margin-bottom: 1.5rem;
}

.pg-autocomplete-wrapper {
  position: relative;
}

.pg-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--gray);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--light);
  color: var(--dark);
  box-sizing: border-box;
}

.pg-input:focus {
  outline: none;
  border-color: var(--secondary);
}

.pg-input:disabled {
  background: var(--lightgray);
  cursor: not-allowed;
}

.pg-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--light);
  border: 1px solid var(--gray);
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pg-suggestion {
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--lightgray);
}

.pg-suggestion:hover,
.pg-suggestion.selected {
  background: var(--lightgray);
}

.pg-suggestion:last-child {
  border-bottom: none;
}

.pg-submit-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.pg-submit-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.pg-submit-btn:disabled {
  background: var(--gray);
  cursor: not-allowed;
}

/* Feedback Panel */
.pg-feedback {
  background: var(--lightgray);
  border: 1px solid var(--gray);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.pg-feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray);
}

.pg-feedback-protein {
  font-weight: 700;
  font-size: 1.1rem;
}

.pg-feedback-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.pg-feedback-label {
  font-size: 0.9rem;
  color: var(--gray);
}

.pg-feedback-value {
  font-weight: 600;
}

.pg-bar {
  height: 6px;
  background: var(--lightgray);
  border-radius: 3px;
  overflow: hidden;
  flex: 1;
  margin: 0 0.75rem;
}

.pg-bar-fill {
  height: 100%;
  background: var(--secondary);
  transition: width 0.3s ease;
}

/* Result */
.pg-result {
  background: #2ea043;
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 1.5rem;
}

.pg-result.failed {
  background: #e74c3c;
}

.pg-result-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pg-result-protein {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.pg-result-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.pg-link-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s;
}

.pg-link-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Share */
.pg-share-section {
  text-align: center;
  margin-top: 1.5rem;
}

.pg-share-btn {
  padding: 0.75rem 1.5rem;
  background: var(--dark);
  color: var(--light);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.pg-share-btn:hover {
  opacity: 0.9;
}

.pg-share-feedback {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray);
}

/* Stats */
.pg-stats {
  display: flex;
  justify-content: space-around;
  padding: 1rem;
  background: var(--lightgray);
  border-radius: 6px;
  margin-bottom: 1rem;
}

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

.pg-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
}

.pg-stat-label {
  font-size: 0.85rem;
  color: var(--gray);
  text-transform: uppercase;
}

/* Mobile */
@media (max-width: 600px) {
  #genedle-root {
    padding: 0 0.5rem;
  }
  
  .pg-result-links {
    flex-direction: column;
  }
  
  .pg-stats {
    flex-wrap: wrap;
  }
}


