@layer reset, custom-var, hazards-and-controls;

@layer reset{

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}

body {
	line-height: 1;
}

ol, ul {
	list-style: none;
}

blockquote, q {
	quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}
/* Preferred box-sizing value */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Fix mobile Safari increase font-size on landscape mode */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Reapply the pointer cursor for anchor tags */
a, button {
  cursor: revert;
}

/* Remove list styles (bullets/numbers) */
ol, ul, menu, summary {
  list-style: none;
}

/* For images to not be able to exceed their container */
img {
  display: block;
  max-inline-size: 100%;
  max-block-size: 100%;
  border-style: none;
}


table {
  border-collapse: collapse;
  border-spacing: 0;
}
}

@layer custom-var{
  :root{
    --font-family: sans-serif;
    --font-size: .9rem;
    --font-style: bold;
    --font-color:;
    --yellow-line:;
    --grey:hsl(0, 1%, 71%);

  }

  *{font-family:var(--font-family);
    font-size:var(--font-size);
    line-height:1.5;
   }
}

/*--------------------------------------------------------------------------------------------------*/

/*global */

select{
  -webkit-appearance: none;
  -webkit-border-radius: 0;
  border-radius:none;
}


/* name  date location */
input, select, #name{
  padding-inline:6px;
  border:none;
  line-height:1.2;
  background:none;
  color:rgb(14, 85, 227);
}



#name-date input, select[name="location"], select[name="task"], select[name="rules"]{
  border-bottom: 1px dotted var(--grey);
  border-radius:0;
  width:100%;
 
}

label[for="name"], label[for="date"] ,label[for="location"] {
  align-content:end; 
}

#name-date{
  display:grid;
  grid-template-columns: auto 2fr auto 1fr;
  margin: 1rem 0 ;
  gap:.3rem;
}

.yellow-line{
  width:100%;
  height: 3px;
  background:rgb(248, 216, 11);
  margin-block:.3rem;
}

 i{font-size:calc(var(--font-family) - .1rem)}

 form{
  max-width:800px;
  margin:auto;

  .main-container{
    margin:auto;
    width:94%;
  }

 }

.logo{
  display:grid;
  justify-items:end;
  margin-block:1rem;
  }

#logo{
 width:40%;
}

.location, .q-4, .q-2{
  display:grid;
  grid-template-columns: auto 1fr;
  margin: 1rem 0 .5rem;
  align-content:end;
}

.q-1,.q-2,.location{
  margin: .5rem 0 1rem;
}

label[for="yes"] , label[for="no"] {
  margin-left:.6rem;
}

.q-3 span, .q-5 span{
  font-size:.8rem;
  font-style: italic;
}

.q-5{
  margin-block-end:1rem;
}



/* injected input hazard and control input */

.input-style-0, .input-style-1{
  border-top:1px solid black;
  width:100%;
  padding-inline:9px;
  border-radius:0;
  text-align:left;
}

.input-container{
  display:grid;
  grid-template-columns: 1fr 1fr;
}

.input-style-0{
  border-inline-end:1px solid black;
}

/* --------------------------------------- */

.task-input{
  grid-column:1/-1;
  width:100%;
  border-bottom:1px dotted var(--grey);
  margin-block-start:.5em;
  margin-block-end:.5em;
}
  
  .q-4{
    
   & div{
      border-bottom: 1px dotted var(--grey);
      border-radius:0;
    }
  }
  
  .q-4,.hazards-and-controls-container{
    margin-block:1rem;
  }

  [name="rules"]{
    grid-column:1/-1
  }


.hazard-list:not(.hzco-gr .hzco:last-child .hazard-list), .control-list:not(.hzco-gr .hzco:last-child .control-list){
border-block-end:1px solid black;
}

.hazard-list{
  border-inline-end:1px solid black;
  text-align:left;
}


@layer hazards-and-controls {

  .hazards-controls-container{
    border:1px solid black;
    margin-block-start:1rem;
  }

  .hazards-controls{
    background:var(--grey);
    text-align:center;
    border-block-end:1px solid black;
  }

  .hazards-controls,.hzco {
    display:grid;
    grid-template-columns: 1fr 1fr;
  }

  .hzco-gr{
    grid-area:1/-1;
  }

  .bdr-cntr{
    width:100%;
    height:100%;
    border-inline-end:1px solid black;
  }

  .id-controls{
    display:grid;
     
  & div{
    grid-area:1/1; 
    justify-self:end; 
    height:100%;
    width: 2rem;
    /* align-content:center; */
    }
  }
  
  .id-controls strong{
    grid-area:1/1;
    align-content:center;
  }

  .id-hazards{
    display:grid;
    & strong{
      align-content:center;
    }
  }
 
  .add-input{
    display:inline;
    margin:0 .5rem 0 0;
    font-size:1rem;
  &:hover{
    color:rgb(247, 235, 235);
    cursor:pointer;
  }
  }

.hazard-list, .control-list, .input-style-0, .input-style-1, .id-hazards, .id-controls, select[name="rules"]{
  height:1.8rem;
}

.hazard-list option, .control-list option{
  text-align:left;
}
}



