/* ----------------------- General Page Styling -------------------------------- */

body {
    background-color: #DDEAF3 !important;
} 

/* Tables */
table a:not([role='menuitem']){
    color: black;
}

table td, 
table th {
    background-color: white;
    border: none !important;
}

.subgrid-structure table td.column-response,
.subgrid-structure table th.column-header {
    border: 1px solid #ddd !important;
}

.subgrid-structure table th {
    background-color: #f2f7fc;
}

/* -- Entity Lists -- */
.entitylist {
    border: none !important;
}

.entitylist .entitylist-filter-option-group{
    display: flex;
}

.entitylist .entitylist-filter-option-group-label.h4 {
    margin-right: 40px;
}

.content-panel.panel.panel-default.entitylist-filter {
    border: none;
}

/* -- Cards --  */
.card {
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.card h4 {
    font-size: 18px;
    font-weight: bold;
}

/* -- Toggle Tabs -- */
 /* Tab container styling */
 .nav-tabs-custom {
    display: inline-flex;
    padding: 5px;
    background-color: #e0e0e0;
    border-radius: 5px;
}

/* Tab item styling */
.nav-tabs-custom .nav-item {
    margin-right: 5px;
}

/* Tab link styling */
.nav-tabs-custom .nav-link {
    padding: 8px 16px;
    border-radius: 5px;
    color: black;
    font-weight: bold;
    background-color: transparent;
    border: none;
    transition: background-color 0.3s;
    font-size: 1em;
}

/* Active tab styling */
.nav-tabs-custom .nav-link.active {
    background-color: #ffffff;
    color: black;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
}

.nav-tabs-custom .nav-link a,
.nav-tabs-custom .nav-link.active a,
.nav-tabs-custom .nav-link.active a:focus {
    color: black;
}


/* ----------------------------------------- Buttons ------------------------------------------ */
.btn,
.btn-entitylist-filter-submit {
    margin-left: 10px;
    min-width: 120px;
    padding: 8px 12px;
    font-size: 14px;
}

.btn.button2 {
    color: #0B435B !important;
    border-color: #0B435B !important;
}

.btn.button1,
.btn.button2:active,
.btn.button2:focus,
.btn.button2:hover,
.btn-entitylist-filter-submit {
    background-color: #0B435B !important;
    border-color: #0B435B !important;
    color: white !important;
}

.btn-primary {
    background-color: #0B435B !important;
    border-color: #0B435B !important;
    margin-bottom: 10px !important;
}

.btn-primary:hover,
.btn-entitylist-filter-submit:hover {
    background-color: #1a779f !important;
    border-color: #1a779f !important;
}

.BNPCR-form-actions {
    display: flex; 
    justify-content: end;
}

@media only screen and (max-width: 767px) {
    /* buttons should be 100% in smaller screens */
    .BNPCR-form-actions .btn {
        margin-top: 10px;
        width: 100% !important;
        margin-left: 0px;
    }

    .BNPCR-form-actions {
        display: block;
    }
}

/* ----------------------------------------- Form Structure ------------------------------------------ */

/* --- Sections --- */
.BNPCR-subsection-container {
    margin-top: 10px;
    border-radius: 5px;
}

.BNPCR-section-container.hidden {
    display: none;
}

/* --- Sub Section Header --- */
.BNPCR-subsection-header h3 {
    font: 14px Arial;
    color: white;
    margin: 0px;
    font-weight: bold;
}

.BNPCR-subsection-header {
    background-color: #0B435B;
    padding: 10px 30px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.BNPCR-subsection-questions {
    padding: 10px;
    background-color: white;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

/* ----------------------------------------- Tabs ------------------------------------------ */
.BNPCR-tabs {
    border-bottom: none;
    background-color: #DDEAF3; /* Matches the background of the tabs */
    border-radius: 8px; /* Rounds the corners */
    overflow: hidden; /* Ensures tabs stay within the container */
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Align tabs to the left */
}

.BNPCR-tabs > li {
    flex: 0 0 25%; /* Each tab takes up exactly 25% of the container width */
    margin-bottom: -1px;
    list-style: none; /* Remove default list styling */
    text-align: center; /* Center text horizontally */
    box-sizing: border-box;
    height: 50px; /* Set a consistent height for the tabs */
    max-width: 25%; /* Ensure each tab is no wider than 25% */
    min-width: max-content;
    max-width: 25%;   
    width: auto;
}

.BNPCR-tabs > li > a {
    margin-left: 0px !important;
    display: block; /* Make the anchor tag block-level for full width */
    text-align: center; /* Center text horizontally */
    background-color: #A4C2D3; /* Light background for tabs */
    border: 1px solid #ddd;
    border-radius: 4px 4px 0 0; /* Rounds the top corners */
    color: #333;
    width: 100%; /* Anchor fills the entire li */
    white-space: nowrap; /* Prevents text from wrapping */
    overflow: hidden; /* Hides overflowing text */
    text-overflow: ellipsis; /* Adds ellipsis to truncated text */
    height: 100%; /* Ensure the anchor tag fills the entire li */
    line-height: 30px; /* Adjust line-height for vertical centering */
    padding: 9px 15px 0px 15px !important;
}

.BNPCR-tabs > li.active > a,
.BNPCR-tabs > li > a:hover:not(.active),
.BNPCR-tabs > li > a:focus:not(.active) {
    background-color: #0B435B; /* Background for active, hovered, and focused tab */
    border-bottom-color: transparent;
    color: white; /* White text for active, hovered, and focused tab */
}

.BNPCR-tabs > li > a:focus {
    outline: none;
}

.BNPCR-tabs > li.active {
    border: none;
    border-top-left-radius: 8px; /* Matches the container border radius */
    border-top-right-radius: 8px; /* Matches the container border radius */
}

/* Mobile view */
@media (max-width: 767px) {
    .BNPCR-tabs {
        justify-content: center; /* Center tabs in mobile view */
    }

    .BNPCR-tabs > li {
        min-width: 100%; /* Full width on mobile */
        max-width: 100%;
        flex-basis: 100%; /* Each tab takes up full width */
        height: 50px; /* Maintain consistent height on mobile */
    }
}

/* ---------------------------------- Validation ----------------------------------- */
.validation-header {
    margin: 0 0 1em 0;
    padding: 0;
    font-size: 1.2em;
    font-style: normal;
    font-weight: 700;
    text-rendering: optimizeLegibility;
}

.validation-summary ul{
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ---------------------------------- Fields ----------------------------------- */
.form-label {
    display: inline-block;
}

/* Form labels and subgrid captions */
.form-label, caption.subgrid-caption {
    max-width: 100%;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 15px;
    border: none;
    color: black;
}

/* Required fields */
.form-group[isRequired="true"] label.form-label:after, 
.form-group[isRequired="true"] legend.form-label:after,
table.subgrid th[isRequired="true"]:after {
    content: " *";
    color: red;
}

#BNPCR-form select {
    padding: 6px 12px !important;
    font-size: 15px;
}

/* ---- Invalid inputs ---- */
.form-group.invalid input, 
.form-group.invalid select, 
.form-group.invalid textarea {
    border: 2px solid red; /* Red border to indicate error */
}

.form-group.invalid input:focus,
.form-group.invalid select:focus,
.form-group.invalid textarea:focus {
    outline: none; /* Remove default outline */
    box-shadow: 0 0 5px red; /* Add red glow when field is focused */
}

/* Label Only */
.form-group.label-only p{
    font-size: 15px;
}

/* Valid inputs 
.form-group.valid input, 
.form-group.valid select,
.form-group.valid textarea {
    border: 2px solid green; 
}

.form-group.valid input:focus,
.form-group.valid select:focus,
.form-group.valid textarea:focus {
    outline: none;
    box-shadow: 0 0 5px green; 
}*/


@media (max-width: 767px) {
    #BNPCR-container{
        padding: 8px 20px !important;
    }
}

/* Disabled fields */
.form-control[disabled], fieldset[disabled] .form-control, select[disabled], .input-group-addon[disabled] {
    border: none;
    box-shadow: none;
    cursor: default;
}

tr[isarchetype="true"] {
    display: none;
}

/* ---------------------------------- Form General ----------------------------------- */
/* Disabled actions */
form#BNPCR-form.form-read .column-actions-header, 
form#BNPCR-form.form-read .column-actions, 
form#BNPCR-form.form-read .subgrid-actions {
    display: none !important;
}

/* Form Notifications*/
#BNPCR-info-notification {
    padding: 10px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 10px;
}

