/* ============================================================================
   REDESIGN CALLS - Modern Call Cards
   ============================================================================
   
   Autor: AI Assistant
   Data: 2026-02-18
   
   SCOP: Modernizare carduri convorbiri - mai compacte și user-friendly
   METODĂ: CSS overrides, ZERO modificări funcționale
   
   PRINCIPII:
   - Toate informațiile rămân vizibile
   - Toate butoanele și funcționalitățile păstrate
   - Doar layout și styling îmbunătățit
   
   REVERT: Șterge acest fișier și referința din index.html
   ============================================================================ */

/* ============================================================================
   CALL ITEM - CONTAINER PRINCIPAL
   ============================================================================ */
.call-item {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    padding: 0 !important;
    overflow: hidden !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.call-item:hover {
    border-color: #0891b2 !important;
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.12) !important;
    transform: translateY(-2px) !important;
}

/* ============================================================================
   HEADER - COMPACT CU INFO CHEIE
   ============================================================================ */
.call-item .call-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 16px !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
}

.call-item .call-id {
    font-weight: 700 !important;
    font-size: 13px !important;
    color: #0891b2 !important;
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%) !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
}

.call-item .call-date {
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    background: transparent !important;
    padding: 0 !important;
}

/* ============================================================================
   LEAD STATUS - MAI COMPACT
   ============================================================================ */
.call-item .lead-status-section {
    padding: 10px 16px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.call-item .lead-status-inner {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.call-item .lead-status-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.call-item .lead-status-select {
    padding: 6px 28px 6px 10px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    min-width: 140px !important;
    border-width: 1px !important;
}

.call-item .contact-badge {
    font-size: 12px !important;
    padding: 4px 8px !important;
    background: #dbeafe !important;
    color: #1e40af !important;
    border-radius: 4px !important;
}

/* ============================================================================
   CRM LEAD SECTION - CONDENSAT
   ============================================================================ */
.call-item .crm-lead-section {
    padding: 10px 16px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.call-item .crm-lead-section > div {
    gap: 8px !important;
}

.call-item .crm-lead-section .btn,
.call-item .crm-lead-section .btn-secondary {
    padding: 5px 10px !important;
    font-size: 11px !important;
    border-radius: 5px !important;
}

/* ============================================================================
   ANALYSIS BADGE / SUCCESS EVALUATION - INLINE
   ============================================================================ */
.call-item .analysis-badge {
    padding: 8px 16px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.call-item .analysis-badge > div {
    gap: 6px !important;
}

.call-item .analysis-badge span:first-child {
    font-size: 16px !important;
}

.call-item .analysis-badge span:last-child {
    font-size: 12px !important;
}

/* ============================================================================
   CALL INFO GRID - COMPACT 3 COLUMNS
   ============================================================================ */
.call-item .call-info {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #f1f5f9 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.call-item .info-item {
    background: #ffffff !important;
    padding: 10px 12px !important;
    border-radius: 0 !important;
    border: none !important;
    text-align: center !important;
}

.call-item .info-item:first-child {
    text-align: left !important;
}

.call-item .info-item:last-child {
    text-align: right !important;
}

.call-item .info-label {
    font-size: 10px !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
    margin-bottom: 2px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
}

.call-item .info-value {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
}

/* Credits and USD - highlight */
.call-item .info-item:nth-last-child(2) .info-value,
.call-item .info-item:last-child .info-value {
    color: #059669 !important;
}

/* ============================================================================
   CALL SECTIONS - AUDIO, SUMMARY, TRANSCRIPT
   ============================================================================ */
.call-item .call-section {
    padding: 12px 16px !important;
    margin: 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-radius: 0 !important;
    border-left: none !important;
}

.call-item .call-section:last-of-type {
    border-bottom: none !important;
}

.call-item .section-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 8px !important;
}

/* AI Summary - compact */
.call-item .call-section[style*="06b6d4"] {
    background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%) !important;
}

.call-item .call-section[style*="06b6d4"] > div:last-child {
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #334155 !important;
    padding: 0 !important;
}

/* ============================================================================
   TRANSCRIPT - COLLAPSIBLE STYLE (CSS only)
   ============================================================================ */
.call-item .transcript-content {
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #475569 !important;
    max-height: 120px !important;
    overflow-y: auto !important;
    padding: 10px 12px !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
}

.call-item .transcript-content::-webkit-scrollbar {
    width: 4px !important;
}

.call-item .transcript-content::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 2px !important;
}

.call-item .transcript-content::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 2px !important;
}

