/**
 * Voice Recorder CSS Styles
 * Modern, responsive design for voice recording interface
 */
 
 .voice_recorder textarea.form-textarea {

            min-height: 170px;
      width: 100%;
      border: none;
      padding: 10px 16px;
      padding-bottom: 60px;
      resize: vertical;
      outline: none;
      background: var(--bg-secondary);
    font-size: 15px;
 }
 
  .voice_recorder textarea.form-textarea::placeholder, .form-input::placeholder  {
    color: var(--text-secundary) !important;
}
 .editor-container {
    background: var(--bg-secondary);
  border-radius: 12px;
  border: 2px solid var(--border-color);
  
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  position: relative !important;
 }

.voice-recorder-container {
    position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: var(--bg-secondary);
      padding: 4px 12px 9px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      min-height: 46px;
      flex-wrap: wrap;
      gap: 8px;
}

 .voice_recorder .bottom-toolbar {
    position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 50px;
  flex-wrap: wrap;
  gap: 8px;
 }



.voice-recorder-controls {
    display: flex;
    align-items: center;
    gap: 7px;

}

.voice-record-btn {
    padding: 6px 9px 6px !important;
    margin: 0 !important;
    border-radius: 5px !important;
    gap:3px !important;
    color: var(--blue-accent) !important;
    font-size: 14px;
    font-weight: 500;
}

.voice-record-btn

.delete-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    height: 20px;
    line-height: 1;
}

.record-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    height: 20px;
    line-height: 1;
}

.record-icon svg, .delete-icon svg{
    border: none !important;
    box-shadow: none !important;
    height: 1em !important;
    width: 1em !important;
    margin: 0 0 !important;
    background: none !important;
    padding: 0 !important;
}

.delete-icon svg {
    color: #bb2424;
}



.voice-record-btn:active {
    transform: translateY(0);
}

.voice-record-btn.recording {

}

@keyframes recording-pulse {
    0%, 100% {
        box-shadow: 0 2px 12px rgba(220, 53, 69, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(220, 53, 69, 0.6);
    }
}

.voice-record-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}



.record-text {
    font-size: 1em;
    font-weight: 500 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1;
}

.voice-recorder-status {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.record-icon .lucide-x {
    display: none;
}

.recording-timer {
    display: none;
}

.recording .recording-timer {
    display: inline;
}

.recording .record-icon .lucide-mic {
    display: none;
}
.recording .record-icon .lucide-x {
    display: inline;
}

audio::-webkit-media-controls-panel {
  background-color: coral;
}

.recording-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    color: #dc3545;
    font-size: 14px;
    font-weight: 600;
    animation: fade-in 0.3s ease;
    padding-left: 5px;
}

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

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #dc3545;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.recording-timer {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--bg-secondary);
    padding: 5px 6px;
    border-radius: 5px !important;
    border: 1px solid var(--border-color);
    text-align: center;
}

.voice-playback-container {
    display: none;
    animation: slide-down 0.3s ease;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-bottom: 5px;
}

.voice-transcription-container {
    font-size: 14px;
    padding-bottom: 3px;
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.voice-playback {
    height: 35px;
}

.voice-playback::-webkit-media-controls-panel {
    background-color: #ffffff;
}

.voice-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.voice-delete-btn {
    padding: 6px 6px !important;
    margin-top: 0 !important;
}

.voice-delete-btn:hover {

}

.voice-delete-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}



.voice-recorder-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
    font-size: 14px;
    display: none;
    animation: fade-in 0.3s ease;
}

/* Hidden inputs */
.voice-filename,
.voice-url {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .voice-recorder-container {
        padding: 16px;
        margin: 12px 0;
    }
    
    .voice-recorder-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .voice-record-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
    
    .voice-recorder-status {
        justify-content: center;
    }
    
    .voice-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .voice-recorder-container {
        padding: 12px;
        border-radius: 8px;
    }
    
    .voice-record-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .recording-timer {
        font-size: 14px;
        padding: 3px 10px;
    }
    
    .voice-playback-container {
        padding: 12px;
    }
}

/* Loading state */
.voice-recorder-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.voice-recorder-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus states for accessibility */
.voice-record-btn:focus,
.voice-delete-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .voice-recorder-container {
        border: 2px solid #000;
    }
    
    .voice-record-btn {
        background: #000;
        border: 2px solid #000;
    }
    
    .recording-timer {
        border: 2px solid #000;
        background: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .voice-record-btn,
    .voice-delete-btn,
    .voice-recorder-container,
    .voice-playback-container,
    .recording-indicator,
    .pulse-dot {
        animation: none;
        transition: none;
    }
    
    .voice-record-btn:hover,
    .voice-delete-btn:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .voice-recorder-container {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .recording-timer {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .voice-playback-container {
        background: #4a5568;
    }
    
    .voice-recorder-error {
        background: #742a2a;
        color: #feb2b2;
        border-color: #c53030;
    }
}