/* Voice Capture & Report Styles */

/* Recording Indicator - CLICKABLE */
.recording-indicator {
    position: fixed;
    top: 80px;
    right: 30px;
    background: #e74c3c;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 500;
    animation: fadeIn 0.3s ease;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.recording-indicator:hover {
    background: #c0392b;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.recording-indicator:active {
    transform: scale(0.98);
}

.recording-pulse {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Voice Report Modal */
.voice-report-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.voice-report-modal.show {
    opacity: 1;
}

.voice-report-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.voice-report-modal .modal-dialog {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.voice-report-modal.show .modal-dialog {
    transform: translateY(0);
}

.voice-report-modal .modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.voice-report-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.voice-report-modal .modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* Report Score Section */
.report-score {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 30px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.score-value {
    font-size: 3rem;
    font-weight: 700;
}

.score-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.score-details {
    flex: 1;
}

.score-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.metric-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.score-summary {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.95;
}

/* Report Sections */
.report-section {
    margin-bottom: 30px;
}

.report-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.metric-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Highlight the completion rate card */
.metric-card.highlight {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border: 2px solid #1e8449;
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.3);
    grid-column: 1 / -1; /* Full width on desktop */
}

.metric-card.highlight .metric-icon {
    font-size: 2.5rem;
}

.metric-card.highlight .metric-value {
    font-size: 2.2rem !important;
}

.metric-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.metric-info .metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.metric-info .metric-label {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-info .metric-subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* Issues Section */
.issue-group {
    margin-bottom: 25px;
}

.issue-group h4 {
    color: #e67e22;
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.word-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.word-item {
    padding: 6px 12px;
    background: #ecf0f1;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #2c3e50;
}

.word-item.skipped {
    background: #ffe5e5;
    color: #c0392b;
}

.misread-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff3cd;
    border-radius: 6px;
    margin-bottom: 8px;
}

.misread-item .expected {
    color: #c0392b;
    text-decoration: line-through;
    font-weight: 600;
}

.misread-item .actual {
    color: #27ae60;
    font-weight: 600;
}

.misread-item i {
    color: #7f8c8d;
    font-size: 0.8rem;
}

/* Recommendations */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #e8f5e9;
    border-left: 4px solid #27ae60;
}

.recommendation-item.priority-high {
    background: #ffebee;
    border-left-color: #e74c3c;
}

.recommendation-item.priority-medium {
    background: #fff3e0;
    border-left-color: #f39c12;
}

.recommendation-item i {
    font-size: 1.2rem;
    color: #27ae60;
}

.recommendation-item.priority-high i {
    color: #e74c3c;
}

.recommendation-item.priority-medium i {
    color: #f39c12;
}

/* Report Actions */
.report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

/* Grade Colors */
.grade-A {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.grade-B {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.grade-C {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.grade-D {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Danger Button Variant */
.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Responsive */
@media (max-width: 768px) {
    .report-score {
        flex-direction: column;
        text-align: center;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .voice-report-modal .modal-dialog {
        width: 95%;
        max-height: 95vh;
    }
}
