/* ============================================================
   ASCLEPIUS FORM ENHANCEMENTS
   Voice Dictation + Share Panel + Medical Suggestions
   ============================================================ */

/* --- VOICE DICTATION BUTTON --- */
.asc-voice-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
}
.asc-voice-wrapper .form-control,
.asc-voice-wrapper textarea.form-control {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  flex: 1;
}
.asc-mic-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-height: 38px;
  padding: 0;
  background: #f8f9fa;
  border: 1px solid #ced4da;
  border-left: none;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  cursor: pointer;
  color: #6c757d;
  transition: all 0.2s ease;
  outline: none;
  flex-shrink: 0;
}
.asc-mic-btn:hover { background: #e9ecef; color: #004D40; }
.asc-mic-btn.recording {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
  animation: asc-pulse 1.2s infinite;
}
.asc-mic-btn.recording i { animation: asc-mic-bounce 0.6s infinite alternate; }
@keyframes asc-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,53,69,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(220,53,69,0); }
}
@keyframes asc-mic-bounce {
  from { transform: scale(1); }
  to { transform: scale(1.2); }
}

/* --- VOICE STATUS BAR --- */
#asc-voice-status {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #212529;
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.82rem;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
#asc-voice-status.visible { display: flex; }
#asc-voice-status .asc-live-text {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #90ee90;
  font-style: italic;
}

/* --- SHARE PANEL --- */
#asc-share-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 10px;
}
.asc-fab-main {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1565C0;
  color: white;
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  outline: none;
}
.asc-fab-main:hover { background: #0D47A1; transform: scale(1.05); }
.asc-fab-main.open { background: #dc3545; }

.asc-share-options {
  display: none;
  flex-direction: column-reverse;
  gap: 8px;
  align-items: flex-start;
}
.asc-share-options.open { display: flex; }

.asc-share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 12px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  outline: none;
}
.asc-share-btn:hover { transform: translateX(3px); box-shadow: 0 4px 14px rgba(0,0,0,0.22); text-decoration: none; }
.asc-share-btn i { width: 20px; text-align: center; }
.asc-share-btn.pdf    { background: #dc3545; color: white; }
.asc-share-btn.word   { background: #2b5797; color: white; }
.asc-share-btn.wa     { background: #25D366; color: white; }
.asc-share-btn.email  { background: #EA4335; color: white; }
.asc-share-btn.print  { background: #6c757d; color: white; }

/* --- PRINT STYLES --- */
@media print {
  .navbar, footer, #asc-share-fab, #asc-voice-status,
  .asc-mic-btn, .btn, form, .no-print, .sidebar,
  .card-footer { display: none !important; }
  .card { border: 1px solid #ddd !important; box-shadow: none !important; }
  body { font-size: 11pt; }
  .container-fluid { padding: 0 !important; }
  .card-body { padding: 10pt !important; }
  h3, h4, h5 { color: #004D40 !important; }
}

/* --- DROPDOWN SUGGESTIONS BADGE --- */
.asc-suggestions {
  font-size: 0.72rem;
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.asc-suggestion-chip {
  background: #E0F2F1;
  color: #004D40;
  border: 1px solid #B2DFDB;
  border-radius: 12px;
  padding: 1px 8px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.72rem;
  white-space: nowrap;
}
.asc-suggestion-chip:hover { background: #B2DFDB; }
