/* Vet-specific styles */

/* === FIELD MODE === */
/* V11: Prominent sync-off indicator (client May 15) */
.field-mode-banner {
  display: none;
  padding: 10px var(--space-4);
  background: linear-gradient(90deg, #f59e0b 0%, #ea580c 100%);
  color: white;
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(234,88,12,0.35);
  position: sticky;
  top: 0;
  z-index: 50;
}
[data-field-mode="true"] .field-mode-banner { display: flex; align-items: center; justify-content: center; gap: 10px; }
[data-field-mode="true"] .field-mode-banner::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: white;
  animation: fmpulse 1.4s ease-in-out infinite;
}
@keyframes fmpulse {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* === AGENDA === */
.agenda-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-neutral-300);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.agenda-item:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }
.agenda-item.completed { border-left-color: var(--color-success); opacity: 0.7; }
.agenda-item.in_progress { border-left-color: var(--color-secondary); background: var(--color-info-light); }
.agenda-item.emergency { border-left-color: var(--color-error); background: var(--color-error-light); animation: emergencyGlow 2s ease-in-out infinite; }

@keyframes emergencyGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.1); }
  50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08); }
}
.agenda-time {
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  min-width: 60px;
  color: var(--color-neutral-900);
}
.agenda-details { flex: 1; }
.agenda-farm { font-weight: var(--font-semibold); }
.agenda-type { font-size: var(--text-sm); color: var(--color-neutral-600); }
.agenda-duration { font-size: var(--text-xs); color: var(--color-neutral-500); }
.agenda-status-badge {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  align-self: center;
}

/* === PRESCRIPTION === */
.rx-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-primary-50);
  border: 1px solid var(--color-primary-200);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.rx-header h3 { font-size: var(--text-md); color: var(--color-primary-dark); }

.medication-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-neutral-300);
  font-size: var(--text-sm);
}
.medication-row:last-child { border-bottom: none; }

/* === E-SIGNATURE === */
.signature-pad-container {
  border: 2px solid var(--color-neutral-400);
  border-radius: var(--radius-md);
  background: white;
  position: relative;
}
.signature-pad {
  width: 100%;
  height: 150px;
  cursor: crosshair;
  touch-action: none;
}
.signature-label {
  position: absolute;
  bottom: var(--space-2);
  left: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-neutral-500);
}
.signature-line {
  position: absolute;
  bottom: 40px;
  left: var(--space-4);
  right: var(--space-4);
  border-bottom: 1px dashed var(--color-neutral-400);
}

/* === BILLING === */
.invoice-card {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}
.invoice-card:hover { box-shadow: var(--shadow-md); }
.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-neutral-300);
}
.invoice-total {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-primary);
}
.invoice-line {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
}
.invoice-line.total {
  font-weight: var(--font-bold);
  border-top: 2px solid var(--color-neutral-900);
  padding-top: var(--space-3);
  margin-top: var(--space-2);
}

/* === STOCK === */
.stock-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.stock-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stock-card.low-stock { border-left: 4px solid var(--color-accent); }
.stock-card.expired { border-left: 4px solid var(--color-error); }
.stock-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-50);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.stock-info { flex: 1; min-width: 0; }
.stock-name { font-weight: var(--font-semibold); }
.stock-category { font-size: var(--text-xs); color: var(--color-neutral-600); }
.stock-quantity {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  text-align: right;
  min-width: 60px;
}

/* === VOICE DICTATION === */
.voice-fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--space-4));
  right: var(--space-4);
  width: var(--touch-field);
  height: var(--touch-field);
  border-radius: var(--radius-circle);
  background: var(--color-error);
  color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  border: none;
  z-index: var(--z-dropdown);
  transition: all var(--transition-fast);
}
.voice-fab:hover { transform: scale(1.1); }
.voice-fab.recording { animation: voicePulse 1.5s ease-in-out infinite; }

@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5), var(--shadow-lg); }
  50% { box-shadow: 0 0 0 15px rgba(220, 38, 38, 0), var(--shadow-lg); }
}

