body {
	background-color: #FFF; 
	line-height: 1.8;
	font-size:1.1rem;
}
form {background-color:#FFF;}

h1, h2, h3, h4, h5, h6 {letter-spacing: -1px;color:#2E4A6B}

#HEAD_SECTION {
	background-color:#FFFFFF;
	color:#000000;
	padding:10px!important;
	/*padding:30px!important;*/
	text-align:left;
	}
	
#HEAD_INNER{
	padding:0px;
	margin:0px;
	/*max-width:1000px; why is this here? It makes error messages wrap weirdly. If anyone knows why this was added, lmk and I can restore this. */
}

/* MAINLINE - Soft Gray for Subtle Separation */
.MAINLINE {
	/* background-color:#7FAF3D; */ /* Green */
    background-color: #f5f5f5; /* Light gray */
	height:2px;
	margin-top:10px;
  /*  padding: 10px; */
    border-radius: 5px;
    margin-bottom: 15px;
}

#openResults {padding:0px 10px;color:#d53535;}
#openResults:hover {color:#a72a2a;}
#openResults i {font-size:28px;}

.open-button {
  display: inline-block;
  background-color: /*#007BFF*/ #FF7B00;
  color: #FFF;
  font-weight: bolder;
  width: 35px;
  border: none;
  border-radius: 4px;
  margin: 0px 10px;
  position: fixed;
  right: 0;
  top: 12%;
  }
 
.open-button:hover {
  background-color: /* #0056b3; */ #FF6A00;
}

@media (max-width: 768px) {
    .open-button {position: relative;float: right;}
}

/* BOTTOMLINE - Light Blue for Slight Contrast */
.BOTTOMLINE {
    background-color: #e3f2fd; /* Light blue */
    height: 2px;
    margin-top: 30px;
    margin-bottom:2%;
}

#BODY_SECTION fieldset > div[style*="display: grid"] > div[style*="display: inline-block"] {
  margin-left: auto !important;
  margin-right: auto !important;
}


/* added to have those elements cover the with of the body section div and for textarea to have 100% width when it is a single option */

fieldset {margin-bottom: 5%;}

/* Add directly to question if vertical sliders used */
/* fieldset {margin-bottom: 5%; margin-left: 15%;}
   @media (max-width: 768px) {fieldset {margin-left: 5%;}} */

/* Improve spacing within the fieldset */
fieldset {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px; /* Optional rounded corners */
  border: 1px solid #f9f9f9;  /* Light background to separate section */
}

div.progress-container > div {
	float: left;
	background-color: #B0B8C1;
	height: 10px;
}


/* Style the question title (legend) */
fieldset legend.QUESTION {
    font-size: 1.2rem!important;
    font-weight: 500;
    margin-bottom: 10px;
}

/* Style the note under the question */
p.NOTE {
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
}

/* Ensure the table behaves as expected */
.CATEGORYTABLE {
    width: 100%;
    display: table; /* Keeps normal table behavior */
    table-layout: fixed;
}

.CATEGORYTABLE tr:only-child td .TEXTBOX, .CATEGORYTABLE tr:only-child td .NUMBOX {margin-left:-1%!important;}

/* Reduce padding inside table cells */
.CATEGORYTABLE td {
    padding: 5px 10px;
}

@media (max-width: 767px) {
.CATEGORYTABLE td {
    padding: 2px 2px;
}
}

/* removes the first and second td where there is only tr in the table. */ 

/*table.CATEGORYTABLE tr:only-child td:nth-child(1),*/ table.CATEGORYTABLE tr:only-child td:nth-child(2):not(:has(.DROPDOWN)) {display:none!important;}



/* Ensure inputs have enough spacing */
.REPONSE_INPUT input {
    margin-right: 5px; /* Adds slight space between radio button and label */
}

/* Label spacing for better readability */
.REPONSE label {
    display: inline-block;
    line-height: 1.4; /* Slightly improve text readability */
    margin-top: 7px;
}

/* Hover label inside CATEGORYTABLE */

.CATEGORYTABLE td {
    border: none;
    transition: all 0.3s ease-in-out;
}

/* Elegant hover effect */
.CATEGORYTABLE td label:hover {
    padding: 2px;
    border-radius: 5px; / Soft rounded shape /
    vertical-align: top;
    background-color: #C3D4B1;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); / Light shadow for depth /
    transform: scale(1.05); / Slight pop-out effect */
}

/* Additional spacing for text input under "Other:" */
.TEXTBOX {
    margin-top: 4px;
    width: 80%;
    padding: 5px;
    font-size: 1rem;
}

/* Reduce spacing between rows */
.CATEGORYTABLE tr {
    min-height: 30px; /* Adjust row height */
}

p.QUESTION, p.NOTE, .CATEGORYTABLE tr:only-child textarea {width:100%;}

input.BUTTON {
	background-color:#a9c94b !important
}

.btn {  
	display: inline-block;
  font-weight: 400;
  line-height: 1.5;
	background-color:#a9c94b !important;
	text-align: center;
  text-decoration: none;
  vertical-align: middle;
	user-select: none;
}

.btn-success, .btn-lg {
	border:none!important;  
	padding: .5rem 1rem;
  font-size: 1.25rem;
  border-radius: .3rem;
}
#BUTTON_TABLE, #PROGRESS_TABLE
	{padding:10px;
	margin:0 auto;
	max-width:1500px;
	text-align:center;}
	
div#FOOT_SECTION {margin-top: 2%;}

table.BOUTONS td {padding:15px;}

