/* Voice Calls Page Specific Styles */

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-section {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s ease;
    min-height: 100px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    border-radius: 12px;
    color: white;
}

.stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* Filters Section */
.filters-section {
    margin-bottom: 2rem;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-group select,
.filter-group input {
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.2s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(94, 0, 255, 0.1);
}

/* Table Section */
.table-section {
    margin-bottom: 2rem;
}

.table-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.calls-table {
    width: 100%;
    border-collapse: collapse;
}

.calls-table thead {
    background: var(--bg-card);
}

.calls-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calls-table td {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.calls-table tbody tr {
    transition: background 0.2s ease;
}

.calls-table tbody tr:hover {
    background: var(--bg-card);
}

.loading-row {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem !important;
}

.empty-row {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem !important;
}

/* Call Details */
.caller-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.caller-name {
    font-weight: 600;
    color: var(--text-primary);
}

.call-time {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.phone-number {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
}

.duration {
    font-weight: 600;
}

/* Outcome Badges */
.outcome-badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 100px;
    width: fit-content;
}

.outcome-badge.appointment {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.outcome-badge.message {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.outcome-badge.completed {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--bg-primary);
    transform: translateY(-1px);
}

.btn-action.transcript {
    color: var(--purple);
    border-color: var(--purple);
}

.btn-action.transcript:hover {
    background: rgba(94, 0, 255, 0.1);
}

/* Pagination */
.pagination-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.pagination-info {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-pagination {
    padding: 0.5rem 1.25rem;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-pagination:hover:not(:disabled) {
    background: var(--bg-primary);
}

.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.call-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.call-details p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.call-details strong {
    color: var(--text-primary);
    font-weight: 600;
}

.transcript-content {
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-section {
        grid-template-columns: 1fr;
    }

    .filters-row {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
    }

    .table-wrapper {
        overflow-x: auto;
    }

    .calls-table {
        min-width: 800px;
    }

    .pagination-section {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-content {
        width: 95%;a
        max-height: 90vh;
    }
}