.voice-modal {
  padding: var(--space-6);
  text-align: center;
}
.voice-waveform {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: var(--space-4) 0;
}
.voice-bar {
  width: 4px;
  background: var(--color-primary);
  border-radius: 2px;
  animation: waveform 0.6s ease-in-out infinite;
}
.voice-bar:nth-child(1) { animation-delay: 0s; height: 20px; }
.voice-bar:nth-child(2) { animation-delay: 0.1s; height: 35px; }
.voice-bar:nth-child(3) { animation-delay: 0.2s; height: 50px; }
.voice-bar:nth-child(4) { animation-delay: 0.3s; height: 40px; }
.voice-bar:nth-child(5) { animation-delay: 0.4s; height: 25px; }
.voice-bar:nth-child(6) { animation-delay: 0.15s; height: 45px; }
.voice-bar:nth-child(7) { animation-delay: 0.25s; height: 30px; }
.voice-bar:nth-child(8) { animation-delay: 0.35s; height: 55px; }
.voice-bar:nth-child(9) { animation-delay: 0.05s; height: 28px; }
.voice-bar:nth-child(10) { animation-delay: 0.45s; height: 38px; }
.voice-bar:nth-child(11) { animation-delay: 0.12s; height: 32px; }
.voice-bar:nth-child(12) { animation-delay: 0.32s; height: 48px; }

@keyframes waveform {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.voice-transcript {
  min-height: 60px;
  padding: var(--space-4);
  background: var(--color-neutral-100);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-neutral-700);
  text-align: left;
  font-style: italic;
  margin: var(--space-4) 0;
}

/* === GEOFENCE === */
.geofence-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  font-weight: var(--font-semibold);
}
.geofence-indicator.outside { background: var(--color-neutral-100); color: var(--color-neutral-700); border: 1px solid var(--color-neutral-300); }
.geofence-indicator.arriving { background: var(--color-warning-light); color: var(--color-accent-dark); border: 1px solid #fde68a; }
.geofence-indicator.on-site { background: var(--color-success-light); color: var(--color-success); border: 1px solid #bbf7d0; animation: onSitePulse 2s ease-in-out infinite; }

@keyframes onSitePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
}

/* === MAP === */
.map-container {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-neutral-300);
}

/* === VOICE INPUT COMPONENT === */
.voice-input-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-6) var(--space-4);
  background: var(--color-neutral-50, #f9fafb);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--color-neutral-300);
}

.voice-mic-btn {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-circle);
  background: var(--color-error);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}
.voice-mic-btn:hover { transform: scale(1.08); box-shadow: var(--shadow-lg); }
.voice-mic-btn:active { transform: scale(0.96); }
.voice-mic-btn.recording {
  background: var(--color-error);
  animation: voicePulse 1.5s ease-in-out infinite;
}

.voice-recording-indicator {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-pulse-ring {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-circle);
  border: 3px solid var(--color-error);
  animation: pulseRing 1.5s ease-in-out infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 0; }
  100% { transform: scale(0.8); opacity: 0; }
}

.voice-status-text {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-neutral-600);
}
.voice-status-text.recording-text {
  color: var(--color-error);
  font-weight: var(--font-semibold);
}

.voice-transcript-result {
  width: 100%;
}

.voice-transcript-text {
  font-size: var(--text-sm);
  color: var(--color-neutral-700);
  font-style: italic;
  line-height: 1.6;
  margin: 0;
}

/* === VOICE ANALYSIS === */
.voice-analysis-container {
  padding: var(--space-4);
  background: var(--color-secondary-50, rgba(21,101,192,0.06));
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-secondary-200, rgba(21,101,192,0.15));
}

.voice-analysis-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.voice-analysis-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-secondary);
}

.voice-analysis-label {
  font-size: var(--text-sm);
  color: var(--color-neutral-500);
}

.voice-analysis-value {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-neutral-900);
}

/* === ENTRY TYPE CARDS === */
.entry-type-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.entry-type-card:active {
  transform: translateY(0);
}

/* === INPUT MODE TABS === */
.input-mode-tab:hover {
  color: var(--color-primary) !important;
  background: var(--color-neutral-50, #f9fafb);
}

@media (min-width: 1025px) {
  .voice-fab { bottom: var(--space-8); right: var(--space-8); }
}
