/**
 * Medical Transcription Widget Styles
 */

/* AI Note Button Icon */
.btn_ai_note {
    padding: 4px 8px !important;
    vertical-align: middle;
}
.btn_ai_icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    transition: transform 0.2s ease;
}
.btn_ai_note:hover .btn_ai_icon {
    transform: scale(1.2);
}

/* Modal Overlay */
.transcription-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 10000 !important;
}

/* Recording Widget Container */
.transcription-widget {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10001 !important;
    background: #fff !important;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 25px;
    min-width: 450px;
    max-width: 550px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
}

.transcription-widget.recording {
    border-color: #e74c3c;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
}

.transcription-widget.processing {
    border-color: #3295e6;
}

/* Header */
.transcription-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.transcription-header > img {
    height: 48px;
    margin-right: 12px;
}

.transcription-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transcription-timer {
    margin-left: auto;
}

.transcription-title .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
}

.transcription-title .status-dot.recording {
    background: #e74c3c;
    animation: pulse 1s infinite;
}

.transcription-title .status-dot.processing {
    background: #3295e6;
    animation: pulse 1.5s infinite;
}

.transcription-title .status-dot.completed {
    background: #27ae60;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Controls */
.transcription-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.transcription-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.transcription-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.transcription-btn.btn-record {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
}

.transcription-btn.btn-record:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.transcription-btn.btn-record.recording {
    background: linear-gradient(135deg, #c0392b, #96281b);
    animation: recording-pulse 2s infinite;
}

@keyframes recording-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
}

.transcription-btn.btn-stop {
    background: #333;
    color: #fff;
}

.transcription-btn.btn-stop:hover:not(:disabled) {
    background: #555;
}

.transcription-btn.btn-pause {
    background: #f39c12;
    color: #fff;
}

.transcription-btn.btn-cancel {
    background: #95a5a6;
    color: #fff;
}

/* Timer */
.transcription-timer {
    font-size: 24px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: #333;
    min-width: 80px;
    text-align: center;
}

.transcription-timer.recording {
    color: #e74c3c;
}

/* Visualizer */
.transcription-visualizer {
    width: 100%;
    height: 60px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Status Messages */
.transcription-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

.transcription-status .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #3295e6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results Section */
.transcription-results {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.transcription-results h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

/* Transcript Display */
.transcript-text {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
}

.transcript-text:empty::before {
    content: 'No transcript available';
    color: #999;
    font-style: italic;
}

/* SOAP Note Display */
.soap-note {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.soap-section {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.soap-section:last-child {
    border-bottom: none;
}

.soap-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.soap-section.subjective .soap-section-title {
    color: #3498db;
}

.soap-section.objective .soap-section-title {
    color: #27ae60;
}

.soap-section.assessment .soap-section-title {
    color: #e67e22;
}

.soap-section.plan .soap-section-title {
    color: #9b59b6;
}

.soap-section-content {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.soap-field {
    margin-bottom: 6px;
}

.soap-field-label {
    font-weight: 600;
    color: #555;
}

.soap-field-value {
    color: #333;
}

/* Summary Display */
.transcription-summary {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 4px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    border-left: 4px solid #3295e6;
}

/* Actions */
.transcription-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.transcription-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* Copy to Encounter Button */
.btn-copy-encounter {
    background: linear-gradient(135deg, #3295e6, #37d1c9);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-encounter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(50, 149, 230, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .transcription-controls {
        flex-wrap: wrap;
    }

    .transcription-btn {
        flex: 1;
        min-width: 100px;
    }

    .transcription-timer {
        width: 100%;
        order: -1;
        margin-bottom: 10px;
    }
}