#BNPCR-info-notification i {
    margin-right: 5px;
}

.BNPCR-form-actions {
    position: sticky;/* Sticky action bar */
    top: 0; /* Sticky action bar */
    /*z-index: 1000;/* Sticky action bar */
    background-color: #DDEAF3;/* Sticky action bar */
    padding: 10px;/* Sticky action bar */
    /*border-bottom: 1px solid #ccc;/* Sticky action bar */
    /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);/* Sticky action bar */
    margin-bottom: 10px;
    z-index: 2;
}

/* input group date picker*/
.form-control[disabled] + .input-group-addon {
    display: none;
}

/* ------------------------ Subgrids ----------------------------*/
    

td.column-response .form-group {
    margin: 0px;
}
.Subgrid_remove-button {
    margin: 0px;
}


.form-check-label {
    font-weight: bold;
    color: #000; /* Black text */
    vertical-align: middle; /* Align label with radio button */
    display: inline-block;
    line-height: 18px; /* Line height set to match radio button */
}

fieldset {
    border: none; /* No border for the fieldset */
    padding: 0;
}

/* Time out modals */
.BNPCR-modal-body a{
    font-size: 20px;
}

/* ---------------------------------- Form General  Sticky action bar ----------------------------------- */
form#BNPCR-form {
    display: flex;
    flex-direction: column-reverse;
}

