/* public/css/voice-concierge.css
 *
 * Voice Concierge UI styles.
 * Loaded alongside theme.css on pages that use the voice modal.
 * Components: mic button on entry cards, modal overlay, confirmation screen, field chips.
 */

/* ===== Mic button on entry cards ===== */
.entry-card-cell {
  position: relative;
}

.entry-card-mic-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(247, 244, 238, 0.85);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--sage);
  transition: background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
  z-index: 2;
}

.entry-card-mic-btn:hover {
  background: var(--forest);
  color: var(--cream);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(30, 43, 30, 0.2);
}

.entry-card-mic-btn:active {
  transform: scale(1.0);
}

.entry-card-mic-btn svg {
  display: block;
  flex-shrink: 0;
}

/* ===== Voice Concierge Modal Overlay ===== */
.voice-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 43, 40, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 1rem 0;
  animation: vc-overlay-in 0.2s ease;
}

@keyframes vc-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.voice-modal {
  background: var(--white);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 2rem 2rem 2.5rem;
  box-shadow: 0 -8px 48px rgba(46, 43, 40, 0.18);
  animation: vc-sheet-in 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
}

@keyframes vc-sheet-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@media (min-width: 560px) {
  .voice-modal {
    border-radius: 24px;
    margin-bottom: 2rem;
  }
}

/* Modal close button */
.vc-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--warm-gray);
  transition: background 0.15s, color 0.15s;
}

.vc-close:hover {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

/* Pulsing mic indicator */
.vc-mic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0 1.75rem;
}

.vc-mic-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: vc-pulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(30, 43, 30, 0.4);
}

@keyframes vc-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(30, 43, 30, 0.4); }
  50%  { box-shadow: 0 0 0 14px rgba(30, 43, 30, 0.12); }
  100% { box-shadow: 0 0 0 0 rgba(30, 43, 30, 0.4); }
}

.vc-mic-ring svg {
  color: var(--cream);
  display: block;
}

.vc-mic-status {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--warm-gray);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.vc-mic-status--listening {
  color: var(--forest);
  font-weight: 500;
}

/* Prompt text */
.vc-prompt {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 300;
  font-style: italic;
  color: var(--charcoal);
  text-align: center;
  line-height: 1.55;
  margin: 0 0.5rem 2rem;
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

/* Transcript preview */
.vc-transcript {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  min-height: 52px;
}

.vc-transcript-text {
  font-size: 0.9rem;
  color: var(--charcoal);
  line-height: 1.65;
  font-style: italic;
}

.vc-transcript-placeholder {
  color: var(--warm-gray);
  font-style: italic;
}

/* Transcript action row */
.vc-transcript-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.vc-btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--warm-gray);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.vc-btn-icon:hover {
  border-color: var(--sage);
  color: var(--forest);
  background: rgba(94, 107, 85, 0.05);
}

/* Text input fallback */
.vc-text-fallback {
  margin: 0 0 1.5rem;
}

.vc-text-fallback-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--warm-gray);
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
  display: block;
}

.vc-textarea {
  width: 100%;
  min-height: 96px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--charcoal);
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.vc-textarea:focus {
  border-color: var(--forest);
  background: var(--white);
}

.vc-textarea::placeholder {
  color: var(--warm-gray);
  opacity: 0.6;
}

/* Or divider */
.vc-or-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--warm-gray);
  font-size: 0.78rem;
}

.vc-or-divider::before,
.vc-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Modal CTA */
.vc-modal-cta {
  width: 100%;
  padding: 0.9rem;
  background: var(--forest);
  color: var(--cream);
  border: none;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, transform 0.1s;
}

.vc-modal-cta:hover {
  background: #263926;
  transform: translateY(-1px);
}

.vc-modal-cta:active {
  transform: translateY(0);
}

/* Processing spinner state */
.vc-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0;
}

.vc-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--light-gray);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: vc-spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes vc-spin {
  to { transform: rotate(360deg); }
}

.vc-processing-text {
  font-size: 0.88rem;
  color: var(--warm-gray);
  font-style: italic;
}

/* ===== Structured Confirmation ===== */
.sc-root {
  animation: vc-sheet-in 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

/* Transcript toggle */
.sc-transcript-block {
  margin-bottom: 1.5rem;
}

.sc-transcript-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--warm-gray);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.sc-transcript-toggle:hover {
  color: var(--forest);
}

.sc-transcript-toggle svg {
  transition: transform 0.2s;
}

.sc-transcript-toggle.is-open svg {
  transform: rotate(90deg);
}

.sc-transcript-text {
  display: none;
  margin-top: 0.75rem;
}

.sc-transcript-text.is-open {
  display: block;
}

.sc-transcript-content {
  font-size: 0.85rem;
  color: var(--warm-gray);
  font-style: italic;
  line-height: 1.65;
  padding: 0.85rem 1rem;
  background: var(--cream);
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* Field grid */
.sc-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
  .sc-field-grid { grid-template-columns: 1fr; }
}

.sc-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sc-field-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.sc-field-value-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Confirmation chips */
.sc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s, border-color 0.15s;
}

.sc-chip-icon {
  flex-shrink: 0;
  opacity: 0.6;
}

.sc-chip--auto {
  background: rgba(30, 43, 30, 0.08);
  border-color: rgba(30, 43, 30, 0.2);
  color: var(--forest);
}

.sc-chip--review {
  background: rgba(184, 132, 58, 0.1);
  border-color: rgba(184, 132, 58, 0.3);
  color: var(--charcoal);
}

.sc-chip--review:hover {
  background: rgba(184, 132, 58, 0.18);
}

.sc-chip-review-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

/* Edit row */
.sc-edit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sc-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--warm-gray);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.sc-edit-link:hover {
  color: var(--forest);
}

/* Actions */
.sc-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: center;
}

.sc-cta {
  width: 100%;
  justify-content: center;
}

.sc-start-over {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--warm-gray);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
  padding: 0.25rem;
}

.sc-start-over:hover {
  color: var(--sage);
}

/* ===== Field Chip (standalone) ===== */
.field-chip-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-chip-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.field-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.field-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  transition: background 0.15s, border-color 0.15s;
}

.field-chip:disabled {
  cursor: default;
}

.field-chip .chip-icon {
  flex-shrink: 0;
  opacity: 0.6;
}

.field-chip--auto {
  background: rgba(30, 43, 30, 0.08);
  border-color: rgba(30, 43, 30, 0.2);
  color: var(--forest);
}

.field-chip--review {
  background: rgba(184, 132, 58, 0.1);
  border-color: rgba(184, 132, 58, 0.3);
  color: var(--charcoal);
}

.field-chip--review:hover {
  background: rgba(184, 132, 58, 0.18);
}

.field-chip--empty {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--warm-gray);
  border-style: dashed;
}

.field-chip--empty:hover {
  border-color: var(--sage);
  color: var(--forest);
}

.chip-review-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .voice-modal { padding: 1.75rem 1.25rem 2rem; }
  .vc-modal-cta { padding: 0.85rem; font-size: 0.9rem; }
  .sc-actions .btn-primary { padding: 0.85rem 1.5rem; }
}