/* Custom Styles for SMS/WhatsApp Messages Log */

:root {
    --color-primary: #FD5902;
}

body {
    background-color: #f8f9fa;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: #212529 !important;
}

.navbar-brand img {
    height: 30px;
}

.navbar-toggler {
    border-color: rgba(0, 0, 0, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Form Control Styling */
.form-control,
.form-select {
    border-radius: 0.2rem;
    border: 0.8px solid var(--color-primary);
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(253, 89, 2, 0.25);
    outline: 0;
}

/* Flatpickr Date Picker Styling */
.flatpickr-input {
    border-radius: 0.2rem;
    border: 0.8px solid var(--color-primary);
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.flatpickr-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(253, 89, 2, 0.25);
    outline: 0;
}

.flatpickr-calendar {
    border-radius: 0.2rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Select2 Styling */
.select2-container--bootstrap-5 .select2-selection {
    border-radius: 0.2rem;
    border: 0.8px solid var(--color-primary);
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(253, 89, 2, 0.25);
}

.select2-container--bootstrap-5 .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    padding-right: 0;
    line-height: calc(1.5em + 0.75rem);
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 0.75rem);
    right: 0.75rem;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header {
    font-weight: 600;
}

.table-responsive {
    margin-top: 1rem;
}

/* DataTables Custom Styling */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5rem;
    border-radius: 0.2rem;
    border: 0.8px solid var(--color-primary);
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(253, 89, 2, 0.25);
    outline: 0;
}

.dataTables_wrapper .dataTables_length select {
    margin: 0 0.5rem;
    border-radius: 0.2rem;
    border: 0.8px solid var(--color-primary);
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(253, 89, 2, 0.25);
    outline: 0;
}

/* Badge styling */
.badge {
    font-size: 0.875em;
    padding: 0.35em 0.65em;
}

/* Pre tag styling for message_body */
pre {
    font-size: 0.875rem;
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 0.25rem;
    max-width: 300px;
    overflow-x: auto;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    pre {
        max-width: 200px;
        font-size: 0.75rem;
    }
}
