
/* --------------- GLOBAL --------------- */

/* 2024-12-11 MW now doing CSS custom properties to only have to change colours in 1 place. these are case sensitive. colours are our brand colours from marketing team */
:root {
  --IFF-Dark: #005547; /* dark green, used as main background color, categorical hover colour etc */
  --IFF-Med: #2CE3A0; /* lighter green, used for grid headers at left and top, RGB = 44, 227, 160 */
  --IFF-Alt1: #F1B434; /* yellow by default, for nav button and progress dots */
  --IFF-Alt2: #B70050; /* pink by default, for nav button and dashed outline */
}


*{
	box-sizing: border-box;
	font-family: 'Montserrat', sans-serif;
}

/* THIS PREVENTS A MOBILE DEVICE FROM ZOOMING-IN WHEN THE DEVICE IS IN LANDSCAPE */
html {
	-webkit-text-size-adjust: none;
}

a{
	overflow-wrap: break-word;
	word-wrap: break-word;
	word-break: break-word;
}

input:focus {
    outline: 2px dotted var(--IFF-Alt2);
}

body{
	margin:0px;
	background-color: var(--IFF-Dark);
	line-height:150%;
	font-size: 12pt;
}

input, textarea{
	font-size: inherit;
}

sup, sub {
  vertical-align: baseline;
  position: relative;
  top: -0.6em;
}

sub {
  top: 0.3em;
}

li:not(:last-child){
	margin-bottom: 5px;
}

h1, h2{
	line-height: 110%;
}

/* --------------- BACKGROUND IMAGE / RADIAL GRADIENT --------------- */

.bg {
	top: 0px;
	left: 0px;
	height: 100vh;
	width: 100vw;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	z-index: -1;
	position: fixed;
	margin: 0px;

	/*BACKGROUND IMAGE*/
	background-image: url('https://portal.iffresearch.com/SPSSMR/ImageCache/ImageCache.aspx?Project=Templates&File=bg.jpg');
	/*OPACITY OF BACKGROUND IMAGE (range 0 to 1) (0=completely transparent/1=no effect)*/
	opacity: 0.1;
	/*BLUR IMAGE IF RESIZING HAS MADE IT JAGGED (higher the value the more blurred)*/
	/*filter: blur(3px);*/
}

/* --------------- CONTAINERS --------------- */

.page-container{
	width: 950px;
	margin-top: 70px;
	margin-bottom: 40px;
	margin-left: auto;
	margin-right: auto;
}

.question-container{
	background-color: white;
	width: 100%;
	min-height: 200px;
	border-radius: 20px;
	padding-top: 30px;
	padding-bottom: 30px;
	padding-left: 30px;
	padding-right: 30px;
	vertical-align: top;
	/*COMMENT IN BELOW TO ADD BORDER & DROP SHADOW*/
	/*border: 2px solid #7f7f7f;*/
	/*box-shadow: 0px 11px 20px #7b7b7b;*/
}

.navigation-container{
	width: 100%;
	margin-top:20px;
	text-align: center;
}

/* --------------- SECTION TEXT AND PROGRESS DOTS --------------- */

.ProgressBarContainer {
	/*COLOUR OF PROGRESS BAR*/
	background-color: var(--IFF-Dark);
	padding: 2px;
	border-radius: 5px;
	margin-bottom: 20px;
	height: 20px;
	width: 100%;
}

.SectionText {
    font-size: 12pt;
    /*COLOUR OF PROGRESS BAR TEXT*/
	background-color: var(--IFF-Dark);
    padding: 5px 10px 5px 10px;
    border-radius: 5px;
    color: white;
}

div[class^="progressdot-container"] {
  float: right;
}

.progressdot-off {
  height: 15px;
  width: 15px;
  /*COLOUR OF PROGRESS DOTS (OFF)*/
  background-color: white;
  border-radius: 50%;
  display: inline-block;
  margin: 5px;
}

.progressdot-on {
  height: 15px;
  width: 15px;
  /*COLOUR OF PROGRESS DOTS (ON)*/
  background-color: var(--IFF-Alt1);
  border-radius: 50%;
  display: inline-block;
  margin: 5px;
}

/* --------------- EXPANDO --------------- */

.expando-container{
	width: 100%;
	background-color: #e4e4e4;
	border-radius: 10px;
	padding:15px;
	margin-bottom: 10px;
	color: black;
}

/* expandos inside categories or grid left side, don't do a bottom margin as it looks wonky. 2024-02-21 MW */
.mrMultipleText .expando-container, .mrGridCategoryText .expando-container, .mrSingleText .expando-container{
	margin-bottom: 0px;
}