/* General Button Styling */
input.BUTTON[name="_previous_question"], input.BUTTON[name="_precedente"],
input.BUTTON[name="_next_question"], input.BUTTON[name="_prochaine"] {
  position: relative;
  width: 160px;
  height: 75px;
  background: linear-gradient(180deg, #7fcf5c, #5da43f); /* 3D effect gradient */
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  box-shadow: 0px 6px 0px #4b8c34, 0px 6px 15px rgba(0, 0, 0, 0.3); /* Stronger shadow for 3D effect */
}

/* Hover Effects */
input.BUTTON[name="_previous_question"]:hover, input.BUTTON[name="_precedente"]:hover,
input.BUTTON[name="_next_question"]:hover, input.BUTTON[name="_prochaine"]:hover {
  background: linear-gradient(180deg, #6fb84c, #4b8c34); /* Slightly darker hover */
  transform: translateY(-2px); /* Lifts the button slightly */
  box-shadow: 0px 8px 0px #3e722b, 0px 8px 18px rgba(0, 0, 0, 0.35);
}

/* Click (Active) Effect */
input.BUTTON[name="_previous_question"]:active, input.BUTTON[name="_precedente"]:active,
input.BUTTON[name="_next_question"]:active, input.BUTTON[name="_prochaine"]:active {
  transform: translateY(3px); /* Pressed down effect */
  box-shadow: 0px 3px 0px #3e722b, 0px 3px 10px rgba(0, 0, 0, 0.2);
}

/* Back Button Shape */
input.BUTTON[name="_previous_question"], input.BUTTON[name="_precedente"] {
  -webkit-clip-path: polygon(100% 10%, 36.8% 10%, 36.8% 0, 0 50%, 36.8% 100%, 36.8% 90%, 100% 90%);
  clip-path: polygon(100% 10%, 36.8% 10%, 36.8% 0, 0 50%, 36.8% 100%, 36.8% 90%, 100% 90%);
}

/* Next Button Shape */
input.BUTTON[name="_next_question"], input.BUTTON[name="_prochaine"] {
  -webkit-clip-path: polygon(0 10%, 63.2% 10%, 63.2% 0, 100% 50%, 63.2% 100%, 63.2% 90%, 0 90%);
  clip-path: polygon(0 10%, 63.2% 10%, 63.2% 0, 100% 50%, 63.2% 100%, 63.2% 90%, 0 90%);
}

input.BUTTON[value="Submit"], input.BUTTON[value="START"], input.BUTTON[value="D\00C9 BUT"] {background: #0090c8!important;text-align: left; padding-left: 20%;}

input.BUTTON[name="_next_question"]:hover, input.BUTTON[name="_prochaine"]:hover[value="Submit"], input.BUTTON[name="_next_question"]:hover, input.BUTTON[name="_prochaine"]:hover[value="START"], input.BUTTON[value="D\00C9 BUT"]:hover {background: #2E4A6B!important; text-align: left; padding-left: 20%;}


/* Click (Active) Effect */
input.BUTTON[name="_previous_question"]:active, input.BUTTON[name="_precedente"]:active,
input.BUTTON[name="_next_question"]:active, input.BUTTON[name="_prochaine"]:active {
  transform: scale(0.95); /* Slight shrink effect */
  background: #4b8c34 !important;
}

/* Submit & Send Buttons */
input.BUTTON[value="Submit"], input.BUTTON[value="Send"] {
  background: linear-gradient(180deg, #00a5e0, #0078a0) !important;
  text-align: left;
  padding-left: 20%;
}

/* Hover Effect for Submit & Send */
input.BUTTON[value="Submit"]:hover, input.BUTTON[value="Send"]:hover {
  background: linear-gradient(180deg, #0090c8, #006b8e) !important;
  transform: translateY(-2px);
  box-shadow: 0px 8px 0px #005b78, 0px 8px 18px rgba(0, 0, 0, 0.35);
}


/* Focus Styles (For Accessibility & Mobile Users) */
@media (pointer: coarse), (hover: none) { 
  input.BUTTON[name="_previous_question"], input.BUTTON[name="_precedente"]:focus,
  input.BUTTON[name="_next_question"], input.BUTTON[name="_prochaine"]:focus {
    background: #4b8c34 !important; 
    color: white !important;
  } 
}

/************************************************************************************/
/* Special formatting of Back Button for mobile */
/************************************************************************************/

@media (max-width: 768px) { 

input.BUTTON[name="_previous_question"], input.BUTTON[name="_precedente"] {
  background: #E67E22!important; /* Deep Orange */
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  transition: background 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

input.BUTTON[name="_previous_question"]:hover, input.BUTTON[name="_precedente"]:hover {
  background: #D45D1B!important; /* Slightly Darker */
}

input.BUTTON[name="_previous_question"]:active, input.BUTTON[name="_precedente"]:active {
  background: #B7490F!important; /* Even Darker */
}

input.BUTTON[name="_previous_question"], input.BUTTON[name="_precedente"] {
    width: 50px; /* Reduce width to show only the head */
    -webkit-clip-path: polygon(100% 10%, 50% 10%, 50% 0, 0 50%, 50% 100%, 50% 90%, 100% 90%);
    clip-path: polygon(100% 10%, 50% 10%, 50% 0, 0 50%, 50% 100%, 50% 90%, 100% 90%);
  }

}

/************************************************************************************/

.btn-success, .btn-lg {
  border: none !important;
}

.form-check-input:checked {
  background-color: #78b94c!important;
  border-color: #b3d582!important;
}

.unselectable{
  background-color: #eeeeee;
  cursor: not-allowed;
  pointer-events: none;
}

/* Start Button for intro pages */

.START {
    background-color: #4CAF50; /* Elegant green */
    color: white;
    font-size: 18px;
    font-weight: bold;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-transform: uppercase;
}

.START:hover {
    background-color: #45a049; /* Slightly darker green on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.START:active {
    transform: scale(0.95);
}

/* Quit button */

.QUIT {
    background-color: #d53535; /* Red button */
    color: white!important;
    font-size: 18px;
    font-weight: bold;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-transform: uppercase;
}

.QUIT:hover {
    background-color: #a72a2a; /* Darker red */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.QUIT:active {
    transform: scale(0.95);
}

/*For clipboard feature. Additional javascript required to be found in resources folder. */
/* -------------------------------------------------------- */
/* -------------------------------------------- Clipboard */
/* -------------------------------------------------------- */

        .clipboard-container {
            position: relative;
        }

.clipboard-button {
             display: inline-block;
             width: 110px;
             height: auto;
             background-color: #4CAF50;
             color: white;
             border-radius: 6px;
             cursor: pointer;
             position: relative;
             text-align: center;
             box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
             padding: 10px;
             float: right;
             margin-left: 5px;
         }

        .clipboard-button::before {
            content: '';
            position: absolute;
            top: -10px;
            left: 12px;
            width: 75px;
            height: 10px;
            background-color: #ffffff;
            border-radius: 4px 4px 0 0;
        }

        .clipboard-message {
            position: absolute;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background-color: #000;
            color: #fff;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 12px;
            display: none;
            white-space: nowrap;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .clipboard-message.show {
            display: block;
            animation: fadeOut 3s forwards;
        }

/* -------------------------------------------------------- */
/* -------------------------------------------- Non-CW Dropdowns */
/* -------------------------------------------------------- */
    /* Dropdown container floated right */
    .dropdown {
      position: relative;
      display: inline-block;
      font-family: sans-serif;
      float: right;
    }

    /* Hide the checkbox */
    .dropdown-checkbox {
      display: none;
    }

    /* Style for the toggle button */
    .dropdown-label {
      background-color: #007BFF;
      color: #fff;
      padding: 10px 20px;
      cursor: pointer;
      border-radius: 4px;
      user-select: none;
      display: inline-block;
    }

.dropdown-label:hover, .dropdown-label:active {background: #007BFF;}

    /* Dropdown menu styling */
    .dropdown-menu {
      position: absolute;
      top: 100%;
      right: 0; /* Align the menu to the right edge */
      margin: 0;
      padding: 0;
      list-style: none;
      background: #fff;
      border: 1px solid #ccc;
      border-radius: 4px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
      display: none;
      z-index: 1000;
      min-width: 127px;
    }

    /* Each dropdown list item */
    .dropdown-menu li {
      padding: 10px;
      text-align: center;
      transition: background-color 0.3s ease;
    }

    /* Change list item background to transparent on hover */
    .dropdown-menu li:hover {
      background-color: transparent;
    }

    /* Toggle the dropdown menu when checkbox is checked */
    .dropdown-checkbox:checked + .dropdown-label + .dropdown-menu {
      display: block;
    }

    /* Style for language buttons */
    .btn-language {
      background: transparent;
      border: none;
      cursor: pointer;
      font-size: 1em;
      color: #333;
    }
/* -------------------------------------------------------- */
/* -------------------------------------------- Language Globe */
/* -------------------------------------------------------- */    
         /* Style for the toggle button */
         .langdrop-label-dd {
             background-color: #007BFF;
             color: #fff;
             padding: 8px;
             cursor: pointer;
             border-radius: 50%; /* Makes it round */
             width: 32px;
             height: 32px;
             display: flex;
             align-items: center;
             justify-content: center;
             font-size: 14px;
             border: none;
             outline: none;
         }
 
         .langdrop-label-dd:hover {
             background-color: #0056b3;
         }
 
         /* Hide default checkbox */
         .langdrop-checkbox {
             display: none;
         }
         
         label.langdrop-label-dd {
             min-width: auto !important; 
         }
 
         /* Dropdown menu styling */
         .langdrop-menu {
             position: absolute;
             top: 40px; /* Adjusted for the smaller button */
             right: 5px;
             list-style: none;
             background: #fff;
             border: 1px solid #ccc;
             border-radius: 4px;
             box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
             display: none;
             z-index: 1000;
             min-width: 110px;
             padding: 5px 0;
             text-align: center; /* Center text */
         }
 
         /* Each dropdown list item */
         .langdrop-menu li {
             padding: 8px;
             transition: background-color 0.3s ease;
             cursor: pointer;
         }
 
         .langdrop-menu li input {
             background: none;
             border: none;
             color: inherit;
             cursor: pointer;
             font: inherit;
             padding: 8px;
             width: 100%;
             text-align: center;
         }
 
         /* Hover effect */
         .langdrop-menu li:hover {
             background-color: #f0f0f0;
         }
 
         /* Show dropdown menu when checkbox is checked */
         .langdrop-checkbox:checked + .langdrop-label-dd + .langdrop-menu {
             display: block;
        }

	/* prevents the langue input box from appearing after footer */
        input[name="_langue"] {display:none;}
    
.LOGO_SPAN > img:nth-child(1) {
  width: 220px;
}

.LOGO_SPAN {
display: inline-block;
width: auto;
text-align:left;
padding:0px;
margin-bottom: 5px;
}

.LANG_SPAN {
display: inline-block;
width:20%;
height:auto;
text-align:right;
padding:0px;
margin:0px;
}

.err, .ERREUR, #MESSAGEERREURGENERAL {
	color: #b85c52;
}

#MESSAGEERREURGENERAL {display: none; /*display: inline-block;*/ width: 500px!important; margin: 5px;}

.erreur {color:#b85c52;}

#BODY_SECTION, #BUTTON_TABLE, #PROGRESS_TABLE {
	background-color:#FFF;
	}
	
#BUTTON_TABLE div {padding:.8em;margin-top:10%;} 

@media only screen and (min-width:768px) {

/* Ensure #BODY_SECTION properly allows centering */
#BODY_SECTION {
    display: flex; /* Enables flexible box layout */
    justify-content: center; /* Centers content horizontally */
    align-items: center; /* Centers content vertically */
    flex-direction: column; /* Ensures block elements like fieldsets stack */
}

/* Center the .MATRICE3 table */
#BODY_SECTION .MATRICE3 {
    margin: 0 auto; /* Centers table horizontally */
    display: table; /* Maintains table structure */
    border-collapse: separate; /* Keeps proper spacing */
    border-spacing: 5px; /* Adjust for breathing room */
    background-color: #fff; /* Keeps background clean */
}

/* Ensure table headers and cells align properly */
#BODY_SECTION .MATRICE3 th,
#BODY_SECTION .MATRICE3 td {
    padding: 8px;
    text-align: center;
}

/* Optional: Add a subtle border for clarity */
#BODY_SECTION .MATRICE3 {
    border: 1px solid #ccc;
    border-radius: 5px;
}
}

/* for cw error img handling */
.MATRICE3 td.ORDINARY_CELL_A1 img, .MATRICE3 td.ORDINARY_CELL_B1 img {height: 30px;}
	
thead {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background-color: #ffff;
  color: #2E4A6B;
  text-align: center;
  z-index: 2;
}

table {background-color:transparent !important;}

.w-table th, .w-table td {width: auto; padding: 15px 30px}
.w-table {margin:auto;}

table.MATRICE3 {margin-left: auto;
    margin-right: auto;}
    
/* start of css rules for CW tables */
    
.MATRICE3 .REPONSE {display: none;}

.MATRICE3 th, .MATRICE3 td {
	padding: 10px; 
	min-width: 75px;
}

/* Background colour for "Special" cells, i.e., a column with *S* behaviour code. */

.SPECIAL_CELL1 {background:whitesmoke;}
td.SPECIAL_CELL1:hover {background:rgb(207, 207, 207) !important;}
td.SPECIAL_CELL1 label:hover {background:rgb(207, 207, 207) !important;}

th.SPECIAL_LINE_A0, th.SPECIAL_LINE_B0 {text-align:left!important;}

.COLONNE {font-weight:normal; padding: 10px;}

.LIGNE {font-weight:600;}

.ORDINARY_CELL_A1:hover, 
.ORDINARY_CELL_B1:hover, 
.SPECIAL_CELL1:hover { 
	background: #AFC89B!important;
	}

.MATRICE3 th {color: #2E4A6B;}

/************************************************************************************/
/* Special formatting of CW tables for mobile */
/************************************************************************************/

@media (max-width: 768px) {
    /* Ensure only the specific table headers stick */
    .MATRICE3 th.SPECIAL_LINE_A0,
    .MATRICE3 th.SPECIAL_LINE_B0 {
        position: sticky;
        top: 0;
        background-color: white; /* Keep visible while scrolling */
        z-index: 100; /* Ensure it's above other content */
        text-align: left;
        border-bottom: 2px solid #ccc; /* Optional: Adds a visual separation */
        padding: 5px;
    }
}



/*border around inputs when checked */

.SPECIALTBOX {
 background-color: whitesmoke;
 cursor: default;
 -moz-user-select: none;
 -webkit-user-select: none;
}

.SPECIALTBOX:focus {
 background-color: whitesmoke;
 cursor: default;
 -moz-user-select: none;
    border: 1px gray!important;
 outline-color: gray!important;
}

input:enabled:hover:not([class]) {
    border-color: #ccc;
    box-shadow:0 0 5px 0px #ccc inset;
}

input[type='text']:focus, textarea:focus {
  border: 1px solid #2E4A6B;
  outline-style: solid;
  outline-color: #2E4A6B;
}

input[type="radio"]:checked {
  line-height: 14px;
}

input[type="checkbox"]:checked {
  line-height: 14px;
}

/************************************************************************************/
/* Special formatting for mobile */
/************************************************************************************/

@media only screen and (max-width:767px) {

	/*tr label span {display:none;}*/

	.LOGO_SPAN > img:nth-child(1) {
	  width: 220px;
	}

	/* Center-align suffix text in tables on mobile */

	th.SPECIAL_LINE_A0 {
		text-align: center;
		text-align:center!important;
	}
	th.SPECIAL_LINE_B0 {
		text-align: center;
		text-align:center!important;
	}
	.LIGNE {
		text-align: center;
		text-align:center!important;
		font-size: 1.3rem;
		font-weight: 700;
	} 

	/* Columns with *S* behaviour code were stil displaying in mobile, this fixes it*/

	.tr-head, table.MATRICE3 th.SPECIAL_COLUMN1, table.MATRICE3 th.SPECIAL_CELL1 {display:none;}

	/* Halve the padding in textboxes on mobile; R can see more of what they wrote and it's overall easier to read */
	
	.TEXTBOX, .NUMBOX {padding: 5px !important;}

	th.SPECIAL_LINE_A0, th.SPECIAL_LINE_B0, table.MATRICE3 td {display: block;}
	
	.MATRICE3 tr td span.REPONSE {display:block!important;text-align:center;}
	
	.table tr td:first-child {color: #2E4A6B; font-weight: bold;}


	
	.MATRICE3 th, .MATRICE3 td  {
		padding: .5rem .5rem;
		background-color: var(--bs-table-bg);
		border-bottom-color: rgba(0, 0, 0, 0.1);
		border-bottom-width: 1px;
		box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg);
	}
	
	select {color:#2E4A6B; width:100%; font-size:0.9em;}
	
	#MESSAGEERREURGENERAL {display: none; /*display: inline-block;*/ max-width: 500px!important; margin: 5px; border: none; }

}

@media only screen and (max-width:414px) {

	.btn-success, .btn-lg {
	  font-size: 1rem;
	}
	
}


	
/************************************************************************************/    
/* start of css rules for radio inputs and labels */
/************************************************************************************/
    
input:checked[type="radio"] {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

input:checked[type="radio"] {
  box-shadow:0 0 0 1px #b3d582!important;
  appearance:none;
  border-radius:50%;
	width: 1.3em;
	height: 1.3em;
  background-color:#78b94c!important;
}

input[type='radio'] {
	width: 1.3em;
	height: 1.3em;
	margin-top: .5em;
	background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
	border-radius: 50%;

}

input:focus[type='radio'] {outline: 5px solid #ADD8E6; border-radius:50%;}

input:active[type='radio'] {outline:none!important;}

input:after[type='radio'] {accent-color:#ADD8E6;}

input:checked[type="checkbox"] {
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23fff' class='bi bi-check' viewBox='0 0 16 16'%3e%3cpath d='M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.267.267 0 0 1 .02-.022z'/%3e%3c/svg%3e");
}

input:checked[type="checkbox"] {
  box-shadow:0 0 0 1px #b3d582!important;
  appearance:none;
  border-radius:5%;
	width: 1.3em;
	height: 1.3em;
  background-color:#78b94c!important;
}

input[type="checkbox"] {
	width: 1.3em;
	height: 1.3em;
	margin-top: .5em;
	background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
	border-radius: 5%;

}

input:focus[type="checkbox"] {outline: 5px solid #ADD8E6; border-radius:5%;}

input:active[type="checkbox"] {outline:none!important;}

input:after[type="checkbox"] {accent-color:#ADD8E6;}

.REPONSE {margin-left:5px;}

/* Mala blue for the dropdowns*/
select {color:#2E4A6B}

/************************************************************************************/    
/* start of css rules for CW select dropdowns */
/************************************************************************************/

/* Base styles */
.DROPDOWN {
  appearance: none; /* Removes default OS styles */
  width: 100%;
  max-width: 300px;
  min-width: 300px;
  padding: 12px;
  font-size: 16px;
  font-weight: 500;
  border: 2px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  outline: none;
}

/* Custom dropdown arrow (larger size) */
.DROPDOWN {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="gray"><path d="M7 9l5 6 5-6H7z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px; /* Increased arrow size */
  padding-right: 44px; /* Adjust for larger arrow */
}

/* Hover & focus styles */
.DROPDOWN:hover,
.DROPDOWN:focus {
  border-color: #007bff; /* Blue focus border */
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
}

/* Disabled state */
.DROPDOWN:disabled {
  background-color: #f2f2f2;
  color: #999;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 480px) {
  .DROPDOWN {
    font-size: 14px;
    padding: 10px;
  }
}


/* styles labels as buttons. a bit of javascript is needed to submit on selection */
/*
label[for=""] {
    display: inline-block;
    padding: 16px 32px;
    width: 100%;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    text-align: center;
    border-radius: 5px;
    font-size: 18px;
    transition: background-color 0.3s ease;
}

label[for=""]:hover {
    background-color: #0056b3;
}

/* hides input next to button-styled label*/
/*
input[name^=""][type=""]{visibility: hidden;}
*/

@media only screen and (min-width: 768px) {

	.MATRICE3 tr:nth-child(odd):hover > th.SPECIAL_LINE_A0  {background-color:#C3D4B1;}
	.MATRICE3 tr:nth-child(odd):hover > td.ORDINARY_CELL_A1  {background-color:#C3D4B1;}
	.MATRICE3 tr:nth-child(even):hover > th.SPECIAL_LINE_B0  {background-color:#C3D4B1;}
	.MATRICE3 tr:nth-child(even):hover > td.ORDINARY_CELL_B1  {background-color:#C3D4B1;}
	
	/* grey hover colour for special columns */ 
	.MATRICE3 tr:nth-child(odd):hover > th.SPECIAL_CELL1 {background-color:whitesmoke;}
	.MATRICE3 tr:nth-child(odd):hover > td.SPECIAL_CELL1 {background-color:rgb(228, 228, 228);}
	.MATRICE3 tr:nth-child(even):hover > th.SPECIAL_CELL1 {background-color:whitesmoke;}
	.MATRICE3 tr:nth-child(even):hover > td.SPECIAL_CELL1 {background-color:rgb(228, 228, 228);}
}
	
#FOOT_SECTION  {
	margin:0 auto;
	text-align:center;
	color: #4e6889;
	 background-color:#fff;
	}

#FOOT_SECTION a {color:#D8A843;text-decoration:none;}
#FOOT_SECTION a:hover {color:#E3C179;text-decoration:underline;}
#FOOT_SECTION a:visited {color:#E3C179;text-decoration:none;}

label {
	display:inline-block;
	width:auto;
	/*! min-width:90px; */
	}
	
/*div#HEAD_INNER div input label:hover {background: transparent!important;}

label:hover {background-color: #BFCDA4; color: #3D3D3D!important;}*/


.THERMOMETRE {display:none;}

.table tr th, .table tr td {text-align: center;}

.p-h {color: #2E4A6B;}

.center {text-align: center;}


/* character count for open ends */
span[id^="rchar"] {color:#39598C;}


/* @media only screen and (max-width:600px) {

	.TEXTBOX, .NUMBOX {
	  width:95%!important;
	} 
} */

.TEXTBOX, .NUMBOX {
  display: inline-block;
  border: 1px solid #bbc2af;
  border-radius: 5px;
  padding: 10px;
  margin-top: 1%;
  box-sizing: border-box;
  margin-left: 2%;
}

/* Disabled state */
.TEXTBOX:disabled, .NUMBOX:disabled {
  background-color: #f2f2f2;
  color: #999!important;
  cursor: not-allowed;
}

/*tr:only-child td .TEXTBOX,*/ tr:only-child td .NUMBOX {
  margin-left: -1%;
} 

/* Text inputs inside of matrix table th elements don't need the left margin, the left margin is for text inputs next to radio buttons/checkboxes */
.LIGNE > .TEXTBOX {
	margin-left: 0px;
}
.LIGNE > .NUMBOX {
	margin-left: 0px;
}


textarea {font-family: 'Noto Sans', sans-serif;}

textarea:focus, textbox:focus {
  -webkit-box-shadow: inset 2px 2px 2px 0px #dddddd;
  -moz-box-shadow: inset 2px 2px 2px 0px #dddddd;
  box-shadow: inset 2px 2px 2px 0px #dddddd;
}  

input[type="radio"], input[type="checkbox"] {margin-top: .5em;}

/* radio & checkbox type inputs */
/* Keep if defaults are used instead */

/*input[type="checkbox"], input[type="radio"] {
	margin: 4px 0 0;
	margin-top: 1px\9;
	line-height: normal;
    cursor: pointer;
}

input[type="checkbox"], input[type="radio"] {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	padding: 0;
    cursor: pointer;
}*/

/* -------------------------------------------------------- */
/* -------------------------------------------- TOOLTIPS */
/* -------------------------------------------------------- */

/* Tooltip Container */
.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
}

/* Tooltip Box */
.tooltip-text {
    position: absolute;
   /* bottom: 100%; *//* Ensures it appears directly above the parent */
   top: 87%;
    left: 0;
    width: 100%; /* Makes it match the full width of the parent element */
    min-width: 150px; /* prevents noodles */
    background-color: black;
    color: white;
    padding: 7px;
    border-radius: 5px;
    font-size: 14px;
    text-align: left;
    word-wrap: break-word;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

/* Tooltip Arrow */
.tooltip-text::after {
    content: "";
    position: absolute;
   /* top: 100%; */
    left: 10%;
    border-width: 6px;
    border-style: solid;
    border-color: black transparent transparent transparent;
}

/* Show tooltip on hover (desktop) */
.tooltip-container:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
}

/* Show tooltip on focus (mobile tap) */
.tooltip-container:focus-within .tooltip-text {
    opacity: 1;
    visibility: visible;
}

/* Ensure Tooltip Stays Responsive */
/* @media screen and (max-width: 400px) {
    .tooltip-text {
        max-width: 100%;
        word-break: break-word;
        bottom: calc(100% + 10px); /* More breathing space on mobile */
    }
} */

/* if needed css accordions */

/* lang and zmail and general accordion dropdowns */

details.lang {position:relative; float:right; color: white;z-index:5;}
details.lang { background-color:#003F70; padding:10px;border-radius:5%;cursor:pointer;}
details.zml {text-align:center;padding:5px;cursor: pointer;}
summary.under {text-decoration:underline;}

/* buttons are specifc to lang class */
.BUTTONL {color:white;font-size:1em;cursor:pointer;}
.BUTTONL:hover {text-decoration: underline;}

details > summary {
  list-style: none;
}

details.accordion {
	background-color: #f1f1f1;
	color: #444;
	cursor: pointer;
	padding: 18px;
	width: 100%;
	border: none;
	display:inline-block;
	text-align: left;
	outline: none;
	font-family: 'Open Sans', Noto Sans, sans-serif;
	transition: 0.4s;
}

summary.heading {
	font-weight: 600;
}

summary > p.panel {
	padding: 0 18px;
	background-color: transparent;
	font-size: 1em;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.2s ease-out;
}

details[open] summary ~ * {
  animation: sweep .5s ease-in-out;
}
@keyframes sweep {
  0%    {opacity: 0; margin-top: -10px}
  100%  {opacity: 1; margin-top: 0px}
}

/* Hover to Popup on coarse screens */

@media (pointer: coarse), (hover: none) {
  [title] {
    position: relative;
    display: inline-flex;
    justify-content: center;
  }
  [title]:focus::after {
    content: attr(title);
    position: absolute;
    top: 90%;
    color: #ffffff;
    background-color: #555555;
    border: 1px solid;
    width: 15vh;
    padding: 3px;
    font-size: 12px;
    z-index: 10;
  }

}

/* for popout modals */
/* Ensure modal is hidden on page load */
.modal {
    display: none; /* Hidden initially */
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex; /* Ensure it centers */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Ensure modal content is hidden initially */
.modal-content {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.4);
    text-align: left;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* When modal is open, apply visible styles */
.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content.show {
    opacity: 1;
    transform: scale(1);
}

/* Close button (X) */
.close {
    color: #ff5b5b;
    margin-left: auto;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #ff0000;
}

/* Modal Header */
.modal-header h4 {
    margin: 0;
    font-size: 22px;
    color: #333;
}

/* Modal Body */
.modal-body p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

/* Modal Footer */
.modal-footer {
    margin-top: 15px;
}

/* Span Text Styling */
span.openModal {
    color:#D8A843;
    cursor: pointer;
}

/* Button Styling */
/* Ensure modal-footer aligns buttons properly */
.modal-footer {
    display: flex;
    justify-content: flex-end; /* Aligns content (button) to the right */
    padding-top: 10px;
    width: 100%; /* Ensures it spans the modal */
}

/* Default Close Button (for Desktop) */
.closeModal {
    background-color: #FD9C0D;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    font-weight: bold;
    width: auto; /* Ensures it stays small */
    max-width: 150px; /* Prevents it from stretching */
    margin: 10px 0 10px auto; /* Pushes it to the right */
    display: block; /* Ensures proper width handling */
}

/* Hover Effect */
.closeModal:hover {
    background-color: #F78C00;
}

/* Full-Width Close Button for Mobile */
@media (max-width: 600px) {
    .modal-footer {
        justify-content: center; /* Center the button on mobile */
    }

    .closeModal {
        width: 100%; /* Full width for mobile */
        max-width: unset; /* Ensures it takes full width */
        margin: 10px auto; /* Centers it */
    }
}

/* Full-Width Close Button for Small Screens */
@media (max-width: 480px) {
    .closeModal {
        width: 100%;
        padding: 12px;
    }
}

/****************************************************************
*
*	Styling for new LMI tables
*
*****************************************************************/

        .responsive-table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
        }

        .responsive-table th,
        .responsive-table td {
           border: 1px solid #ddd;
            padding: 10px;
            text-align: left;
        }

        .responsive-table th {
            background-color: #f4f4f4;
        }

        .responsive-table th:not(:first-child), .responsive-table td:not(:first-child)  {text-align: center!important;}

       .responsive-table .NUMBOX {
            width: 100%;
            min-width: 50px;
            max-width: 120px;
            padding: 5px;
            box-sizing: border-box;
            text-align: left;
        }
        
    /* Label needs a bit of room */
    .responsive-table label, .radio-container label {
    	padding: 5px;
      margin: 5px;
    }
    
    .radio-container label:hover {
  padding: 5px;
    border-radius: 5px; / Soft rounded shape /
    vertical-align: top;
    background-color: #C3D4B1;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); / Light shadow for depth /
    transform: scale(1.05); / Slight pop-out effect */

}
        
/* Apply red border to the entire td that contains an empty input */
.td-erreur {
    border: 2px solid #b85c52 !important;
    background-color: #ffe5e5;
}

/* Error message styling */
.error-message {
    display: none;
    color: red;
    font-size: 12px;
    margin-top: 5px;
}

/* Readonly total fields styling */
.NUMBOX[readonly] {
    background-color: #f1f1f1;
    border: none;
}

        .total-row {
            font-weight: bold;
            background-color: #f1f1f1;
        }

@media (max-width: 1001px) {
    /* Ensure #table-body spans the full width of the screen */
    #table-body {
        display: block;
       /* width: 100vw; *//* Full viewport width */
       max-width: 1500px;
        margin: 0;
        padding: 0;
    }

    /* Ensure the table takes up 100% of the screen */
    .responsive-table {
        display: block;
        /*width: 100vw; *//* Makes sure it spans the entire screen width */
       /* max-width:*/ none; /* Removes any restriction */
        margin: 0; /* Removes automatic centering */
    }

    /* Hide table header */
    .responsive-table thead {
        display: none;
    }

    /* Remove table borders */
    .responsive-table th,
    .responsive-table td {
        border: none !important;
    }
    
    /* Label needs a bit of room */
    .responsive-table label {
    	padding: 5px;
    }

    /* Fiscal year blocks occupy full width */
    .fiscal-year-block {
        display: block;
         width: 100%;
       /* width: 97%; */
        text-align: center;
        margin: 0; /* Removes automatic centering */
        border: 1px solid #ddd;
        background: #fff;
        padding: 10px;
    }

    /* Center fiscal year titles */
    .fiscal-year-title {
        font-size: 16px;
        font-weight: bold;
        text-align: center;
        padding: 10px;
        background-color: #f4f4f4;
        border-bottom: 2px solid #ddd;
    }

    /* Fiscal year row contents occupy full width */
    .fiscal-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px;
        border-bottom: 1px solid #ddd;
        width: 100%;
    }

    /* Labels stretch across the full width */
    .fiscal-row td:first-child {
        font-weight: bold;
        text-align: center;
        width: 100%;
        margin-bottom: 5px;
    }

    /* Inputs stretch across the full width */
    .fiscal-row td:last-child {
        width: 100%;
        text-align: center;
    }

    .fiscal-row input {
       /* width: 95%; */ /* Allows small padding but ensures full width */
        max-width: none; /* Ensures it does not get restricted */
        text-align: center;
        padding: 5px;
    }

    /* Ensure total row remains full width */
    .fiscal-year-block .total-row {
        background-color: #e6f7ff;
        font-weight: bold;
        padding: 10px;
        border-top: 2px solid #bbb;
        width: 100%;
    }

    /* Error styles remain unchanged */
    .NUMBOX.erreur {
        border: 2px solid #b85c52 !important;
        background-color: #ffe5e5;
    }

    td.td-erreur {
        border: 2px solid #b85c52 !important;
        background-color: #ffe5e5;
    }
}

/****************************************************************
*
*	Styling for new UI enhancement scripts
*
*****************************************************************/

.rankDropdown td {
	min-width: 30px;
    text-align: center;
}

.invisible {
	visibility: hidden;
	pointer-events: none; /* likely not necessary but here just in case */
}

/************************************************************************************/
/* Animations and special classes for collapsible table
/************************************************************************************/



@keyframes fadeIn {
	0% {display: none;}
	1% {display: block; opacity: 0%;}
	100% {opacity: 100%;}
}

@keyframes fadeOut {
	0% {display: block; opacity: 100%;}
	99% {opacity: 0%;}
	100% {display: none;}
}

th.answered {
	border: 1px solid #a9c94b !important;
	box-shadow: 0px 0px 5px 1px #a9c94b inset !important;
}

th.unanswered {
	/* put something here, maybe. or just a note that this class name can't be used for other stuff*/
}

th.thError {
	border: 1px solid #d44747 !important;
	box-shadow: 0px 0px 5px 1px #d44747 inset !important;
}

/* Style dropdown */
/*        
        .styleDrop {
            padding:5px;
            padding-top:20px;
            display: inline-flex;
            
            .DROPDOWN {
         cursor: pointer;
  	 font-family: inherit;
  	 font-size: 14px;
 	 font-weight: normal;
 	 line-height: 100px;
 	 text-align: left !important;
 	 white-space: nowrap;
 	 border:none;
 	 width:80px;
 	 }
        }

.load {border:0px solid black;background-color:#4CAF50;padding:0px 4px;font-size:1em;border-radius:1px;color:white}
.load:hover {background-color:#3e8e41;box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);}

*/
     
             /* Styling the select dropdown */
	     .styleDrop {display: inline-block; vertical-align: top;width:150px;margin-top: 7px;}
	     
	      @media (max-width: 767px) { 
		 .styleDrop {display: block;}
		 }
	     
	     .styleDrop select {
	         appearance: none; /* Removes default browser styles */
	         background: #ffffff;
	         color: #333;
	         font-size: 12px;
	         font-weight: bold;
	         padding: 2.5px 10px;
	         border: 2px solid #4CAF50;
	         border-radius: 5px;
	         cursor: pointer;
	         outline: none;
	         transition: all 0.3s ease-in-out;
	         max-width:110px;
	         min-width: 110px;
	     }
	     
	     /* Adding a subtle arrow indicator */
	     .styleDrop select {
	         background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23007bff' d='M5 7l5 5 5-5z'/%3E%3C/svg%3E");
	         background-repeat: no-repeat;
	         background-position: right 10px center;
	         background-size: 12px;
	         padding-right: 35px; /* Space for the arrow */
	     }
	     
	     /* Hover effect */
	     .styleDrop select:hover {
	         border-color: #187A1B;
	     }
	     
	     /* Focus effect */
	     .styleDrop select:focus {
	         border-color: #187A1B;
	         box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
	     }
	     
	     /* Disabled state */
	     .styleDrop select:disabled {
	         background: #f8f9fa;
	         color: #888!important;
	         border-color: #ddd;
	         cursor: not-allowed;
	     }
        
	                /* Button styling */
			.load {
	        		background: linear-gradient(135deg, #4CAF50, #24AA28);
	                        color: white;
	                        border: none;
	                        padding: 4.5px 10px;
	                        border-radius: 5px;
	                        cursor: pointer;
	                        font-size: 14px;
	                        transition: background 0.3s ease, transform 0.2s;
	                        display: inline-block;
	                        width:30px;}
	            
	                    .load:hover {
	                        background: linear-gradient(135deg, #24AA28, #187A1B);
	                        /*transform: scale(1.05);*/
	                    }
	            
	                    /*.load:active {
	                        transform: scale(0.98);
        }*/
			
        		/* Button icon */
			.styleDrop i {
			margin-left:-24px;color:white;font-size:14px;pointer-events: none;
			}
			
			.styleDrop:hover > i {color:white;}
			
			/* Reset button styling */
			.resetBtn input {
			width: 30px;
			height: 30px;
			background-color: #FFF !important;
 			border: none;
			}
			
			.resetBtn i {
			margin-left: -24px;
  			color: #4CAF50;
  			font-size: 24px;
  			pointer-events: none;
  			}
			
			.resetBtn:hover > i {color: #4b8c34;}
			

			/* Save PDF button */
			#savePDF {
       			background: linear-gradient(135deg, #4CAF50, #24AA28);
                        color: white!important;
                        border: none;
                        padding: 4.5px 10px;
                        margin-right:10px;
                        border-radius: 5px;
                        cursor: pointer;
                        font-size: 16px;
                        font-weight: 600;
                        transition: background 0.3s ease, transform 0.2s;
                        display: inline-block;
                        width:120px;}
            
                    	#savePDF:hover {
                        background: linear-gradient(135deg, #24AA28, #187A1B);
                        /*transform: scale(1.05);*/
	                    }

/* date ranges */
  .date-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
  }
  .date-input {
    width: 80px;
    text-align: center;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .date-input:focus {
    border-color: #66afe9;
    box-shadow: 0 0 4px rgba(102, 175, 233, 0.6);
    outline: none;
  }
  .date-input::placeholder {
    color: #aaa;
  }