/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    background-color: #f5f5f5;
    font-family: 'Arial', sans-serif;
    font-size: 0.9rem; /* Moved from base.html */
}

.installed-packages-list {
    text-align: left;
    font-size: 12px;
    padding-left: 10px;
    margin-top: 5px;
    color: inherit;
    list-style-type: none;
    max-height: 100px;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Navbar Styling */
.navbar {
    background-color: #333; /* Dark grey background */
    color: white;
    padding: 15px 0;
    width: 250px; /* Fixed width for the navbar */
    position: fixed; /* Stays on top even when scrolling */
    top: 0;
    left: 0;
    z-index: 1000; /* Ensure it stays on top */
    overflow-x: hidden; /* Hide horizontal overflow */
    height: 100%; /* Make navbar take full height */
    display: flex; /* Use flexbox for internal layout */
    flex-direction: column; /* Stack items vertically */
    align-items: flex-start; /* Align items to the left */
    border-right: 1px solid #dee2e6; /* Added from base.html */
}

.navbar .container {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    justify-content: flex-start; /* Align items to the top */
    align-items: flex-start; /* Align items to the left */
    width: 100%; /* Allow container to take full width of navbar */
    margin: 0; /* Remove auto margin */
    padding: 0 10px; /* Add some padding for spacing */
    background-color: transparent; /* Remove white bar */
    height: 100%; /* Make container take full height of navbar */
    overflow-y: auto; /* Allow vertical scrolling if content overflows */
}

.navbar-brand {
    font-size: 1.2rem; /* Adjusted from 18px and 1.2rem in base.html */
    font-weight: bold;
    transition: all 0.3s ease;
    margin-bottom: 20px; /* Add space below brand */
    padding: 0 10px; /* Add padding to match other items */
    width: 100%; /* Ensure brand takes full width */
    white-space: nowrap; /* Moved from base.html */
    overflow: hidden; /* Moved from base.html */
    text-overflow: ellipsis; /* Moved from base.html */
}

.navbar-datetime {
    font-size: 18px;
    white-space: nowrap;
    padding: 0 10px; /* Add padding to match other items */
    width: 100%; /* Ensure it takes full width */
}

.next-update-times {
    font-size: 12px;
    text-align: left; /* Align text to the left */
    white-space: nowrap;
    width: 100%; /* Ensure it takes full width */
    padding: 0 10px; /* Add padding to match other items */
}

.update-time {
    font-weight: bold;
}

/* Updated Navbar Links Styling */
.navbar-links {
    display: flex;
    flex-direction: column; /* Stack links vertically */
    gap: 10px; /* Reduce gap between links */
    align-items: flex-start; /* Align links to the left */
    width: 100%; /* Ensure links take full width */
    padding: 10px 0; /* Add vertical padding for the links section */
}

.navbar-links .dropdown-toggle { /* Moved from base.html */
    color: white !important;
    text-decoration: none !important;
}

.nav-link {
    color: white; /* Removed !important */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s; /* Added color to transition */
    font-size: 14px;
    position: relative; /* Added for tooltip positioning */
    width: 100%; /* Ensure link takes full width */
    box-sizing: border-box; /* Include padding in width calculation */
    white-space: normal; /* Allow text to wrap */
    padding: 0.5rem 0.75rem; /* Adjusted from base.html */
    font-size: 0.9rem; /* Adjusted from base.html */
    margin-bottom: 2px; /* Adjusted from base.html */
    overflow: hidden; /* Adjusted from base.html */
    text-overflow: ellipsis; /* Adjusted from base.html */
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link i {
    font-size: 20px; /* Made icons slightly larger */
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Nav link text styling */
.nav-link .nav-link-text {
    display: inline-block;
    white-space: normal; /* Allow text to wrap */
    font-size: 14px;
    color: white;
    margin-left: 5px;
    flex-grow: 1; /* Allow text to grow and take available space */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Add ellipsis for overflowing text */
    white-space: nowrap; /* Adjusted from base.html */
    opacity: 1; /* Adjusted from base.html */
    transition: opacity 0.3s ease; /* Adjusted from base.html */
    overflow: visible; /* Adjusted from base.html */
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Slightly darker on hover */
    color: white; /* Ensure text remains white on hover */
}

/* Style for active nav link */
.nav-link.active {
    background-color: #0d6efd; /* A distinct color for active link */
    color: white;
}

/* Ensure text color is readable on light backgrounds, if applicable */
.navbar-links .nav-link {
    color: white; /* Default text color for nav links */
}

/* If a nav link somehow gets a light background, ensure text is dark */
.navbar-links .nav-link[style*="background-color"]:not([style*="background-color: transparent"]) {
    color: #333; /* Dark text for light backgrounds */
}

/* Specific style for active nav link text to ensure readability */
.nav-link.active .nav-link-text {
    color: white; /* Ensure text is white for active links */
}

/* Styles for Bootstrap tabs to ensure readable text */
.nav-tabs .nav-link {
    color: #495057; /* Default text color for inactive tabs (dark gray) */
}

.nav-tabs .nav-link.active {
    color: #0d6efd; /* Text color for active tab (Bootstrap primary blue) */
    background-color: #fff; /* White background for active tab */
    border-color: #dee2e6 #dee2e6 #fff; /* Border to make it look like a tab */
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6; /* Lighter border on hover */
}

/* For badges within tabs (like "open taken", "voltooide taken") */
.nav-tabs .nav-link .badge {
    color: white; /* Ensure badge text is white */
}

/* Remove old button styling */
.btn-nav {
    display: none;
}

/* Main content area */
.main-content {
    margin-left: 250px; /* Push content to the right of the fixed navbar */
    width: calc(100% - 250px); /* Adjust width to account for navbar */
    padding: 100px 20px 20px; /* Add space for fixed navbar and general padding */
    transition: margin-left 0.3s ease, width 0.3s ease; /* Moved from base.html */
    min-width: 75%; /* Adjusted from 80% to give more room */
}

/* General container styling within main-content */
.container {
    padding-left: 10px; /* Moved from base.html */
    padding-right: 10px; /* Moved from base.html */
    width: 100%; /* Ensure it takes full width of main-content */
    margin-left: 0; /* Reset margin for containers within main-content */
}

/* Specific styling for .bi icons */
.bi { /* Moved from base.html */
    display: inline-block;
    vertical-align: -0.125em;
}

/* Page Title */
.page-title {
    font-size: 32px;
    margin-bottom: 20px;
    text-align: center;
}

/* Section Title */
.section-title {
    font-size: 24px;
    margin: 10px 0 5px 0; /* Further reduced top and bottom margin */
    color: #333;
}

/* Form Styling */
.form-section {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.form-input:focus {
    border-color: #007bff;
    outline: none;
}

/* Submit Button Styling */
.submit-group {
    text-align: center;
}

/* Standard Button Styling - Based on Bootstrap 5.3+ */
.btn {
    padding: 0.375rem 0.75rem; /* Standard Bootstrap padding */
    font-size: 0.875rem; /* Consistent font size */
    border-radius: 0.25rem; /* Standard Bootstrap border radius */
    border: none;
    cursor: pointer;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    line-height: 1.5;
    font-weight: 400;
}

/* Primary button - blue */
.btn-primary {
    background-color: #0d6efd;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0b5ed7;
}

/* Secondary button - gray */
.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5c636a;
}

/* Light button - light gray */
.btn-light {
    background-color: #f8f9fa;
    color: #000;
}

.btn-light:hover {
    background-color: #e2e6ea;
}

/* Dark button - dark gray */
.btn-dark {
    background-color: #212529;
    color: #fff;
}

.btn-dark:hover {
    background-color: #1a1e21;
}

/* Website List Styling */
.list-group {
    margin-top: 20px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 10px;
}

.inline-form {
    margin: 0;
}

/* Status Cards Styling */
.status-cards {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: space-between;
}

.status-cards .card {
    flex: 1;
    padding: 10px 15px;
    margin: 0;
    min-width: 0; /* Allow cards to shrink below their content size */
}

.status-cards .minimal-info {
    justify-content: space-between;
    padding: 0;
}

.stat-label {
    font-size: 14px;
    font-weight: bold;
}

.stat-count {
    font-size: 18px;
    font-weight: bold;
}

/* Card Background Colors */
.bg-success {
    background-color: #28a745;
    color: white;
}

.bg-warning {
    background-color: #ffc107;
    color: #fff;
}

.bg-danger {
    background-color: #dc3545;
    color: white;
}

.alert {
    color: #ff0000;
    font-weight: bold;
}

/* Login Page Styling */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
}

.login-box {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

/* Status Badges */
.badge {
    padding: 8px 12px;
    font-weight: 500;
    font-size: 12px;
}

/* Success button - green */
.btn-success {
    background-color: #198754;
    color: #fff;
    border: none;
}

.btn-success:hover {
    background-color: #157347;
}

/* Danger button - red */
.btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #bb2d3b;
}

/* Warning button - yellow */
.btn-warning {
    background-color: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background-color: #ffca2c;
}

/* Info button - cyan */
.btn-info {
    background-color: #0dcaf0;
    color: #000;
}

.btn-info:hover {
    background-color: #31d2f2;
}

/* Button size variations */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.2rem;
}

.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.3rem;
}

