/* Voice Archive CSS */
/* Voice Message Archive Management System */

/* Chat Integration - Voice Archive Button */
.btn-voice-archive {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-voice-archive:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: scale(1.05);
}

/* Main page voice archive layout */
#voice-archive-section .voice-archive-container {
    display: flex !important;
    min-height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    background: var(--bg-secondary, #2a2e35);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

/* Modal voice archive layout - ONLY IN MODAL OVERLAY */
.modal-overlay .modal .voice-archive-container {
    display: flex !important;
    min-height: 80vh;
    max-height: 90vh;
}

.voice-archive-sidebar {
    width: 280px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding: 20px;
    overflow-y: auto;
}

.voice-archive-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-secondary);
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-section h3 i {
    color: var(--primary-color);
}

/* Voice Categories */
.category-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-filter-list li {
    padding: 10px 12px;
    margin-bottom: 5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.category-filter-list li:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.category-filter-list li.active {
    background: var(--primary-color);
    color: white;
}

.category-filter-list li i {
    width: 16px;
    text-align: center;
}

/* Voice Grid */
.voice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.voice-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.voice-grid-empty i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.voice-grid-empty p {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.voice-grid-empty span {
    font-size: 14px;
    opacity: 0.8;
}

/* Voice Card */
.voice-card {
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.voice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.voice-card-header {
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.voice-card-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    gap: 2px;
    margin: 10px 0;
}

.voice-wave-bar {
    width: 3px;
    background: rgba(255,255,255,0.7);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.voice-card:hover .voice-wave-bar {
    background: rgba(255,255,255,1);
}

.voice-card-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.voice-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-play-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.8);
    transform: scale(1.05);
}

.voice-play-btn.playing {
    background: rgba(255,193,7,0.8);
    border-color: rgba(255,193,7,1);
    animation: voice-pulse 1.5s infinite;
}

@keyframes voice-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.voice-duration {
    font-size: 12px;
    opacity: 0.9;
}

.voice-card-info {
    padding: 15px;
}

.voice-card-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.voice-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.voice-card-category {
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.voice-card-date {
    font-size: 11px;
    color: var(--text-secondary);
}

.voice-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.voice-card-actions .btn-icon {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.voice-card-actions .btn-icon:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.voice-card-actions .btn-icon.btn-danger:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.voice-card-actions .btn-icon.btn-primary:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Upload Form */
.add-voice-form {
    padding: 20px;
}

.add-voice-form .form-section {
    margin-bottom: 25px;
}

.add-voice-form .form-section:last-child {
    margin-bottom: 0;
}

.file-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
}

.file-drop-area:hover, .file-drop-area.dragover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.file-drop-area.has-file {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.file-drop-area i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.file-drop-area p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.file-drop-area input[type="file"] {
    display: none;
}

#voice-file-name-display {
    margin-top: 10px;
    font-weight: 500;
    color: var(--primary-color);
}

/* Recording Interface */
.voice-recording-interface {
    text-align: center;
    padding: 30px;
    background: var(--bg-primary);
    border-radius: 8px;
    margin: 20px 0;
}

.record-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #dc3545;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 20px;
}

.record-button:hover {
    background: #c82333;
    transform: scale(1.05);
}

.record-button.recording {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.recording-timer {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.recording-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Voice Categories Specific */
.voice-category-preview {
    background: var(--bg-primary);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.voice-category-preview h4 {
    margin: 0 0 5px 0;
    color: var(--text-primary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-category-preview p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Search and Filter */
.form-group-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group-actions .btn {
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #voice-archive-section .voice-archive-container {
        flex-direction: column;
    }
    
    .voice-archive-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .voice-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.voice-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.voice-card.loading .voice-card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.1);
    animation: shimmer 1.5s infinite;
}

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

/* Voice Archive Section - Override base.css flex */
#voice-archive-section {
    display: none !important;
    flex: none !important;
}

#voice-archive-section.active {
    display: block !important;
    flex: none !important;
}

/* Voice Archive Main Container - Section View (when active) */
#voice-archive-section.active .voice-archive-container {
    display: flex !important;
    gap: 20px;
    height: calc(100vh - 70px) !important;
    background: #1a1d23;
    color: #e0e0e0;
    flex: 1 1 auto !important;
}

/* Existing rule for section (keep it for compatibility) */
#voice-archive-section .voice-archive-container {
    display: flex !important;
    gap: 20px;
    height: calc(100vh - 70px) !important;
    background: #1a1d23;
    color: #e0e0e0;
} 