@font-face {
    font-family:'BC Sans';
    src: url('https://github.com/bcgov/bc-sans/blob/master/css/BC_Sans.css');
    font-style: normal/italic;
    font-weight: normal/bold;
}

/* Basic reset and fonts */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    --accent: #E3A82B;
    --primary-dark: #294780;
    --primary-light: #F2F2F2;
    --secondary: #7498CE;
}

html {
    height: 100%;
    }
body {
    min-height: 100%;
    }

/* body */
body {
    font-family: 'BC Sans';
    line-height: 1.6;
    background-color: #ffffff;
    padding-bottom: 5px;
    border-bottom: 6.5px solid #ffc017;
}


/* header */
.header {
    display: inline-flex;
    flex-flow: row nowrap;
    align-items: center;
    position:fixed;
    gap:15px;
    top: 0;
    right: 0;
    left: 0;
    z-index: 999;
    padding: 10px;
    background-color: var(--primary-dark);
    border-bottom: solid 2px var(--accent);
    height:100px;
}

.logo {
    background-repeat: no-repeat;
    background-size:contain;
    background-position:0% 50%;
    height:100%;
    max-width: 175px;
    min-width:130px;
    width:30%;
    flex: 1 1 auto;
}

.title {
    width: auto;
    height: auto;
    text-wrap:nowrap;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    flex: 1 1 auto;
}

.navbar {
    
    width: 100%;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    flex: -1 1 auto;
}
.navbar li {
    margin-left: 20px; 
    font-size: 1rem; 
    font-weight: bold;
    color: white;
}



/* Banner */
.banner {
    position: relative;
    background-color: var(--primary-dark);
    background-image: url(../static/CCRD_BellaCoola.jpg);
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: 0% 0%;
    width: 100%;
    height: 400px;
    text-align: center;
    padding: 50px;
    font-size: 2.5rem;
}

.banner-title {
    position: absolute;
    margin: 0px auto;
    display: block;
    height: 150px;
    width: 350px;
    bottom: 0px;
    left: 0px;
    background-color: var(--secondary);
    background-color: rgba(116, 152, 206, 0.8);
    border-radius: 0px 30px 0px 0px;
    border-top: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    padding: 10px 25px 5px 5px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    text-align: center;
}

.banner-title p {
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Navigation */

/* Dropdown Button */
.dropbtn {
    background-color: transparent;
    color: var(--primary-light);
    padding: 16px;
    font-size: 18px;
    font-weight: normal;
    border: none;
    font-family:'BC Sans';
    }

  /* The container <div> - needed to position the dropdown content */
    .dropdown {
    position: relative;
    display: inline-block;
    }

  /* Dropdown Content (Hidden by Default) */
    .dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--primary-dark);
    border: 1px solid var(--primary-light);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    }
  /* Links inside the dropdown */
    .dropdown-content a {
    color: var(--primary-light);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: normal;
    font-family:'BC Sans';
    font-size:18px;
    }

  /* Change color of dropdown links on hover */
    .dropdown-content a:hover {background-color: var(--accent);}

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

  /* Change the background color of the dropdown button when the dropdown content is shown */
    .dropdown:hover .dropbtn {border-bottom:2px solid var(--primary-light)}

@media screen and (max-width: 800px) {
    .title {
        text-wrap:wrap;
        line-height:100%;
        height: auto;
        min-width:120px;
        margin-left: 10px;
        justify-content: left;
        font-size: 3vw;
        font-weight: bold;
        color: #fff;
        flex: 1 1 auto;
    }

    .dropbtn {
        background-color: transparent;
        color: var(--primary-light);
        padding: 16px;
        font-size: 2.5vw;
        font-weight: normal;
        border: none;
    }

    .dropdown-content a {
        color: var(--primary-light);
        padding: 12px 16px;
        text-decoration: none;
        display: block;
        font-weight: normal;
        font-family:'BC Sans';
        font-size:2.5vw;
    }
}

