:root {
    /* --accent-colour: #269aff;
    --accent-hover-colour: #2980B9; 
    --accent-press-colour: #275F80; */

    --accent-colour: #E5233F;
    --accent-hover-colour: #F03B55; 
    --accent-press-colour: #C71E36;

    --text-secondary-colour:rgb(93, 93, 93);

    --text-light-colour: #f4f4f4;
    --text-dark-colour: #121212;

    --success-colour: #03BD5B;
    --success-colour-hover: #14d26d;
    --success-colour-press: #07a651;
    --danger-colour: #dc3545;

}


/* ///////////////////// Primary Buttons ///////////////////// */
.btn-primary {
    background-color: var(--accent-colour) !important; 
    border-color: var(--accent-colour) !important;
}

.btn-primary:hover {
    background-color: var(--accent-hover-colour) !important;
    border-color: var(--accent-hover-colour) !important;
}

.btn-primary:active {
    background-color: var(--accent-press-colour) !important;
    border-color: var(--accent-press-colour) !important;
}

.btn-primary:visited {
    background-color:  var(--accent-press-colour);
}

/* ///////////////////// Success Buttons ///////////////////// */
.btn-success {
    background-color: var(--success-colour) !important; 
    border-color: var(--success-colour) !important;
}

.btn-success:hover {
    background-color: var(--success-colour-hover) !important;
    border-color: var(--success-colour-hover) !important;
}

.btn-success:active {
    background-color: var(--success-colour-press) !important;
    border-color: var(--success-colour-press) !important;
}

.btn-success:visited {
    background-color:  var(--success-colour-press);
}


/* /////////////////// GLOBAL ///////////////////*/

/* ///////////////////// Footer alignment ///////////////////// */
html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden; 
    background-color: #F6F6F6;
    min-height: 100vh;
}

.content {
    flex: 1; /* Allow the content area to grow */
}

/* ///////////////////// Footer Links ///////////////////// */ 
.footer a {
    text-decoration: none;  
    color: #343a40;
}

.footer a:hover,
.footer a:focus,
.footer a:active {
    color: #403434;
    text-decoration: none; 
}


/* Nav Bar  */

.sticky-top {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
}


.navbar-scrolled {
    transition: all 0.5s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 1.2);
}

.active {
    font-weight: 600 !important;
}

/* Maps */

.map-box {
    position: relative;
    max-width: 500px;
    max-height: 500px;
    width: 100%;
    height: 100%;
    margin: 10px;
    overflow: auto;
}

/* Checklists */

.checklist-container {
    background-color: white;
    padding: 1rem;
    border: var(--accent-colour) solid 1px;
    border-radius: 8px;
    width: fit-content;
}


.checklist-item p {
    color: rgb(from black r g b / 50%);
    margin: 0;
}

/* Custom map styling */
#map {
    height: 400px;  
    width: 100%;   
    border-radius: 10px;  /* Rounded corners */
    border: 2px solid #ccc;  /* Light border */
}

/* Shadow effect for map */
#map {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Full-height map for polygon drawing (project creation pages) */
.map-card {
    height: calc(100vh - 180px); /* Account for navbar, margins, and padding */
    min-height: 600px; /* Ensure minimum usable height */
}

/* Map takes most of the card height, accounting for header, instructions, and buttons */
.map-card #map {
    height: calc(100vh - 380px); /* Viewport height minus navbar, card padding, and other card content */
    min-height: 450px; /* Minimum usable height */
    width: 100%;
}

/* Custom table - using Napier branding secondary colour */
.custom-form-table thead th {
    background-color: #E5233F ;
    color: white;
}

/* Custom tables - borders on cells */
.custom-form-table th, 
.custom-form-table td {
    border: 1px solid #E5233F;
    padding: 10px;
    text-align: left;
}

/* Custom table - centre align checkboxes */
.custom-form-table .form-check-input {
    margin: 0 auto;
    display: block;
}

/* Tooltips */
.custom-tooltip {
    border: 2px solid var(--accent-colour);
    border-radius: 8px;
}



.pagination .page-item .page-link {
    color: black;
    border: 1px solid var(--accent-colour);
}



.pagination .page-item.active .page-link {
    color: white;
    background-color: var(--accent-press-colour);
    border-color: var(--accent-press-colour);
}

.pagination .page-item .page-link:hover {
    color: white;
    background-color: var(--accent-hover-colour);
    border-color: var(--accent-hover-colour);
}
input[type="checkbox"] {
    transform: scale(1.4); 
    accent-color: var(--accent-colour); 
}

/* Printing to PDF */

.print-only {
    display: none;
}

@media print {
    html, body {
        height: initial;
        margin: initial;
        overflow-x: initial;
        background-color: initial;
        min-height: initial;
    }

    .no-print, .no-print * {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }
}

.print-container hr {
    width: 100%;
    height: 0;
    border-top: 1px solid #000;
}

