/**
 * GARNETA AI INPUT CENTER - Styles
 * One AI Engine - Many Input Methods
 */

/* AI Input Panel */
.ai-input-panel {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.ai-input-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.ai-input-header h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: var(--green);
}

/* Input Methods Grid */
.ai-input-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.ai-method {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.ai-method:hover {
  border-color: rgba(36, 240, 199, 0.3);
  background: rgba(36, 240, 199, 0.05);
}

.ai-method.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.ai-method label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

/* Voice Button */
.ai-method-btn {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ai-method-btn:hover {
  border-color: rgba(36, 240, 199, 0.5);
  background: rgba(36, 240, 199, 0.1);
}

.ai-method-btn.listening {
  background: linear-gradient(135deg, rgba(255, 112, 67, 0.2), rgba(255, 112, 67, 0.1));
  border-color: rgba(255, 112, 67, 0.6);
  animation: pulse 1.5s infinite;
}

.ai-method-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 112, 67, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 112, 67, 0); }
}

.ai-status {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--soft-text);
}

.ai-status.active {
  color: var(--orange);
  font-weight: 700;
}

/* Textarea */
.ai-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--text);
  font-size: 14px;
  resize: vertical;
  margin-bottom: 12px;
}

.ai-textarea:focus {
  border-color: rgba(36, 240, 199, 0.5);
  outline: none;
}

.ai-textarea[readonly] {
  background: rgba(255, 255, 255, 0.02);
}

/* Transcript Box */
.ai-transcript-box {
  margin-bottom: 20px;
}

.ai-transcript-box label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--soft-text);
}

/* Draft Section */
.ai-draft-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

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

.ai-draft-header h4 {
  margin: 0;
  font-size: 16px;
}

.ai-draft-table {
  max-height: 300px;
  overflow-y: auto;
}

.ai-draft-table .table-wrap {
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .ai-input-methods {
    grid-template-columns: 1fr;
  }
  
  .ai-method {
    padding: 12px;
  }
  
  .ai-method-btn {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .ai-textarea {
    min-height: 80px;
  }
}

/* Animation for listening state */
.ai-method-btn.listening::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--orange);
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