@media screen and (max-width: 600px) {
    .title {
        text-wrap:wrap;
        line-height:100%;
        min-width:120px;
        height: auto;
        margin-left: 10px;
        justify-content: left;
        font-size: 15px;
        font-weight: bold;
        color: #fff;
        flex: 1 1 auto;
    }

    .logo {
        background-image:url(../static/BCID_V_rgb_rev.png);
        background-repeat: no-repeat;
        background-size:contain;
        background-position:0% 50%;
        height:100%;
        max-width: 170px;
        min-width:80px;
        width:30%;
        flex: 1 1 auto;
    }

    .dropbtn {
        background-color: transparent;
        color: var(--primary-light);
        padding: 16px;
        font-size: 15px;
        font-weight: normal;
        border: none;
    }

    .dropdown-content {
        display: none;
        position: absolute;
        background-color: var(--primary-dark);
        border: 1px solid var(--primary-light);
        min-width: 160px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        right: 20px;
        z-index: 1;
    }

    .dropdown-content a {
        color: var(--primary-light);
        padding: 12px 16px;
        text-decoration: none;
        display: block;
        font-weight: normal;
        font-family:'BC Sans';
        font-size:15px;
    }

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

/* Background Info Section */
.background-info {
    padding: 40px 20px;
    background-color: #f8f9fa;
    background-image: 
        linear-gradient(45deg, transparent 40%, rgba(116, 152, 206, 0.05) 50%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, rgba(227, 168, 43, 0.03) 50%, transparent 60%);
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.background-info::before,
.background-info::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(to bottom, 
        var(--secondary) 0%, 
        transparent 20%, 
        transparent 80%, 
        var(--secondary) 100%);
    opacity: 0.1;
}

.background-info::before {
    left: 0;
    background: linear-gradient(to right, 
        var(--primary-dark) 0%, 
        transparent 100%);
}

.background-info::after {
    right: 0;
    background: linear-gradient(to left, 
        var(--primary-dark) 0%, 
        transparent 100%);
}

.background-content {
    max-width: 1800px;
    margin: 0 auto;
    text-align: left;
    position: relative;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.background-content h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 25px;
    text-align: center;
}

.background-content h3 {
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 5px;
}

.background-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #333;
    text-align: justify;
}

