body {
    background-color: #273C4E; /* Blue background */
    font-family: Arial, sans-serif;
    color: #FFFFFF; /* White text */
    margin: 0;
    padding: 0;
}

.container {
    width: 95%;
    margin: 0 auto;
    padding-top: 50px;
  
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 1em;
    text-align: left;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    background-color: #004161; /* Blue background for table */
    color: #FFFFFF; /* White text for table */
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dddddd;
}

.styled-table thead tr {
    background-color: #004488; /* Darker blue for the table header */
    color: #FFFFFF; /* White text for header */
}

.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #005599; /* Lighter blue for alternate rows */
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid #009879;
}

h1, a {
    color: #FFFFFF; /* White color for links and headings */
}

input[type="text"], input[type="email"], button {
    background-color: white; /* White background for inputs */
    color: blue; /* Blue text for contrast */
}

a {
    color: white; /* White links */
}

a:hover {
    color: lightgray; /* Hover effect for links */
}

.cell-with-breaks {
    white-space: pre-line;
    word-break: break-word;
    margin-bottom: 5px; /* Reduced margin */
}

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #061D26; /* Dark blue background for navbar */
    padding: 10px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar h2 {
    margin: 0;
    color: white;
}

/* Right-side content in the navbar */
.navbar-right {
    display: flex;
    align-items: center;
    position: absolute;
    right: 100px; /* Exactly 10 pixels from the right edge of the window */
}

/* Dropdown button */
.dropbtn {
    background-color: #004161; /* blue button */
    color: white;
    padding: 10px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

/* Dropdown content (hidden by default) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9; /* Light background for dropdown */
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    right: 20px;
    top: 40px;
}

/* Links inside dropdown */
.dropdown-content a {
    color: black; /* Black text in dropdown */
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    background-color: white;
}

/* Hover effect for links in dropdown */
.dropdown-content a:hover {
    background-color: #ddd;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Style for the dropdown button on hover */
.dropdown:hover .dropbtn {
    background-color: #3e8e41;
}

/* Adding padding to container to avoid overlap with navbar */
.container {
    padding-top: 100px; /* To avoid the navbar overlapping with the content */
}

/* Card Component */
.card {
    background-color: #004161; /* Blue background for card */
    color: #FFFFFF; /* White text for card */
    margin-bottom: 10px; /* Reduced margin */
}

.card-body {
    padding: 10px; /* Reduced padding */
}

.card-title {
    color: #FFFFFF; /* White text for card title */
}

/* Remove the global alert color override to preserve Bootstrap's contrast-friendly defaults */

.document-summary {
    display: flex;
    align-items: flex-start;
}

.inner-table {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.inner-table img {
    margin-right: 10px; /* Add some space between the image and the text */
}

.document-info {
    flex: 1;
}


/* Sticky Search Bar */
.search-bar-container {
    position: fixed;
    top: 56px; /* Height of the navbar */
    width: 100%;
    background-color: #273C4E; /* Match the background color */
    padding: 10px 0;
    z-index: 1000; /* Ensure it stays above other content */
}

/* Adjust the main content container to add padding at the top */
.container.mt-5 {
    padding-top: 90px; /* Height of the navbar + search bar */
}

/* Center the add event form */
.add-event-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.add-event-form {
    background: #004161;
    padding: 32px 24px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 400px;
}

.add-event-form label {
    font-weight: 600;
    color: #fff;
}

.add-event-form input[type="text"],
.add-event-form input[type="url"],
.add-event-form input[type="date"],
.add-event-form input[type="file"],
.add-event-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 10px;
    background: #fff;
    color: #004161;
}


.add-event-form button[type="submit"] {
    background: #0078d4;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 18px 0;           /* Increased vertical padding */
    font-size: 1.25rem;        /* Larger font size */
    font-weight: bold;
    cursor: pointer;
    margin-top: 18px;          /* More space above */
    transition: background 0.2s;
    width: 100%;               /* Make button full width */
    letter-spacing: 1px;       /* Optional: more readable */
}
.add-event-form button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.add-event-form button[type="submit"]:hover {
    background: #005fa3;
}

.add-event-form h2 {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}

 .label-type-group { margin-bottom: 1em; }
        .label-buttons { display: flex; flex-wrap: wrap; gap: 0.5em; }
        .label-btn {
            cursor: pointer;
            border: 1px solid #888;
            border-radius: 4px;
            padding: 0.3em 0.8em;
            background: #222;
            color: #fff;
            user-select: none;
            transition: background 0.2s, border 0.2s;
        }
        .label-btn.selected, .label-btn input:checked + span {
            background: #4caf50;
            border-color: #388e3c;
            color: #fff;
        }
        .label-btn input { display: none; }

/* Admin consent specific styles for better contrast */
.admin-consent .card-body {
    background-color: #f8f9fa;
    color: #212529;
}

.admin-consent .form-group label {
    color: #212529;
}

.admin-consent .form-text.text-muted {
    color: #6c757d !important;
}

.admin-consent .alert {
    /* Let Bootstrap handle alert colors for proper contrast */
}

/* Consent agreement specific styles for better contrast */
.consent-content {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.consent-content h1, .consent-content h2, .consent-content h3, 
.consent-content h4, .consent-content h5, .consent-content h6 {
    color: #212529 !important;
}

.consent-content p, .consent-content li, .consent-content strong, 
.consent-content ul, .consent-content ol {
    color: #212529 !important;
}

.consent-content .default-consent {
    color: #212529 !important;
}

.consent-content .default-consent * {
    color: #212529 !important;
}

/* ============================================
   ADMIN EVENT MANAGEMENT STYLES
   ============================================ */

/* Admin Events List Page */
.admin-events-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-events-container body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    color: #333;
}

.admin-events h1 {
    color: #333;
    margin-bottom: 30px;
}

.admin-events .controls {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.admin-events .control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-events label {
    font-weight: bold;
    color: #555;
}

.admin-events input, .admin-events select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: white;
}

.admin-events button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    height: fit-content;
}

