/**
 * Telnyx Auto Dialer - Custom Styles
 */

/* General Styles */
body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
    border: none;
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
    font-weight: 600;
}

/* Campaign List */
.list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.list-group-item:hover:not(.active) {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* Statistics Boxes */
.stat-box {
    padding: 1rem;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    margin-bottom: 0.5rem;
}

.stat-box h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.stat-box small {
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 600;
}

/* Tables */
.table-responsive {
    border-radius: 0.375rem;
}

.table thead.sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table td {
    vertical-align: middle;
}

/* Status Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.btn-group .btn {
    margin: 0;
}

.btn-group .btn:hover {
    transform: none;
}

/* Modals */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-title {
    font-weight: 700;
    color: #212529;
}

/* Forms */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Alert Messages */
.alert {
    border-radius: 0.375rem;
    border: none;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
}

/* Progress Bar */
.progress {
    height: 1.5rem;
    border-radius: 0.375rem;
    background-color: #e9ecef;
}

.progress-bar {
    font-weight: 600;
    font-size: 0.875rem;
}

/* Custom Scrollbar */
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .stat-box h3 {
        font-size: 1.5rem;
    }
    
    .stat-box {
        margin-bottom: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 0.25rem;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.3rem solid #f3f3f3;
    border-top: 0.3rem solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status Colors */
.status-pending { color: #6c757d; }
.status-calling { color: #0d6efd; }
.status-answered { color: #198754; }
.status-no-answer { color: #ffc107; }
.status-voicemail { color: #0dcaf0; }
.status-not-in-service { color: #dc3545; }
.status-busy { color: #fd7e14; }
.status-failed { color: #dc3545; }
.status-hung-up { color: #6c757d; }

/* Tooltip */
.tooltip {
    font-size: 0.875rem;
}

/* Empty State */
.empty-state {
    padding: 3rem;
    text-align: center;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Campaign Stats Animation */
.stat-box h3 {
    transition: all 0.3s ease-in-out;
}

.stat-box:hover h3 {
    transform: scale(1.1);
}

/* Call Timeline Styles */
.call-timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    position: relative;
}

.timeline-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-content {
    flex: 1;
    margin-left: 15px;
    padding: 8px 0;
}

.timeline-connector {
    position: relative;
    margin-left: 19px;
    width: 2px;
    height: 30px;
    background: linear-gradient(180deg, #dee2e6 0%, #dee2e6 100%);
}

.timeline-item:last-child .timeline-connector {
    display: none;
}