/* Project page */
.napier-card-header {
    background-color: var(--accent-colour); /* Napier red*/
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.napier-accordion-header {
    background-color: var(--accent-colour)  !important;
    color: white !important;
}

/* Flex wrapper inside the button */
.napier-accordion-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Left-aligned span */
.napier-accordion-text span:first-child {
    text-align: left;
}

/* Right-aligned span */
.napier-accordion-text span:last-child {
    text-align: right;
    margin-left: auto;
}

/* Accordian arrow colour white */
.accordion-button::after {
    filter: brightness(0) invert(1);
}

/* Bullet points for project timeline items */
.napier-bullet-list,
.napier-bullet-sublist {
    list-style: none;
    padding-left: 0;
}

.napier-bullet-list li,
.napier-bullet-sublist li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.napier-bullet-list li::before {
    content: "•";
    color: var(--accent-colour);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0.5rem;
    font-size: 2rem;
    transform: translateY(-50%);
}

.napier-bullet-sublist li::before {
    content: "◦"; 
    color: var(--accent-colour);
    position: absolute;
    left: 0;
    top: 0.72rem;
    font-size: 2rem;
    transform: translateY(-50%);
}

.icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* ==================== Dropzone Custom Styling ==================== */

/* Dropzone container */
#flightLogDropzone {
    border: 2px dashed #0d6efd;
    border-radius: 8px;
    background: #f8f9fa;
    min-height: 200px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Dropzone on drag hover */
#flightLogDropzone.dz-drag-hover {
    border-color: #0dcaf0;
    background: #e7f3ff;
    box-shadow: 0 0 10px rgba(13, 202, 240, 0.3);
}

/* Dropzone message (initial state) */
.dropzone .dz-message {
    margin: 2em 0;
    text-align: center;
}

/* File previews */
.dropzone .dz-preview {
    margin: 10px;
    min-height: 80px;
}

/* File preview thumbnail area */
.dropzone .dz-preview .dz-image {
    border-radius: 5px;
    overflow: hidden;
    width: 80px;
    height: 80px;
    position: relative;
    display: block;
    z-index: 10;
}

/* Remove link styling */
.dropzone .dz-preview .dz-remove {
    font-size: 12px;
    text-align: center;
    display: block;
    cursor: pointer;
    border: none;
    color: #dc3545;
    margin-top: 5px;
}

.dropzone .dz-preview .dz-remove:hover {
    text-decoration: underline;
}

/* File details */
.dropzone .dz-preview .dz-details {
    opacity: 1;
    padding: 5px;
}

.dropzone .dz-preview .dz-filename {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Progress bar styling */
.upload-progress {
    margin-top: 20px;
}

.upload-progress .progress {
    height: 30px;
}

.upload-progress .progress-bar {
    font-size: 14px;
    line-height: 30px;
}

/* Results table styling */
.upload-results {
    margin-top: 20px;
}

.upload-results .status-success {
    color: #198754;
    font-weight: 600;
}

.upload-results .status-failed {
    color: #dc3545;
    font-weight: 600;
}

/* Success/Error badges */
.badge.bg-success {
    background-color: var(--success-colour) !important;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    #flightLogDropzone {
        min-height: 150px;
        padding: 15px;
    }

    .dropzone .dz-preview {
        margin: 5px;
    }
}

/* ============================================================================
   Flight Visualization Map Styles
   ============================================================================ */

/* Map legend container */
.info.legend {
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    line-height: 20px;
    max-width: 250px;
}

.info.legend h6 {
    margin: 0 0 10px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.info.legend h6 small {
    font-weight: normal;
    color: #6c757d;
    font-size: 11px;
}

/* Interactive legend items */
.info.legend .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    padding: 3px;
    border-radius: 3px;
    transition: background-color 0.2s, opacity 0.2s;
}

.info.legend .legend-item:hover {
    background-color: #f0f0f0;
}

.info.legend .legend-item span:first-child {
    display: inline-block;
    width: 20px;
    height: 18px;
    margin-right: 8px;
    opacity: 0.4;
    border: 1px solid #999;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info.legend .legend-label {
    flex-grow: 1;
    font-size: 13px;
}

.info.legend .legend-eye {
    margin-left: auto;
    color: #28a745;
    font-size: 14px;
    transition: color 0.2s;
}

.info.legend .legend-item .fa-eye-slash {
    color: #dc3545;
}

/* Custom marker styles */
.poi-marker,
.aerodrome-marker {
    background: none !important;
    border: none !important;
}

/* Map container for consistent sizing */
.flight-viz-map-container {
    position: relative;
    width: 100%;
}

/* Leaflet popup customization */
.leaflet-popup-content {
    margin: 10px;
    line-height: 1.4;
}

.leaflet-popup-content strong {
    color: #495057;
}

.leaflet-popup-content hr {
    margin: 8px 0;
    border-top: 1px solid #dee2e6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .info.legend {
        max-width: 200px;
        font-size: 12px;
    }

    .info.legend .legend-label {
        font-size: 12px;
    }
}

/* Loading state for map */
.map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #f8f9fa;
    border-radius: 5px;
}

.map-loading i {
    font-size: 48px;
    color: var(--accent-colour);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