/* Action buttons */
.btn-action {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Icon-only buttons */
.btn-icon {
    width: auto;
    height: auto;
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    text-align: center;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #495057;
    border-color: #495057;
}

/* Incident-style action buttons */
.incident-actions {
    display: flex;
    gap: 5px;
}

.incident-actions .btn-link {
    color: inherit;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
    background-color: transparent;
}

.incident-actions .btn-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.incident-actions .btn-link.text-primary {
    color: #0d6efd !important;
}

.incident-actions .btn-link.text-success {
    color: #198754 !important;
}

.incident-actions .btn-link.text-danger {
    color: #dc3545 !important;
}

.incident-actions .btn-link.text-warning {
    color: #ffc107 !important;
}

.incident-actions .btn-link.text-secondary {
    color: #6c757d !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0; /* Remove margin for smaller screens */
        width: 100%; /* Take full width */
        padding: 15px; /* Adjust padding */
    }
    .navbar {
        width: 100%; /* Full width navbar */
        height: auto; /* Auto height */
        position: relative; /* Not fixed */
        border-right: none; /* Remove border */
        border-bottom: 1px solid #dee2e6; /* Add bottom border */
    }
    .navbar .container {
        flex-direction: row; /* Row direction for smaller screens */
        flex-wrap: wrap; /* Allow wrapping */
        justify-content: center; /* Center items */
        padding: 10px;
    }
    .navbar-brand, .navbar-datetime, .next-update-times {
        width: auto; /* Auto width */
        padding: 5px; /* Adjust padding */
        text-align: center;
    }
    .navbar-links {
        flex-direction: row; /* Row direction for links */
        flex-wrap: wrap; /* Allow wrapping */
        justify-content: center; /* Center links */
        padding: 5px;
    }
    .nav-link {
        width: auto; /* Auto width for links */
        white-space: nowrap; /* Prevent wrapping for individual links */
        font-size: 0.8rem; /* Smaller font size */
        padding: 5px 8px; /* Adjust padding */
    }
    .nav-link .nav-link-text {
        display: none; /* Hide text on small screens */
    }
    .nav-link i {
        font-size: 18px; /* Adjust icon size */
    }
    .status-cards {
        flex-wrap: wrap;
    }
    .status-cards .card {
        flex: 1 1 45%;
    }
    .page-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .status-cards .card {
        flex: 1 1 100%;
    }
}

