/* 
 * Custom CSS for NCP Hosted Researchers Portal
 */

/* Main color variables */
:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}
/* Fix the bg-primary override */
.bg-primary {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6) !important;
    /* Override Bootstrap's rgba background */
    --bs-bg-opacity: 1;
    --bs-primary-rgb: 30, 58, 138; /* This matches #1e3a8a */
}

/* Alternative custom background class */
.bg-ncp-primary {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6) !important;
    color: white !important;
}

/* Override Bootstrap's bg-primary with custom color */
.bg-primary-custom {
    background-color: #1e3a8a !important;
    color: white !important;
}
/* Main layout styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f5f5f5;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
}

/* Header styling */
header {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Card styling */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: none;
    margin-bottom: 1.5rem;
}

.card-header {
    font-weight: 600;
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
    padding: 0.75rem 1.25rem;
}

/* Form styling */
.form-label {
    font-weight: 500;
}

.form-control, .form-select {
    border-radius: 0.375rem;
    /*padding: 0.5rem 0.75rem;*/
    border-color: #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Form validation styling */
.form-control.is-invalid {
    background-position: right calc(0.375em + 0.5rem) center;
}

.invalid-feedback {
    font-size: 0.8rem;
    color: var(--danger-color);
}

/* Button styling */
.btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Table styling */
.table {
    background-color: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.table thead th {
    background-color: var(--light-color);
    border-color: #e9ecef;
    font-weight: 600;
}

/* Status badge styling */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
}

/* Login and registration forms */
.auth-form {
    max-width: 450px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.auth-form .card-header {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    padding: 1.25rem;
}

.auth-form .form-control {
    padding: 0.75rem;
}

/* Sidebar styling */
.sidebar {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    position: sticky;
    top: 20px;
    height: fit-content;
    z-index: 1000;
}

/* Ensure main content and sidebar alignment */
.row.gx-3 {
    align-items: flex-start;
}

.position-sticky {
    position: sticky !important;
    top: 20px;
    height: fit-content;
}

.sidebar .list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.75rem 1.25rem;
}

.sidebar .list-group-item:first-child {
    border-top: none;
}

.sidebar .list-group-item:last-child {
    border-bottom: none;
}

/* Dashboard cards */
.dashboard-card {
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

.dashboard-card .card-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.dashboard-card .card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Notifications dropdown */
.notifications-dropdown {
    width: 320px;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.notifications-dropdown .dropdown-item {
    white-space: normal;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
}

.notifications-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

/* Profile page */
.profile-header {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.profile-picture {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Footer styling */
footer {
    margin-top: 3rem;
    padding: 2rem 0;
    background-color: var(--light-color);
    border-top: 1px solid #e9ecef;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-form {
        max-width: 100%;
        margin: 1rem auto;
        padding: 1.5rem;
    }
    
    .profile-picture {
        width: 80px;
        height: 80px;
    }
    
    .table-responsive {
        border-radius: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 992px) {
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .table {
        min-width: 720px;
    }
    .table th,
    .table td {
        white-space: nowrap;
    }
}

/* Print styles */
@media print {
    body {
        background-color: #fff;
    }
    
    .container {
        max-width: 100%;
    }
    
    header, nav, footer, .sidebar, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .card-header {
        background-color: #f8f9fa !important;
        color: #333 !important;
    }
}

/* Home page styling */
.hero-section {
    background-color: #fff;
    padding: 3rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.hero-section p {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.features-section {
    padding: 3rem 0;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 0.5rem;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: transform 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* DataTables customization */
.dataTables_wrapper .dataTables_length, 
.dataTables_wrapper .dataTables_filter, 
.dataTables_wrapper .dataTables_info, 
.dataTables_wrapper .dataTables_processing, 
.dataTables_wrapper .dataTables_paginate {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color);
    color: white !important;
    border: 1px solid var(--primary-color);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary-dark);
    color: white !important;
    border: 1px solid var(--primary-dark);
}