.admin-events button:hover {
    background-color: #0056b3;
}

.admin-events .btn-success {
    background-color: #28a745;
    text-decoration: none;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    color: white;
}

.admin-events .btn-success:hover {
    background-color: #1e7e34;
    text-decoration: none;
    color: white;
}

.admin-events .btn-danger {
    background-color: #dc3545;
    font-size: 12px;
    padding: 4px 8px;
}

.admin-events .btn-danger:hover {
    background-color: #c82333;
}

.admin-events .table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.admin-events table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: white;
}

.admin-events th, .admin-events td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    color: #333;
}

.admin-events th {
    background-color: #f8f9fa;
    font-weight: bold;
    position: sticky;
    top: 0;
}

.admin-events tr:hover {
    background-color: #f5f5f5;
}

.admin-events .status-upcoming {
    color: #28a745;
    font-weight: bold;
}

.admin-events .status-ongoing {
    color: #ffc107;
    font-weight: bold;
}

.admin-events .status-completed {
    color: #6c757d;
    font-weight: bold;
}

.admin-events .status-cancelled {
    color: #dc3545;
    font-weight: bold;
}

.admin-events .categories {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 12px;
    margin: 1px;
    display: inline-block;
}

.admin-events .pagination {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    align-items: center;
}

.admin-events .edit-btn {
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.admin-events .edit-btn:hover {
    background-color: #545b62;
    text-decoration: none;
    color: white;
}

.admin-events .intern-badge {
    background-color: #17a2b8;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
}

.admin-events .external-badge {
    background-color: #fd7e14;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
}

.admin-events .nav-links {
    margin-bottom: 20px;
}

.admin-events .nav-links a {
    color: #007bff;
    text-decoration: none;
    margin-right: 15px;
}

.admin-events .nav-links a:hover {
    text-decoration: underline;
}

/* Admin Event Edit/New Pages */
.admin-event-edit {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    color: #333;
}

.admin-event-edit .form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.admin-event-edit .form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.admin-event-edit .form-section h3 {
    margin-top: 0;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
}

.admin-event-edit .form-group {
    margin-bottom: 20px;
}

.admin-event-edit .form-group.full-width {
    grid-column: 1 / -1;
}

.admin-event-edit label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #495057;
}

.admin-event-edit .required {
    color: #dc3545;
}

.admin-event-edit input, .admin-event-edit select, .admin-event-edit textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    color: #333;
    background-color: white;
}

.admin-event-edit textarea {
    height: 100px;
    resize: vertical;
}

.admin-event-edit input[type="datetime-local"] {
    font-family: inherit;
}

.admin-event-edit input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.admin-event-edit .checkbox-group {
    display: flex;
    align-items: center;
}

.admin-event-edit .checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

.admin-event-edit .btn-secondary {
    background-color: #6c757d;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
}

.admin-event-edit .btn-secondary:hover {
    background-color: #545b62;
    text-decoration: none;
    color: white;
}

.admin-event-edit .btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    text-decoration: none;
    display: inline-block;
}

.admin-event-edit .btn-primary:hover {
    background-color: #0056b3;
    text-decoration: none;
    color: white;
}

.admin-event-edit .btn-success {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    text-decoration: none;
    display: inline-block;
}

.admin-event-edit .btn-success:hover {
    background-color: #1e7e34;
    text-decoration: none;
    color: white;
}

/* Admin Event Edit Form Buttons */
.admin-event-edit button[type="submit"] {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
}

.admin-event-edit button[type="submit"]:hover {
    background-color: #0056b3;
}

.admin-event-edit .btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.admin-event-edit .btn-danger:hover {
    background-color: #c82333;
}



.score-1, .score-2, .score-3 {
    background-color: #dc3545;
    color: white;
}

.score-4, .score-5, .score-6 {
    background-color: #ffc107;
    color: black;
}