.expando-container-grid{
	width: 100%;
	background-color: #e4e4e4;
	border-radius: 10px;
	padding:10px;
	margin-top: 10px;
	color: black;
}

.expando-header{
	font-weight: bold;
	cursor: pointer;
}

.expando-header:hover{
	color: #002554;
}

.expando-icon-open::before{
	content: url(https://portal.iffresearch.com/SPSSMR/ImageCache/ImageCache.aspx?Project=Templates&File=img/expando_plus_sign_b.svg);
	width: 24px;
	height: 24px;
	margin: 0px 10px 0px 0px;
	display: inline-block;
	vertical-align: top;
	background: transparent;
}

.expando-icon-close::before{
	content: url(https://portal.iffresearch.com/SPSSMR/ImageCache/ImageCache.aspx?Project=Templates&File=img/expando_minus_sign_b.svg) !important;
}

.expando-content-show{
	display: block !important;
}


/* --------------- SIDEBYSIDE TABLE --------------- */

.sidebyside-table {
    display: table;
	border: none;
    width: 100%;
}
.sidebyside-tr {
    display: table-row;
	border: none;
}
.sidebyside-td {
    display: table-cell;
	vertical-align: top;
	border: none;
}

.sidebyside-rowheader {
    padding-top: 25px;
	width: 175px;
}

.sidebyside-error {
	width: 100%;
	text-align: center;
}

/* --------------- NAVIGATION BUTTONS --------------- */

.mrNext, .mrPrev, .mrStop, .IFFNext, .IFFPrev, .IFFStop {

	/*UNPICKED NAVIGATION BUTTON COLOUR*/
	background-color: var(--IFF-Alt1);
	border-radius: 15px;  
	font-family: 'Montserrat', sans-serif;
	font-size: 14pt;
	font-weight: bold;

	/*UNPICKED NAVIGATION BUTTON TEXT COLOUR*/
	color: black;
	padding: 10px;
	text-decoration: none;
	cursor: pointer;

	/*NAVIGATION BUTTON BORDER COLOUR*/
	border: 3px solid white;

	/*NAVIGATION BUTTON DROP SHADOW*/
	/*box-shadow: 0px 11px 20px #7b7b7b;*/

	min-width: 130px;
	margin: 5px;
	display: inline-block;
	line-height: 150%;
}

.mrNext:hover, .mrPrev:hover, .mrStop:hover,.IFFNext:hover, .IFFPrev:hover, .IFFStop:hover{
	/*HOVER NAVIGATION BUTTON COLOUR*/
	background-color: var(--IFF-Alt2);
	/*HOVER NAVIGATION BUTTON TEXT COLOUR*/
	color: white;
	/*HOVER NAVIGATION BUTTON BORDER COLOUR*/
	text-decoration: none;
}

.iff-navbuttons {
	display: none;
}


.throb{
	animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(238, 252, 54, 1);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(238, 252, 54, 0);
    }
    100% {
        box-shadow: 0 0 0 60px rgba(238, 252, 54, 0);
    }
}

/* --------------- SURVEY COMPONENTS --------------- */

textarea{
	width: 95%;
}

span[id^="Cell"], .iffcell {
	display: inline-block;
    /*CATEGORICAL RESPONSE BORDER*/
	border: 2px solid var(--IFF-Dark);
    border-radius: 7px;
    padding: 7px;
    box-sizing: border-box;
    margin-top: 15px;
    width: 100%;
	/*CATEGORICAL RESPONSE BACKGROUND*/
	background-color: #e4e4e4;
	cursor: pointer;
}

/* This style will make the Radio / Checkbox buttons bigger. */
.mrSingle, .mrMultiple[id*="_C"], .mrMultiple[id*="_F"], .mrMultiple[id*="_X"] {
	height: 25px;
	width: 25px;
	vertical-align: middle;
}

/* if can ever be bothered to make this safari macos only
.safari-only {

	transform: scale(2);
	height: unset;
	width: unset;
	margin-right: 7px;
	margin-left: 5px !important;
}
*/

:not(td) > input[type="radio"], :not(td) > input[type=checkbox]{
	margin-top: 0px;
	margin-bottom: 0px;
}

/* for iterated grid, add a bit of gap between radio/cbox and label */
.iffIterGridRadCheck{
	margin-right: 5px;
}

.mrQuestionTable, .mrSingle, .mrMultiple{
	margin-left: 0px !important;
}

.IFFWarn {
	color: black !important;
	font-weight: bold;
	padding: 10px;
	border-left: 5px solid orange; /* simple thick orange bar on left for emphasis */
	background-color: wheat !important; /* is !important solely to stop hovering from changing it */
	margin-bottom: 2px;
	display: inline-block !important;
}

.mrErrorText {
	color: black !important; /* dims generates this with inline style of red, but now we're doing a light red background we want the text to be black */
	font-weight: bold;
	padding: 10px;
	border-left: 5px solid red; /* simple thick red bar on left for emphasis */
	background-color: pink !important; /* is !important solely to stop hovering from changing it */
	margin-bottom: 2px;
	display: inline-block !important; /* has to be inline-block for margin-bottom to work, has to be !important for when grids are iterated */
}

/* just tidying the margins when error is in a code span e.g. if tick other specify but don't type anything in // doing the same in gridtext style */
span > .mrErrorText {
	margin-top: 8px;
}


/* 2024-12-11 MW don't know why these 2 are empty */
.mrQuestionText {

}

.mrBannerText {

}

.mrSingleText, .mrMultipleText { 
	display:inline-block;
	width: 80% !important;
	vertical-align: middle;
}


/*  UNCOMMENT THIS TO UNBOLD ALL CATEGORICAL CATEGORY LABELS

.mrSingleText b, .mrMultipleText b{
	font-weight: lighter !important;
}

*/

.mrEdit, .mrDropdown {
	border: 2px solid var(--IFF-Dark);
	border-radius: 7px;
	padding: 10px;
	width: 100%;
	margin-left: 0px !important;
	margin-top: 15px;
}

td[id^="Cell."]{
	border: 10px solid transparent !important;
}

/* select grid cells (td) that are direct children of a row (tr) that is being hovered. also the cell is not in row/column 1 and not a grey hidden code in a jagged grid */
tr:hover > td[id^='Cell']:not([id*='.0']):not(.hiddencode){
	background-color: rgba(44, 227, 160, 0.5) !important; /* using rgba and not opacity no longer for IE support but because it works better // the RGB values here are just --IFF-Med but set to 50% opacity */
}

/*
	1) span cells (normal categorical codes) being hovered,
	2) iffcell is our shaffed down version of a grid, being hovered like 1
	3) cells (td) THAT ARE BEING HOVERED, and are direct children of a row (tr) being hovered. also the cell is not in row/column 1 and not a grey hidden code in a jagged grid
*/
span[id^='Cell']:hover, .iffcell:hover, tr:hover > td[id^='Cell']:hover:not([id*='.0']):not(.hiddencode){
	/*HOVER GRID CELL/CATEGORICAL CODE*/
	background-color: var(--IFF-Dark) !important;
	/*HOVER CATEGORICAL CODE (GRID CELLS OVERIDDEN BELOW) BORDER COLOUR*/
	border: 2px solid var(--IFF-Dark) !important;
	/*HOVER GRID CELL/CATEGORICAL CODE TEXT COLOUR*/
	color: white !important;
}

tr:hover > td[id^='Cell']:hover:not([id*='.0']):not(.hiddencode){
	/*HOVER GRID CELL BORDER COLOUR (has to be 10px not 2px as above otherwise when grid has 1 row it'll vibrate on hover)*/
	border: 10px solid var(--IFF-Dark) !important;
}

/* when hovering normal categories or shaffed categories, put a white background behind any red error so it's not red on green which is hard to read */
span[id^='Cell']:hover .mrErrorText, .iffcell:hover .mrErrorText{
	background-color: white;
}

/* this is the cell on the left side of a grid */
.mrGridCategoryText{
	width: 100%;
	border-top-left-radius: 7px;
	border-bottom-left-radius: 7px;
	/*GRID SIDE COLOUR*/
	background-color: var(--IFF-Med);
	color: black;
}

/* this is the cell on the top of a grid */
.mrGridQuestionText{
	width: 100%;
	border-top-left-radius: 7px;
	border-top-right-radius: 7px;
	/*GRID TOP COLOUR*/
	background-color: var(--IFF-Med);
	color: black;
}

.questions-spacer:not(:last-child){
	margin-bottom: 40px;
}

.pleasepressnext{
	width: 100%;
	text-align: center;
	font-family: Arial;
	font-size: larger;
	border: 2px dashed grey;
	background-color: #fadfad;
	padding: 7px;
	border-radius: 7px;
	font-style: italic;
	color: grey;
	margin-top: 40px;
}

.hiddencode, .hiddencode:hover{
	background-color: dimgray !important;
	opacity: 1 !important;
}

/* --------------- LABELS ABOVE GRID HEADER --------------- */
/* replace category label for 1 and 5 (or 1 and 10) with these, the "not at all" will go above the grid and the header cells will be the same size.
on mobiles it'll just be like "1 - Not at all" // need to put it in a text sub for CATI
example:
<span style='position: relative;'>1<span class='gridtopfloatinglabel1'>Not at all...</span></span><span class='gridhide'> - Not at all</span>
<span style='position: relative;'>10<span class='gridtopfloatinglabel2'>...Completely</span></span><span class='gridhide'> - Completely</span>
*/

.gridtopfloatinglabel1{
	position: absolute;
	bottom: 55px;
	right: -170px;
	font-weight: bold;
	color: black;
	width: 200px;
	text-align: left;
}

.gridtopfloatinglabel2{
	position: absolute;
	bottom: 55px;
	right: -15px;
	font-weight: bold;
	color: black;
	width: 200px;
	text-align: right;
}

.gridhide{
	display: none;
}

@media (max-width: 900px) {
	.gridtopfloatinglabel1{
		display: none;
	}

	.gridtopfloatinglabel2{
		display: none;
	}
}

/* --------------- LOGOS --------------- */

.logo-container{
	width: 100%;
	margin-bottom: 30px;
	vertical-align: bottom;
	font-size: 0;
	line-height: normal;
}

.left-logo-container{
	display: inline-block;
	text-align: left;
	width: 50%;
}

.right-logo-container{
	display: inline-block;
	text-align: right;
	width: 50%;
}

.left-logo{
	display: inline-block;
	/* CHANGE THIS TO CHANGE SIZE OF LEFT LOGO (usually client) */
	width: 200px;
	height: 100%;
}

.right-logo{
	display: inline-block;
	/* CHANGE THIS TO CHANGE SIZE OF RIGHT LOGO (usually IFF - gets hidden on smaller screens) */
	width: 200px;
	height: 100%;

}

/* --------------- HIDE COLUMN HEADER FOR A GRID ---------------
td[id^="Cell"]{
	padding:10px;
	width:250px;
}

td[id^="Cell.0"]{
	display:none;
}
*/


.gridColumnSpacer100 {width: 100px;}
.gridColumnSpacer200 {width: 200px;}
.gridColumnSpacer300 {width: 300px;}
.gridColumnSpacer400 {width: 400px;}
.gridColumnSpacer500 {width: 500px;}


/* --------------- MEDIA QUERIES --------------- */

@media (max-width: 1000px) {

	.page-container{
		width: 95%;
		min-width: 300px !important;
		margin: 20px auto;
	}

	.question-container{
		padding:20px;
	}
}

@media (max-width: 800px) {

	*:not(h1):not(h2){
		font-size: 10pt;
	}

	.SectionText{
		text-align: center;
		padding: 5px 5px 5px 5px;
	}

	.mrSingleText, .mrMultipleText { 
		width: 74% !important;
	}

	div[class^="progressdot-container"] {
	  float: none;
	  margin-top: 3px;
	}

	.progressdot-off, .progressdot-on {
	  height: 8px;
	  width: 8px;
	  margin: 3px;
	}

	.mrNext, .mrPrev, .mrStop, .IFFNext, .IFFPrev, .IFFStop {
		font-size: 11pt;
		min-width: 100px;
	}

	.gridColumnSpacer100 , .gridColumnSpacer200 , .gridColumnSpacer300, .gridColumnSpacer400, .gridColumnSpacer500 {
		width: auto;
	}
}

/* CHANGE THE 750 BELOW TO A LOWER NUMBER TO LET THE LOGOS GET CLOSER TOGETHER. about 400-450 px is a sensible number if both logos are roughly the same size as the IFF logo

Fancier: If you reduce the width of the logos you can get even smaller to allow both logos to be visible on mobiles. Modern mobiles are about 370-420 px wide (portrait viewport width is what matters, not actual screen pixels). So I usually try get the 750 down to 350 if possible (only iphone 5/SE gen1 is <350 wide [at 320] and in common use in 2021)
*/
@media (max-width: 750px) {

	.logo-container{
		text-align: center;
		margin-bottom: 20px;
	}

	.left-logo-container{
		text-align: center;
		width: 100%;
	}

	.left-logo{
		width: 150px;
	}

	.right-logo{
		width: 150px;
		display: none;
	}
}

@media (max-width: 425px) {

	.sidebyside-table {
		display: block;
	}
	
	.sidebyside-tr {
		display: block;
	}
	
	.sidebyside-td {
		display: block;
	}

	.sidebyside-rowheader {
		padding-top: 0px;
	}

	.sidebyside-error {
		text-align: left;
	}
}