.bg-primary {
    background-color: #007bff;
    color: white;
}

.card .url {
    font-size: 12px;
    word-break: break-all;
    margin-top: 5px;
}

.section-title {
    margin-top: 30px;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.card {                                                                        
     background-color: #f8f9fa;                                                                                                          
     border-radius: 6px;                                                        
     box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);                                  
     text-align: center; /* This centers the card content by default */                                                        
     text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);                               
     font-size: 15px;                                                                                
     box-sizing: border-box; /* Include padding in the width calculation */
}

/* Override text alignment for card bodies where left alignment is desired */
.card-body {
    text-align: left;
}

.card h3 {
    margin-bottom: 10px;
    font-size: 16px; /* Reduce font size */
}

.card h3.url {
    font-size: 14px; /* Smaller font size for URLs */
}

.card p {
    margin-bottom: 8px;
    font-size: 14px; /* Reduce font size */
}

/* Footer Styling */
.footer {
    background-color: #f8f9fa;
    padding: 10px 0;
    text-align: center; /* Ensures the text is centered */
    position: relative; /* Use relative positioning to avoid issues */
    width: 100%;
    bottom: 0;
    left: 0;
}

.footer p {
    margin: 0;
    color: #333;
    font-size: 14px;
    text-align: center; /* Center the text horizontally */
}
/* Button with icons */
.btn i {
    margin-right: 0.25rem;
}

