/* ============================================ */
/* ANALYSIS RESULTS ADDITIONAL STYLES          */
/* Extends transcription-pages.css for         */
/* AI analysis results display                 */
/* ============================================ */

/* Action Items */
.action-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-hover, #f8fafc);
    border-radius: 10px;
    border-left: 3px solid #10b981;
}

.action-task {
    flex: 1;
    min-width: 200px;
    font-size: 14px;
    color: var(--text-primary, #1e293b);
}

.action-owner,
.action-due {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-priority {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.action-priority.priority-high {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.action-priority.priority-medium {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.action-priority.priority-low {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

/* Risks */
.risks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.risk-item {
    padding: 12px 16px;
    border-radius: 10px;
    border-left: 4px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.risk-item.high {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left-color: #dc2626;
}

.risk-item.medium {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left-color: #f59e0b;
}

.risk-item.low {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left-color: #16a34a;
}

.risk-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.risk-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.risk-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary, #1e293b);
}

.risk-mitigation {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    font-size: 13px;
    color: var(--text-secondary, #475569);
}

/* Buying Signals */
.buying-signals-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.signal-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 10px;
}

.signal-icon {
    font-size: 16px;
}

.signal-content {
    flex: 1;
}

.signal-text {
    font-size: 14px;
    color: var(--text-primary, #1e293b);
    font-weight: 500;
}

.signal-context {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-secondary, #475569);
    font-style: italic;
}

/* Objections */
.objections-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.objection-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
}

.objection-item.resolved {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.objection-item.unresolved {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.objection-status {
    font-size: 14px;
}

.objection-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary, #1e293b);
}

/* Filler Words */
.filler-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filler-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    color: #92400e;
}

.filler-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}

/* Meeting Overview Container */
.meeting-overview {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color, #e2e8f0);
}

/* Ensure proper spacing in AI results card */
.ai-results-card .meeting-overview {
    margin: 0;
    border: none;
    border-radius: 0;
}

.ai-results-card .overview-section:first-child .overview-section-header {
    padding-top: 8px;
}

/* Dark theme support */
.dark-theme .action-item,
.dark-theme .risk-item,
.dark-theme .signal-item,
.dark-theme .objection-item {
    background: rgba(30, 41, 59, 0.5);
}

.dark-theme .action-task,
.dark-theme .risk-text,
.dark-theme .signal-text,
.dark-theme .objection-text {
    color: #f1f5f9;
}

.dark-theme .meeting-overview {
    background: var(--bg-primary, #1e293b);
    border-color: var(--border-color, #334155);
}

/* ============================================ */
/* RESULTS HEIGHT & LAYOUT IMPROVEMENTS         */
/* ============================================ */

/* Increase max-height for expanded sections */
.ai-results-card .overview-section-content.expanded {
    max-height: 800px;
}

/* AI Results card improvements */
.ai-results-card {
    min-height: 400px;
}

.ai-results-card .ai-results-display {
    min-height: 350px;
}

/* Better spacing in results */
.ai-results-card .meeting-overview {
    padding-bottom: 16px;
}

/* Ensure sections have good padding */
.ai-results-card .overview-section-content {
    padding-left: 24px;
    padding-right: 24px;
}

/* Processing animation positioning for AI analysis */
.ai-loading-container .processing-animation {
    margin: 0 auto 24px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Center the entire loading container content */
.ai-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Make sure the title appears below the spinner */
.ai-loading-container .ai-loading-title {
    margin-top: 8px;
}

/* Adjust progress bar placement */
.ai-loading-container .ai-progress-bar-container {
    margin: 20px 0;
    width: 100%;
    max-width: 500px;
}

/* ============================================ */
/* LARGER PROGRESS STAGES                       */
/* ============================================ */

.ai-progress-card .ai-loading-progress {
    padding: 16px 20px;
    margin-bottom: 20px;
    gap: 10px 20px;
}

.ai-progress-card .ai-loading-stage {
    gap: 8px;
}

.ai-progress-card .ai-loading-stage-icon {
    width: 28px;
    height: 28px;
    font-size: 13px;
}

.ai-progress-card .ai-loading-stage-text {
    font-size: 14px;
}

.ai-progress-card .ai-loading-stage-text.active {
    font-weight: 600;
}

/* ============================================ */
/* RESULTS NAVIGATION BUTTONS                   */
/* ============================================ */

.results-navigation-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    margin-top: 16px;
}

.results-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.results-nav-btn svg {
    flex-shrink: 0;
}

.results-nav-btn.dashboard-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.results-nav-btn.dashboard-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.results-nav-btn.coach-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3);
}

.results-nav-btn.coach-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.results-nav-btn.new-analysis-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    border: none;
}

.results-nav-btn.new-analysis-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

/* ============================================ */
/* NEW ANALYSIS CONFIRMATION MODAL              */
/* ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon svg {
    color: #3b82f6;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px;
}

.modal-message {
    font-size: 15px;
    line-height: 1.6;
    color: #64748b;
    margin: 0 0 28px;
}

.modal-message strong {
    color: #334155;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal-btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.modal-btn-cancel:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.modal-btn-confirm:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* Dark theme modal */
.dark-theme .modal-content {
    background: #1e293b;
}

.dark-theme .modal-title {
    color: #f1f5f9;
}

.dark-theme .modal-message {
    color: #94a3b8;
}

.dark-theme .modal-message strong {
    color: #e2e8f0;
}

.dark-theme .modal-btn-cancel {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

.dark-theme .modal-btn-cancel:hover {
    background: #475569;
}

/* Dark theme support */
.dark-theme .results-navigation-buttons {
    border-top-color: var(--border-color, #334155);
}

/* Responsive - stack on mobile */
@media (max-width: 600px) {
    .results-navigation-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .results-nav-btn {
        justify-content: center;
        width: 100%;
    }
}