/* ----- Loading Spinner ------- */
/* Loading Spinner */
#loading {
    display: none;
    text-align: center;
}

#loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.35);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    flex-direction: column;
}

#loading-overlay.active {
    visibility: visible;
    opacity: 1;
}

#loading-overlay .spinner {
    border: 6px solid #f3f3f3;
    border-radius: 50%;
    border-top: 6px solid #3498db;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---------------- Navbar ---------------------------- */
.nav-toggle {
    color: white;
    padding: .625rem .9375rem; 
    border: none;
    background-color: #0b435b;
    font-size: 1.65rem;
    font-weight: 400;
    font-style: normal;
    white-space: nowrap;
    border-radius: 5px;
 }

 .nav-toggle:hover{
    background-color: #1a779f;
 }

 .BNPCR-nav {
    position: fixed; /* Ensure the nav stays fixed on the screen */
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1000; /* Keeps it above other elements */
}

.nav-container {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -400px; /* Start off-screen */
    min-width: 400px;
    width: 200px;
    background-color: white;
    z-index: 1001;
    transition: right 0.5s ease; /* Sliding animation */
}

.nav-container.open {
    right: 0; /* Slide into view */
}

.nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0); /* Initially transparent */
    z-index: 999;
    opacity: 0; /* Start invisible */
    display: none; /* Hidden initially */
    transition: opacity 0.5s ease; /* Fading animation */
}

.nav-backdrop.open {
    display: block; /* Make visible */
    opacity: 1; /* Fade in */
    background-color: rgba(0, 0, 0, 0.35); /* Backdrop color */
}


 .nav-header {
    height: 100px;
    align-items: center;
    display: flex;
    justify-content: space-between;
    border-bottom: .0625rem solid #369;
    margin: 0px 20px 10px 20px;
 }

 .nav-header .fa.fa-close {
    color: #4abad9;
    font-size: 1.5625rem;
    cursor: pointer;
 }

 ul.BNPCR-weblinks {
    flex-direction: column !important;
    list-style: none;
    padding: 0;
    margin-left: 18px;
 }

 ul.BNPCR-weblinks li {
    padding-top: 10px;
 }

 ul.BNPCR-weblinks li a {
    color: #0b435b;
    font-size: 1.8rem;
    text-decoration: none;
 }

 ul.BNPCR-weblinks li a:hover {
    color: #0b435b;
 }

 .navbar-main-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
 }

 .navbar-main-container:before,  
 .navbar-main-container:after {
    content: none !important;
 }

 @media (max-width: 600px) {
    .nav-container {
        right: -100%;
        min-width: 100%;
        width: 100%;
     }
}


.nav-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 130px;
}


/* Modal */
#loading-overlay #loading-overlay-modal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-left: 20px;
    margin-right: 20px;
}

/* CAL */

.entitylist[data-calendar-url] {
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.entitylist[data-calendar-url] .btn {
    min-width: 0px !important;
}

@media (max-width: 769px) {
    .calendar-views {
        text-align: center !important;
     }
}

/* Basic Page Header */
.BNPCR-welcome {
    text-align: right;
}

@media (max-width: 769px) {
    .page-header-text {
        text-align: center;
    }
}


 /* Tab container styling */
 .nav-tabs-custom {
    display: inline-flex;
    padding: 5px;
    background-color: #e0e0e0;
    border-radius: 12px;
}

/* Tab item styling */
.nav-tabs-custom .nav-item {
    margin-right: 5px;
}

/* Tab link styling */
.nav-tabs-custom .nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    color: #0B435B;
    font-weight: bold;
    background-color: transparent;
    border: none;
    transition: background-color 0.3s;
    font-size: 1em;
}

/* Active tab styling */
.nav-tabs-custom .nav-link.active {
    background-color: #ffffff;
    color: #0B435B;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
}