.call-item .no-content {
    font-size: 12px !important;
    color: #94a3b8 !important;
    font-style: italic !important;
    padding: 8px 0 !important;
}

/* ============================================================================
   ACTIVITIES SECTION - COMPACT
   ============================================================================ */
.call-item .activities-section {
    padding: 12px 16px !important;
}

.call-item .activities-section .section-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
}

.call-item .activities-section .section-label {
    margin-bottom: 0 !important;
}

.call-item .btn-add-activity {
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: 5px !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.call-item .btn-add-activity:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

.call-item .activities-list {
    max-height: 150px !important;
    overflow-y: auto !important;
}

.call-item .activities-list > div[style*="text-align: center"] {
    padding: 12px !important;
    font-size: 12px !important;
}

/* ============================================================================
   ACTION BUTTON - TASK REQUEST
   ============================================================================ */
.call-item .btn-task-request {
    display: block !important;
    width: calc(100% - 32px) !important;
    margin: 12px 16px 16px 16px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    text-align: center !important;
}

.call-item .btn-task-request:hover {
    background: linear-gradient(135deg, #0e7490 0%, #155e75 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3) !important;
}

/* ============================================================================
   AUDIO PLAYER - STYLING
   ============================================================================ */
.call-item .plyr {
    border-radius: 8px !important;
}

.call-item .plyr--audio .plyr__controls {
    padding: 8px 10px !important;
    border-radius: 8px !important;
}

/* ============================================================================
   MOBILE RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
    .call-item {
        border-radius: 12px !important;
    }
    
    .call-item .call-header {
        padding: 10px 14px !important;
    }
    
    .call-item .call-id {
        font-size: 12px !important;
        padding: 3px 8px !important;
    }
    
    .call-item .call-date {
        font-size: 11px !important;
    }
    
    /* Info grid - 2 columns on mobile */
    .call-item .call-info {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .call-item .info-item {
        padding: 8px 10px !important;
        text-align: left !important;
    }
    
    .call-item .info-item:last-child {
        text-align: left !important;
    }
    
    .call-item .lead-status-section,
    .call-item .crm-lead-section,
    .call-item .analysis-badge,
    .call-item .call-section {
        padding: 10px 14px !important;
    }
    
    .call-item .lead-status-inner {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    .call-item .lead-status-select {
        width: 100% !important;
        min-width: unset !important;
    }
    
    .call-item .crm-lead-section > div {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .call-item .crm-lead-section > div > div:last-child {
        width: 100% !important;
        margin-top: 8px !important;
    }
    
    .call-item .crm-lead-section .btn,
    .call-item .crm-lead-section .btn-secondary {
        flex: 1 !important;
    }
    
    .call-item .transcript-content {
        max-height: 100px !important;
    }
    
    .call-item .btn-task-request {
        width: calc(100% - 28px) !important;
        margin: 10px 14px 14px 14px !important;
        padding: 12px 16px !important;
    }
}

/* ============================================================================
   TABLET
   ============================================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .call-item .call-info {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ============================================================================
   DESKTOP - EXTRA OPTIMIZATIONS
   ============================================================================ */
@media (min-width: 1024px) {
    .call-item .call-info {
        grid-template-columns: repeat(6, 1fr) !important;
    }
    
    .call-item .info-item {
        text-align: center !important;
    }
    
    .call-item .info-item:first-child {
        text-align: center !important;
    }
    
    .call-item .info-item:last-child {
        text-align: center !important;
    }
}

/* ============================================================================
   CALLS LIST CONTAINER - GRID LAYOUT
   ============================================================================ */
@media (min-width: 1200px) {
    #callsContainer {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
}

@media (min-width: 1600px) {
    #callsContainer {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */
@keyframes callCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.call-item {
    animation: callCardFadeIn 0.3s ease forwards !important;
}

/* Staggered animation for multiple cards */
#callsContainer .call-item:nth-child(1) { animation-delay: 0.05s !important; }
#callsContainer .call-item:nth-child(2) { animation-delay: 0.1s !important; }
#callsContainer .call-item:nth-child(3) { animation-delay: 0.15s !important; }
#callsContainer .call-item:nth-child(4) { animation-delay: 0.2s !important; }
#callsContainer .call-item:nth-child(5) { animation-delay: 0.25s !important; }
#callsContainer .call-item:nth-child(6) { animation-delay: 0.3s !important; }

/* ============================================================================
   PRINT STYLES
   ============================================================================ */
@media print {
    .call-item {
        break-inside: avoid !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .call-item .btn-task-request,
    .call-item .btn-add-activity {
        display: none !important;
    }
    
    .call-item .plyr {
        display: none !important;
    }
}
