/**
 * Modern Explorer UI V1.0
 * Premium glass-morphism design for mentions explorer
 */

/* ============================================
   MENTION CARDS - Premium Design
   ============================================ */

.mention-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(249,250,251,0.98) 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.mention-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #E5E7EB 0%, #D1D5DB 100%);
    transition: all 0.3s ease;
}

.mention-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    border-color: rgba(139, 92, 246, 0.3);
}

.mention-card:hover::before {
    background: linear-gradient(180deg, #8B5CF6 0%, #7C3AED 100%);
}

/* Sentiment ribbon color variants */
.mention-card.sentiment-positive::before {
    background: linear-gradient(180deg, #10B981 0%, #059669 100%);
}

.mention-card.sentiment-negative::before {
    background: linear-gradient(180deg, #EF4444 0%, #DC2626 100%);
}

.mention-card.sentiment-neutral::before {
    background: linear-gradient(180deg, #6B7280 0%, #4B5563 100%);
}

.mention-card.sentiment-mixed::before {
    background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
}

/* Selected state */
.mention-card.card-selected {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2), 0 8px 24px rgba(139, 92, 246, 0.15);
}

.mention-card.card-selected::before {
    background: linear-gradient(180deg, #8B5CF6 0%, #7C3AED 100%);
    width: 6px;
}

/* Corrected state */
.mention-card.corrected {
    animation: cardCorrected 0.5s ease-out;
}

@keyframes cardCorrected {
    0% { background-color: rgba(16, 185, 129, 0.1); }
    100% { background-color: transparent; }
}

/* ============================================
   BADGE SYSTEM - Modern Pills
   ============================================ */

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.mention-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mention-badge:hover {
    transform: scale(1.05);
}

/* Sentiment badges */
.badge-positive {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-negative {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-neutral {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.12) 0%, rgba(75, 85, 99, 0.12) 100%);
    color: #4B5563;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.badge-mixed {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: #D97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Emotion badges */
.badge-emotion {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(124, 58, 237, 0.12) 100%);
    color: #7C3AED;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

/* Topic badges */
.badge-topic {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.12) 100%);
    color: #2563EB;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Brand badges */
.badge-brand {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.12) 0%, rgba(219, 39, 119, 0.12) 100%);
    color: #DB2777;
    border: 1px solid rgba(236, 72, 153, 0.25);
}

/* Corrected badge */
.badge-corrected {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(5, 150, 105, 0.9) 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* High Impact badge - Active Learning priority */
.badge-high-impact {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9) 0%, rgba(217, 119, 6, 0.9) 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
    animation: pulse-impact 2s ease-in-out infinite;
}

@keyframes pulse-impact {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* ============================================
   INLINE CORRECTION DROPDOWNS - Modern Style
   ============================================ */

.inline-corrections {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.8) 0%, rgba(243, 244, 246, 0.8) 100%);
    border-radius: 12px;
    margin-top: 12px;
    border: 1px solid rgba(229, 231, 235, 0.6);
}

.correction-label {
    font-size: 11px;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inline-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s ease;
    min-width: 90px;
}

.inline-select:hover {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.inline-select:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.inline-select.saving {
    opacity: 0.7;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238B5CF6' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10' stroke-dasharray='31.4' stroke-dashoffset='10'/%3E%3C/svg%3E");
    animation: selectSpin 1s linear infinite;
}

@keyframes selectSpin {
    from { background-position: right 10px center; }
    to { background-position: right 10px center; }
}

/* ============================================
   MENTION TEXT - Typography
   ============================================ */

.mention-text {
    font-size: 15px;
    line-height: 1.6;
    color: #1F2937;
    margin: 12px 0;
    word-break: break-word;
}

.mention-text::first-letter {
    text-transform: uppercase;
}

/* ============================================
   METADATA ROW - Subtle Info
   ============================================ */

.mention-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(229, 231, 235, 0.5);
    margin-top: 12px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-label {
    font-size: 10px;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 13px;
    font-weight: 500;
    color: #4B5563;
}

/* ============================================
   ACTION BUTTONS - Premium Style
   ============================================ */

.mention-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    background: white;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.action-btn:hover {
    border-color: #8B5CF6;
    color: #8B5CF6;
    background: rgba(139, 92, 246, 0.05);
    transform: translateY(-1px);
}

.action-btn-primary {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.action-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    color: white;
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
}

/* ============================================
   CHECKBOX - Modern Design
   ============================================ */

.mention-checkbox-wrapper {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
}

.mention-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 6px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: white;
    transition: all 0.2s ease;
}

.mention-checkbox:hover {
    border-color: #8B5CF6;
}

.mention-checkbox:checked {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    border-color: #8B5CF6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* ============================================
   EXPLORER TOOLBAR - Enhanced
   ============================================ */

.explorer-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(249,250,251,0.95) 100%);
    border-radius: 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    backdrop-filter: blur(10px);
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-divider {
    width: 1px;
    height: 28px;
    background: linear-gradient(to bottom, transparent, #E5E7EB, transparent);
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    border-color: #8B5CF6;
    color: #7C3AED;
}

.toolbar-btn.active {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: white;
    border-color: transparent;
}

/* ============================================
   VIEW TOGGLE - Grid/List
   ============================================ */

.view-toggle {
    display: flex;
    background: #F3F4F6;
    border-radius: 10px;
    padding: 4px;
}

.view-toggle-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    color: #4B5563;
}

.view-toggle-btn.active {
    background: white;
    color: #7C3AED;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ============================================
   LOADING STATES
   ============================================ */

.mention-card.loading {
    animation: cardLoading 1.5s ease-in-out infinite;
}

@keyframes cardLoading {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.skeleton {
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .mention-card {
        padding: 16px;
        border-radius: 12px;
    }
    
    .inline-corrections {
        gap: 6px;
        padding: 10px 12px;
    }
    
    .inline-select {
        min-width: 80px;
        font-size: 12px;
        padding: 6px 28px 6px 10px;
    }
    
    .badge-row {
        gap: 6px;
    }
    
    .mention-badge {
        padding: 4px 10px;
        font-size: 11px;
    }
}
