/* 
 * Enhanced CSS for WhatsApp Monitoring
 * File: assets/css/monitoring_whatsapp.css
 */

/* ===== MODERN DESIGN ELEMENTS ===== */

.neu-brutalism-border {
    border: 3px solid #000;
    box-shadow: 5px 5px 0px #000;
    border-radius: 8px;
}

.card-hover {
    transition: all 0.3s ease;
}

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

/* ===== ANIMATIONS ===== */

.pulse {
    animation: pulse 2s infinite;
}

.pulse-hover:hover {
    animation: pulse 1s infinite;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== BADGE ENHANCEMENTS ===== */

.tiket-badge {
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.tiket-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    text-decoration: none;
}

.status-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.badge-sm {
    font-size: 0.7rem;
    padding: 0.25rem 0.4rem;
}

/* ===== WHATSAPP STYLING ===== */

.btn-whatsapp {
    background: linear-gradient(45deg, #25D366, #128C7E);
    border: none;
    color: white !important;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: linear-gradient(45deg, #128C7E, #25D366);
    color: white !important;
    text-decoration: none;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:focus {
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.25);
    color: white !important;
}

/* ===== TABLE ENHANCEMENTS ===== */

.table-row-hover {
    transition: all 0.2s ease;
}

.table-row-hover:hover {
    background-color: #f8f9fa !important;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-success {
    background-color: #d4edda !important;
    transition: background-color 0.3s ease;
}

.keluhan-text {
    cursor: help;
    line-height: 1.4;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.keluhan-text:hover {
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 4px;
}

/* ===== USER INFO STYLING ===== */

.user-info strong {
    color: #2c3e50;
    font-weight: 600;
}

.user-info small {
    display: block;
    margin-top: 2px;
}

/* ===== COUNTER ANIMATIONS ===== */

.counter {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.counter:hover {
    transform: scale(1.1);
    color: #3498db;
}

/* ===== MODAL ENHANCEMENTS ===== */

.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    border-radius: 15px 15px 0 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    border-radius: 0 0 15px 15px;
    background-color: #f8f9fa;
}

.modal-backdrop {
    background-color: rgba(0,0,0,0.6);
}

/* ===== STATUS FORM STYLING ===== */

.status-options .form-check-label {
    cursor: pointer;
    margin-right: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.status-options .form-check-label:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.status-card {
    transition: all 0.3s ease;
    border-radius: 8px;
    background-color: #fff;
}

.status-options input[type="radio"]:checked + label .status-card {
    background-color: #e3f2fd;
    border-color: #2196f3 !important;
    box-shadow: 0 0 0 3px rgba(33,150,243,0.25);
    transform: scale(1.02);
}

/* ===== FORM VALIDATION ===== */

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

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

/* ===== CONNECTION STATUS ===== */

.connection-status {
    font-size: 3rem;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.connection-status:hover {
    transform: rotate(360deg);
}

.test-item {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.test-item:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.test-item i.fa-circle {
    width: 12px;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.test-item i.text-success {
    color: #28a745 !important;
    animation: bounce 0.5s ease;
}

.test-item i.text-danger {
    color: #dc3545 !important;
    animation: shake 0.5s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ===== LOADING OVERLAY ===== */

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

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
}

/* ===== ALERT ENHANCEMENTS ===== */

.alert-toast {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-toast .close {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.alert-toast .close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ===== EMPTY STATE ===== */

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

.empty-state i {
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 10px;
    font-weight: 600;
}

/* ===== BORDER VARIANTS ===== */

.border-left-primary { 
    border-left: 0.25rem solid #4e73df !important; 
}

.border-left-danger { 
    border-left: 0.25rem solid #e74a3b !important; 
}

.border-left-warning { 
    border-left: 0.25rem solid #f6c23e !important; 
}

.border-left-success { 
    border-left: 0.25rem solid #1cc88a !important; 
}

/* ===== GRADIENT BACKGROUNDS ===== */

.bg-gradient-primary { 
    background: linear-gradient(180deg, #4e73df 10%, #224abe 100%); 
}

.bg-gradient-info { 
    background: linear-gradient(180deg, #36b9cc 10%, #258391 100%); 
}

.bg-gradient-warning { 
    background: linear-gradient(180deg, #f6c23e 10%, #dda20a 100%); 
}

.bg-gradient-success { 
    background: linear-gradient(180deg, #1cc88a 10%, #13855c 100%); 
}

.bg-gradient-danger {
    background: linear-gradient(180deg, #e74a3b 10%, #c23321 100%);
}

/* ===== BUTTON ENHANCEMENTS ===== */

.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: 8px 0 0 8px;
}

.btn-group .btn:last-child {
    border-radius: 0 8px 8px 0;
}

/* ===== CARD IMPROVEMENTS ===== */

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.card-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    border-radius: 0 0 12px 12px !important;
    background-color: #f8f9fa;
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */

@media (max-width: 768px) {
    .table-responsive { 
        font-size: 0.85rem; 
    }
    
    .btn-group { 
        flex-direction: column; 
    }
    
    .btn-group .btn { 
        margin-bottom: 2px;
        border-radius: 8px !important;
    }
    
    .counter { 
        font-size: 1.5rem; 
    }
    
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group-vertical .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .alert-toast {
        min-width: 280px;
        right: 10px !important;
    }
}

@media (max-width: 576px) {
    .neu-brutalism-border {
        border-width: 2px;
        box-shadow: 3px 3px 0px #000;
    }
    
    .counter {
        font-size: 1.2rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* ===== DARK MODE SUPPORT ===== */

@media (prefers-color-scheme: dark) {
    .card {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .modal-content {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .table {
        color: #e2e8f0;
    }
    
    .table-hover tbody tr:hover {
        background-color: #4a5568;
    }
    
    .form-control {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .form-control:focus {
        background-color: #4a5568;
        border-color: #63b3ed;
        color: #e2e8f0;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */

.btn:focus,
.form-control:focus,
.form-check-input:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== PRINT STYLES ===== */

@media print {
    .btn,
    .pagination,
    .modal,
    .alert-toast,
    .loading-overlay {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .table {
        font-size: 12px;
    }
    
    .page-break {
        page-break-after: always;
    }
}

/* ===== UTILITY CLASSES ===== */

.text-decoration-none {
    text-decoration: none !important;
}

.text-decoration-none:hover {
    text-decoration: underline !important;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-help {
    cursor: help;
}

.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.border-radius-lg {
    border-radius: 12px !important;
}

.shadow-lg {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.shadow-xl {
    box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
}