.score-7, .score-8, .score-9, .score-10 {
    background-color: #28a745;
    color: white;
}

.summary-preview {
    max-width: 300px;
    font-size: 13px;
    line-height: 1.3;
    color: #666;
}

/* Upload Form Styles */
.upload-form {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
}

.upload-form input[type="file"] {
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px;
    width: 100%;
}

.upload-form .help-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

/* Event Image Styles */
.current-image {
    margin-bottom: 20px;
}

.current-image label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.image-preview img {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-event-edit input[type="file"] {
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px;
    width: 100%;
}

.admin-event-edit input[type="file"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.admin-event-edit .event-info {
    background: #e9ecef;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.admin-event-edit .event-info p {
    margin: 5px 0;
    color: #495057;
}

.admin-event-edit .categories-input {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px;
    background: white;
}

.admin-event-edit .categories-help {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.admin-event-edit .help-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.admin-event-edit .status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.admin-event-edit .status-upcoming { 
    background: #d1ecf1; 
    color: #0c5460; 
}

.admin-event-edit .status-ongoing { 
    background: #fff3cd; 
    color: #856404; 
}

.admin-event-edit .status-completed { 
    background: #d4edda; 
    color: #155724; 
}

.admin-event-edit .status-cancelled { 
    background: #f8d7da; 
    color: #721c24; 
}

/* Admin Flash Messages */
.admin-flash-messages {
    margin: 20px 0;
}

.admin-flash-messages .alert {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.admin-flash-messages .alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.admin-flash-messages .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design for Admin Pages */
@media (max-width: 768px) {
    .admin-event-edit .form-container {
        grid-template-columns: 1fr;
    }
}

/* Consent Content Scrollbar Styling */
.consent-scrollable {
    max-height: 400px;
    overflow-y: scroll ; /* Force scrollbar to always show */
    border: 1px solid #dee2e6;
    padding: 15px;
    background-color: #f8f9fa;
    /* Enhanced scrollbar visibility */
    scrollbar-width: thin;
    scrollbar-color: #007bff #e9ecef;
    /* Force hardware acceleration for smoother scrolling in Safari */
    -webkit-overflow-scrolling: touch;
}

/* Webkit browsers (Chrome, Safari, Edge) scrollbar styling */
.consent-scrollable::-webkit-scrollbar {
    width: 14px; /* Slightly wider for better visibility */
    -webkit-appearance: none; /* Remove default Safari styling */
}

.consent-scrollable::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 8px;
    /* Add shadow for more definition */
    box-shadow: inset 0 0 3px rgba(0,0,0,0.1);
}

.consent-scrollable::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #007bff 0%, #0056b3 100%);
    border-radius: 8px;
    border: 2px solid #e9ecef;
    /* Add more visual definition */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    min-height: 30px; /* Minimum thumb size for easier grabbing */
}

.consent-scrollable::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0056b3 0%, #004085 100%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.consent-scrollable::-webkit-scrollbar-thumb:active {
    background: #004085;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

/* Safari-specific fixes */
.consent-scrollable::-webkit-scrollbar-corner {
    background: #e9ecef;
}

/* ============================================
   DATABASE ENVIRONMENT INDICATOR STYLES
   ============================================ */

.database-environment-footer {
    position: fixed;
    bottom: 0;
    right: 20px;
    z-index: 1000;
}

.db-env-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px 20px 0 0;
    font-size: 12px;
    font-weight: bold;
    color: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    border-bottom: none;
    min-width: 140px;
    justify-content: center;
}

.db-env-indicator i {
    font-size: 14px;
}

/* Environment-specific colors */
.env-local {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: rgba(255,255,255,0.4);
}

.env-test {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    border-color: rgba(255,255,255,0.4);
}

.env-heroku-test {
    background: linear-gradient(135deg, #fd7e14, #ffc107);
    border-color: rgba(255,255,255,0.4);
}

.env-heroku-production {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    border-color: rgba(255,255,255,0.5);
    animation: pulse-red 2s infinite;
    box-shadow: 0 -2px 15px rgba(220, 53, 69, 0.4);
}

.env-test-superuser {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    border-color: rgba(255,255,255,0.4);
}

.env-unknown {
    background: linear-gradient(135deg, #6c757d, #495057);
    border-color: rgba(255,255,255,0.3);
}

/* Pulse animation for production environments */
@keyframes pulse-red {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 -2px 15px rgba(220, 53, 69, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 -2px 20px rgba(220, 53, 69, 0.6);
    }
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .database-environment-footer {
        right: 10px;
    }
    
    .db-env-indicator {
        padding: 6px 12px;
        font-size: 11px;
        min-width: 120px;
    }
    
    .db-env-indicator i {
        font-size: 12px;
    }
}

/* Hide on very small screens to avoid clutter */
@media (max-width: 480px) {
    .database-environment-footer {
        display: none;
    }
}