/* New style for configuration management button */
.btn-config-management {
    background-color: #6f42c1; /* Purple color */
    color: white;
}

.btn-config-management:hover {
    background-color: #5a359a; /* Darker purple */
}

.btn-icon-only i {
    margin-right: 0;
}

/* Button group styling */
.btn-group {
    display: inline-flex;
}

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

.btn-group .btn:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* Custom buttons */
.btn-edit {
    background-color: #fd7e14; /* Bootstrap orange */
    color: white;
    border: none;
    margin-left: 10px;
}

.btn-edit:hover {
    background-color: #e76b00; /* Darker orange */
}

/* Edit User Form */
#edit-user-form {
    display: none;
    margin-top: 20px;
}

/* List Item */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-size: 16px;
    line-height: 1.5;
    font-family: 'Arial', sans-serif;
    overflow-x: hidden; /* Disable horizontal scrolling */
    white-space: normal; /* Allow text to wrap */
}

/* Inline Form */
.inline-form {
    margin: 0;
}
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}
/* Outline buttons */
.btn-outline-primary {
    color: #0d6efd;
    border: 1px solid #0d6efd;
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #0d6efd;
}

.btn-outline-secondary {
    color: #6c757d;
    border: 1px solid #6c757d;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
}

.btn-outline-success {
    color: #198754;
    border: 1px solid #198754;
    background-color: transparent;
}

.btn-outline-success:hover {
    color: #fff;
    background-color: #198754;
}

.btn-outline-danger {
    color: #dc3545;
    border: 1px solid #dc3545;
    background-color: transparent;
}

.btn-outline-danger:hover {
    color: #fff;
    background-color: #dc3545;
}

/* ISO Control Specific Styles */
.iso-control-card {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.iso-control-card .card-header {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.iso-control-card .card-body {
    padding: 15px;
}

.iso-control-card .card-footer {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85em;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.iso-control-card .status-badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
}

.status-not_implemented { background-color: #dc3545; } /* Red */
.status-partially_implemented { background-color: #ffc107; } /* Yellow */
.status-implemented { background-color: #28a745; } /* Green */
.status-not_applicable { background-color: #6c757d; } /* Grey */

.revision-history-table th, .revision-history-table td {
    vertical-align: top;
    padding: 8px;
    border: 1px solid #dee2e6;
}

.revision-history-table th {
    background-color: #e9ecef;
}

.revision-history-table pre {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    white-space: pre-wrap; /* Allows text to wrap */
    word-break: break-word; /* Breaks long words */
}

/* Style for survey description to preserve whitespace */
.survey-description p {
    white-space: pre-wrap;
}

/* New style for control descriptions */
.control-description {
    white-space: pre-wrap; /* Preserves whitespace and wraps text */
}
