/* MSETCL Custom Styles - Centralized CSS File */

/* ===== NAVIGATION STYLES ===== */
.navbar {
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    color: #333 !important;
    font-weight: bold;
}

.navbar-nav .nav-link {
    color: #333 !important;
    border-radius: 6px;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link.active {
    color: #000 !important;
    background-color: rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

/* ===== LAYOUT STYLES ===== */
.main-content {
    background-color: #f8f9fa;
    min-height: calc(100vh - 76px);
    padding-top: 20px;
}

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

/* ===== BUTTON STYLES ===== */
.btn-primary {
    background: #07233c !important;
    border: none !important;
}

.btn-primary:hover {
    background: #051a2e !important;
}

.btn-primary:focus {
    background: #07233c !important;
    box-shadow: 0 0 0 0.2rem rgba(7, 35, 60, 0.25) !important;
}

.btn-primary:active {
    background: #051a2e !important;
}

/* Cancel/Secondary buttons */
.btn-secondary {
    background: #5A0F0F !important;
    border: none !important;
}

.btn-secondary:hover {
    background: #4a0c0c !important;
}

.btn-secondary:focus {
    background: #5A0F0F !important;
    box-shadow: 0 0 0 0.2rem rgba(90, 15, 15, 0.25) !important;
}

.btn-secondary:active {
    background: #4a0c0c !important;
}

/* Cancel buttons with btn-danger class */
.btn-danger {
    background: #5A0F0F !important;
    border: none !important;
}

.btn-danger:hover {
    background: #4a0c0c !important;
}

.btn-danger:focus {
    background: #5A0F0F !important;
    box-shadow: 0 0 0 0.2rem rgba(90, 15, 15, 0.25) !important;
}

.btn-danger:active {
    background: #4a0c0c !important;
}

/* ===== LOGO STYLES ===== */
.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #07233c, #0d4a7a);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(7, 35, 60, 0.3);
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
}

.logo-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(7, 35, 60, 0.4);
}

.logo-image {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.brand-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: #07233c;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.navbar-brand:hover .logo-circle {
    transform: scale(1.05);
}

/* ===== ACTION BUTTON STYLES ===== */
/* Standard Bootstrap button styles are used for consistency */

/* ===== ACTION BUTTON COLORS - BLUE THEME ===== */
.btn-info {
    background: #07233c !important;
    border: none !important;
    color: white !important;
}

.btn-info:hover {
    background: #051a2e !important;
    color: white !important;
}

.btn-info:focus {
    background: #07233c !important;
    box-shadow: 0 0 0 0.2rem rgba(7, 35, 60, 0.25) !important;
}

.btn-info:active {
    background: #051a2e !important;
}

.btn-warning {
    background: #0d4a7a !important;
    border: none !important;
    color: white !important;
}

.btn-warning:hover {
    background: #0a3a62 !important;
    color: white !important;
}

.btn-warning:focus {
    background: #0d4a7a !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 74, 122, 0.25) !important;
}

.btn-warning:active {
    background: #0a3a62 !important;
}

/* ===== UNIFORM ACTION BUTTON ICONS ===== */
.btn-info::before {
    content: "\f06e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 5px;
}

.btn-warning::before {
    content: "\f044";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 5px;
}

.btn-danger::before {
    content: "\f1f8";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 5px;
}

/* Hide existing icons in action buttons to prevent duplication */
.btn-info i:first-child,
.btn-warning i:first-child,
.btn-danger i:first-child {
    display: none;
}

/* ===== DATATABLES SPECIFIC STYLES ===== */
/* Ensure table has proper width for horizontal scroll */
#transformersTable {
    width: 100% !important;
    min-width: 2000px; /* Set minimum width to ensure horizontal scroll */
}

/* Fix double scrollbar issue - let DataTable handle scrolling */
.dataTables_wrapper .dataTables_scroll {
    overflow-x: auto;
}

.dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto !important;
    overflow-y: visible !important;
}

/* Fixed column styling */
.DTFC_RightWrapper {
    border-left: 2px solid #dee2e6;
    background-color: #f8f9fa;
}

.DTFC_RightWrapper table {
    background-color: #f8f9fa;
}

.DTFC_RightWrapper .btn-group {
    padding: 2px;
}

/* ===== DATATABLES PAGINATION STYLES ===== */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:focus,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:active {
    background: #07233c !important;
    color: #ffffff !important;
    border-color: #07233c !important;
    box-shadow: none !important;
}

/* Direct override with maximum specificity */
.paginate_button.current,
.paginate_button.current:hover,
.paginate_button.current:focus,
.paginate_button.current:active {
    background: #07233c !important;
    color: #ffffff !important;
    border-color: #07233c !important;
    box-shadow: none !important;
}

/* Bootstrap 5 DataTables specific override */
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    background-color: #07233c !important;
    border-color: #07233c !important;
    color: #ffffff !important;
}

/* Additional specificity for DataTables */
table.dataTable .dataTables_paginate .paginate_button.current {
    background: #07233c !important;
    color: #ffffff !important;
    border-color: #07233c !important;
}

/* ===== FORM STYLES ===== */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.75rem;
}

/* Apply height only to specific input types, exclude radio/checkbox/file */
input[type="text"].form-control,
input[type="number"].form-control,
input[type="email"].form-control,
input[type="password"].form-control,
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control,
input[type="search"].form-control,
input[type="url"].form-control,
input[type="tel"].form-control {
    height: 38px; /* Consistent height for text inputs */
}

/* Textarea should have auto height */
textarea.form-control {
    height: auto;
    min-height: 38px;
}

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

/* Ensure consistent height for all form elements */
.form-select {
    height: 38px !important;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
}

.form-control-sm {
    height: 31px !important;
    padding: 0.25rem 0.5rem;
}

.form-select-sm {
    height: 31px !important;
    padding: 0.25rem 2rem 0.25rem 0.5rem;
}

/* Make sure all form elements in filter sections have consistent height */
/* Exclude radio buttons, checkboxes, and file inputs from height restriction */
.card-body input[type="text"].form-control,
.card-body input[type="number"].form-control,
.card-body input[type="email"].form-control,
.card-body input[type="password"].form-control,
.card-body input[type="date"].form-control,
.card-body input[type="time"].form-control,
.card-body input[type="datetime-local"].form-control,
.card-body textarea.form-control,
.card-body .form-select {
    height: 38px !important;
}

/* Textarea should have auto height, not fixed */
.card-body textarea.form-control {
    height: auto !important;
    min-height: 38px;
}

/* Ensure buttons in filter sections align properly */
.card-body .btn {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#bulk_data {
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

code {
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 12px;
    word-break: break-all;
}

/* Hide options that are not selected */
select option[style*="display: none"] {
    display: none !important;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .main-content {
        padding-top: 10px;
    }
    
    .navbar-nav .nav-link {
        margin: 2px 0;
    }
}

/* ===== UTILITY STYLES ===== */
.text-gray-800 {
    color: #5a5c69 !important;
}

.border-bottom {
    border-bottom: 1px solid #e3e6f0 !important;
}

/* ===== CARD STYLES ===== */
.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* ===== BADGE STYLES ===== */
.badge {
    font-size: 0.75em;
    font-weight: 600;
}

/* ===== TABLE STYLES ===== */
.table th {
    border-top: none;
    font-weight: 600;
    color: #5a5c69;
    background-color: #f8f9fc;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* ===== ALERT STYLES ===== */
.alert {
    border: none;
    border-radius: 0.35rem;
}

.alert-info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}