.plan-list {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.plan-list li {
    background-color: #fff;
    border: 1px solid var(--secondary);
    border-left: 4px solid var(--accent);
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media screen and (max-width: 800px) {
    .background-info {
        padding: 30px 15px;
    }
    
    .background-content h2 {
        font-size: 1.5rem;
    }
    
    .background-content h3 {
        font-size: 1.2rem;
    }
    
    .background-content p {
        font-size: 1rem;
        text-align: left;
    }
    
    .plan-list {
        grid-template-columns: 1fr;
    }
}

/* Discover Section */
.discover {
    padding: 20px 20px;
    text-align: center;
}

.discover h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.services-grid {
    max-width: 1200px;
    /* Set a max-width for responsiveness */
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.service-item {
    background-color: white;
    padding: 20px;
    width: 500px;
    height: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    text-align: left;
}

.service-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
}

.service-item h3 {
    font-size: 1.4rem;
    margin: 15px 0;
}

.service-item p {
    font-size: 1rem;
    color: #555;
}

.service-item a {
    text-decoration: none;
    color: #0b4c7a;
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

.service-item a:hover {
    text-decoration: underline;
}

/* Maps Section */
.maps {
    padding: 20px 20px;
    text-align: center;
}

#maps-item {
    width: 100%;
    height: 80vh;
    /* Set to fit most of the viewport */
    padding: 20px;
    border: 2px solid #000;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 0;
}

.maps-box {
    max-width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.leaflet-popup {
    z-index: 9999 !important;
}

/* Data Section */
.data-section {
    margin-top: 20px;
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
}

/* Table container with scroll bar */
.table-container {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto;
    margin: 10px auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    width: 100%;
}

/* Table styling */
.table-container table {
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.table-container th,
.table-container td {
    text-align: left;
    border: 1px solid #ddd;
    padding: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 100px; /* Ensure minimum column width */
}

.table-container th {
    background-color: #f2f2f2;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Hover effect for better readability */
.table-container tr:hover {
    background-color: #f5f5f5;
}

/* Remove fixed widths for columns to allow more flexible sizing */
.table-container th,
.table-container td {
    width: auto;
}

/* Minimize button styling */
.minimize-btn {
    background-color: #ccc;
    border: none;
    color: #333;
    padding: 5px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    float: right;
    margin-right: 5px;
    border-radius: 3px;
}

.minimize-btn:hover {
    background-color: #bbb;
}

/* Button styling */
.download-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.download-btn:hover {
    background-color: #45a049;
}

/* lup overview map */
/* Set up collapsible-bar with that grid layout so everyhting is side by side (if it ever works*/
.collapsible-bar {
    background-color: #294780;
    display: grid;
    grid-auto-flow: column;
    justify-content: right;
    gap: 10px;
    position: relative; 
    z-index: 1;

}
.back-button {
    background-color: #1e345e;
    color: rgb(216, 213, 213);
    cursor: pointer;
    padding: 18px;
    width:auto;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
}

.collapsible {
    background-color: #1e345e;
    color: rgb(216, 213, 213);
    cursor: pointer;
    padding: 18px;
    width:auto;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
} 

.active, .collapsible:hover {
    
    font-weight: bolder;
    color: white;
}

.collapsible:after {
    content: '\002B';
    color: white;
    font-weight: bold;
    float: right;
    margin-left: 15px;
}

.active:after {
    content: "\2212";
}

.content {
    padding: 10 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    background-color: white;
    position: absolute;
    top: 50px;
    right: 5px;
    z-index: 1000;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

}


#overview {
    width: 100%;
    height: 100vh;
    /* Adjust to fit the entire viewport */
    position: relative;
}
/* 

I don't think this is needed anymore, keeping it commented out just in case
#layerContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 200px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#layerContent {
    display: block;
}
 */


/* for intersect form */
.form-horizontal {
    position: relative;
    display: flex;
    align-items: center; 
    gap: 15px; 
    flex-wrap: wrap;
    z-index: 0;
}

.form-horizontal input[type="file"] {
    flex-shrink: 0; 
}

.form-horizontal .radio-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-horizontal .radio-group label {
    margin: 0; 
}

.form-horizontal button {
    flex-shrink: 0;
}

/* Container for metadata section */
.metadata-section {
    background-color: var(--primary-dark);  
    color: white;  
    padding: 10px;
    margin-top: 20px;
    font-family: 'BC Sans'; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);  
    max-width: 100%;  
    margin-left: auto;
    margin-right: auto;
    border-top: solid 2px var(--accent);
    border-bottom: solid 2px var(--accent);
}

/* Header styles */
.header-style {
    font-size: 24px;  
    color: white;
    font-weight: bold;
}

/* Link style */
.link-style {
    color: #E3A82B;  
    text-decoration: none;
}

.link-style:hover {
    text-decoration: underline;
}

/* Sub-header style */
h3.header-style {
    font-size: 20px;
    color: #ffb703;  /* Emphasis color */
}

/* Optional styling for paragraphs */
.metadata-section p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.feather-icon {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaflet-bar .feather-icon {
    margin: auto;
    width: 25px;
    height: 25px;
}


#url-input-container {
    position: absolute;
    top: 575px;
    left: 300px;
    display: none;
    background-color: white;
    padding: 10px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translate(-50%, -50%); /* Center the div relative to the button */
}

#url-input-container input {
    width: 300px;
    padding: 5px;
    margin-right: 5px;
}

#url-input-container button {
    padding: 5px 5px;
}

/* Background Info Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close-background-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-background-modal:hover,
.close-background-modal:focus {
    color: #000;
    text-decoration: none;
}

.modal h2 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
}

.modal h3 {
    color: var(--primary-dark);
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.modal ul li {
    margin-bottom: 5px;
}

.close-button {
    background-color: var(--primary-dark);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: 'BC Sans', sans-serif;
}

.close-button:hover {
    background-color: var(--secondary);
}

.close-button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}