/* ===== DOCUMENTS MODULE STYLES ===== */
/* Add this to your existing styles.css or create as documents-styles.css */

/* Document Card Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

/* Document Card */
.document-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.document-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.doc-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.doc-icon svg {
    width: 28px;
    height: 28px;
}

.doc-info {
    flex: 1;
    min-width: 0;
}

.doc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-desc {
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
    margin: 0 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
}

.doc-category {
    padding: 2px 8px;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-radius: 4px;
    text-transform: capitalize;
}

.doc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.doc-tags .tag {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #cbd5e1);
    border-radius: 4px;
    font-size: 10px;
}

.doc-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.doc-actions .btn-sm {
    padding: 6px;
    min-width: auto;
}

/* Voice Button Recording State */
.voice-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary, #3b82f6);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.voice-btn:hover {
    background: var(--primary-hover, #2563eb);
    transform: scale(1.05);
}

.voice-btn.recording {
    background: #ef4444 !important;
    animation: pulse-recording 1.5s ease-in-out infinite;
}

@keyframes pulse-recording {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(239, 68, 68, 0);
    }
}

/* Search Container */
.search-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper .icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted, #94a3b8);
    pointer-events: none;
}

.search-input-wrapper .icon svg {
    width: 18px;
    height: 18px;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 44px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary, #f1f5f9);
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary, #3b82f6);
    background: rgba(30, 41, 59, 0.8);
}

.search-input::placeholder {
    color: var(--text-muted, #94a3b8);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted, #94a3b8);
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--text-secondary, #cbd5e1);
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Document Detail Modal */
.doc-detail {
    padding: 8px;
}

.doc-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.doc-detail-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.doc-detail-icon svg {
    width: 36px;
    height: 36px;
}

.doc-detail-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--text-primary, #f1f5f9);
}

.doc-detail-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted, #94a3b8);
}

.doc-detail-section {
    margin-bottom: 20px;
}

.doc-detail-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #94a3b8);
    margin: 0 0 8px;
}

.doc-detail-section p {
    margin: 0;
    color: var(--text-secondary, #cbd5e1);
    line-height: 1.6;
}

.doc-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary, #3b82f6);
    background: rgba(59, 130, 246, 0.05);
}

.upload-zone .upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #3b82f6);
}

.upload-zone h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--text-primary, #f1f5f9);
}

.upload-zone p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted, #94a3b8);
}

/* Upload Form */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #cbd5e1);
    margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary, #f1f5f9);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary, #3b82f6);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
}

/* ===== SEARCH RESULTS STYLES ===== */

.document-card.search-result {
    border-left: 3px solid var(--primary, #3b82f6);
}

.doc-relevance {
    padding: 2px 8px;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.doc-page {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted, #94a3b8);
    border-radius: 4px;
    font-size: 11px;
}

.relevance-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    color: #10b981;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.content-preview {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary, #cbd5e1);
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* No Results State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted, #94a3b8);
}

.no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #64748b);
}

.no-results h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--text-secondary, #cbd5e1);
}

.no-results p {
    margin: 0;
    font-size: 14px;
}