/* add all special styles used for displaying the rules */
/* .rules: used for all elements loading rules (rules at main site, rules ingame, popup with rules extract
   #rules: div with complete rules used at main site
   #rulesPage: ingame rules page display
   #panelRules: ingame rules sidepanel display
   #popup.rules: popup with rules extract only */


/* add special fonts if wanted */

/* add styles for headers h1-h5 if needed*/

/* cover picture only in main rules */
#rules .cover {    width: 60%;    margin-left: 20%;}
#panelRules .cover {    display: none;}

.rules .content ul {list-style-type: none;}

/* flex style for responsive display */
.rules .flex { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5em; }
@media (max-width: 768px) {
    .rules .flex.mobile { flex-direction: column; /* columns below each other */  }
}
#panelRules .flex.mobile { flex-direction: column; }
.rules .flex .column {    flex: 1; }
.rules .flex .column.wide {    flex: 2; }


/* example variable flex structure putting flexboxes half their wide on wide screen full rules
.rules  .flex.appendix .flexbox { flex: 2 2 23%;  padding:0.5em; padding-right: 1em;}
.rules  .flex.appendix .flexbox img { height:5em; float: left; margin-right: 1em; }
@media (max-width: 1024px) {
    .rules .flex.appendix .flexbox { flex: 2 2 48%; }
}
#panelRules .flex.appendix .flexbox { flex: 2 2 48%; }
*/


/* Examples */
.rules .example { font-style: italic; } /* put your example style here */
#panelRules .example { display: none; } /* examples should not be shown in sidebar */

/* Up or Down? typography and artwork. */
/* add all special styles used for displaying the rules */

/* .rules: used for all elements loading rules (rules at main site, rules ingame, popup with rules extract
   #rules: div with complete rules used at main site
   #rulesPage: ingame rules page display
   #panelRules: ingame rules sidepanel display
   #popup.rules: popup with rules extract only */
   
@font-face {
  font-family: 'RampartOne';
  src: local('RampartOne'),
       url('fonts/RampartOne-Regular.ttf') format('TrueType');
}   

@font-face {
  font-family: 'laCartoonerie';
  src: local('laCartoonerie'),
       url('fonts/laCartoonerie.TTF') format('TrueType');
} 

.rules { padding: 0.5em; text-shadow: none; }

#rules .cover { width: 60%; margin-left: 20%; }
#rulesPage .cover { width: 40%; margin-left: 25%; }
#panelRules .gameTitle { font-size: 1.5em;}

.rules h1 {
  text-align: center;
  border: none;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  color: black;
  text-transform: uppercase;
  padding: 4px;
  font-size: 2.5em;
  font-weight: bold;
  font-family: 'RampartOne';
}
#panelRules h1 {
  padding: 2px;
  font-size: 1.4em;
}

.rules h2 {
  color: black;
  font-size: 1.7em;
  font-family: 'laCartoonerie';
  text-transform: uppercase;
  font-weight: bold;
}
#panelRules h2 {
  margin-bottom: 0.5em;
  font-size: 1.3em;
 }

.rules h3 {
  font-size: 1.2em;
 }
 #panelRules h3 {
  font-size: 1.1em;
 }

.rules ul {  list-style-type: disc; }
.rules ul>li::marker  {
	font-size:1.5em;
}

/* sidebar or not sidebar */
#panelRules .noSidebar { display:none; }
.ui-popup .rules .nopopup { display:none; }
.modal-content .rules .nopopup {    display: none;}
.rules .sidebarOnly { display:none; }
#panelRules .sidebarOnly { display:inherit; }

.rules img.inlinepic {
    height: 1.5em;
}

/* example boxes */
.rules .example {
  padding: 0.5em 0.5em 0.5em 0.5em;
  margin-left: 1em;
  font-style: italic; 
  text-align: center;
  max-width: 30em;
}
#panelRules .example { display: none; }
.rules .example img {display: block; width: 100%; height: auto;}
.rules .example .text { float:left; background-color: #CDD2D6; color: red; font-style: italic; margin:0.5em; box-shadow: 10px 0px 10px #CDD2D6, -10px 0px 10px #CDD2D6; padding: 0.5em;}

.rules .example.discard img {width: 48%; float: left;}


/* Keep artwork labels relative to their own column. */
.rules .flexbox { padding: .3em; border-radius: .3em; container-type: inline-size; }

/* pictures with text */
.rules .picwithtext { margin: 0.5em; position: relative !important; }
.rules .picwithtext img { display: block; width: 100%; height: auto; float: none; }
.rules .picwithtext > div { position: absolute; transform: translate(-50%, -50%); font-family: 'laCartoonerie'; font-size: clamp(0.4em, 4cqw, 1.5em); line-height: 1em;}
@supports not (width: 1cqw) {
.rules .picwithtext > div { font-size: var(--gcf-upordown-v50);}}

.rules .picwithtext.colours {width: 30%; float: right; margin-left: 1em; margin-top: -4.5em;}
.rules .picwithtext.colours .text1 {left: 25%; top: 26%; font-size: clamp(0.8em, 2vw, 1.8em);}
.rules .picwithtext.colours .text2 {left: 50%; top: 26%; font-size: clamp(0.8em, 2vw, 1.8em);}
.rules .picwithtext.colours .text3 {left: 75%; top: 26%; font-size: clamp(0.8em, 2vw, 1.8em);}
.rules .picwithtext.colours .text4 {left: 25%; top: 58%; font-size: clamp(0.8em, 2vw, 1.8em);}
.rules .picwithtext.colours .text5 {left: 50%; top: 58%; font-size: clamp(0.8em, 2vw, 1.8em);}
.rules .picwithtext.colours .text6 {left: 75%; top: 58%; font-size: clamp(0.8em, 2vw, 1.8em);}

.rules .picwithtext.handcards {float: right; width:  clamp(10em, 25%, 17em); }
.rules .picwithtext.handcards .text {left: 50%; top: 83%; color: #DBA127; font-size: clamp(0.8em, 2vw, 1.8em);}

.rules .picwithtext.gameprep_general .text1 {left: 26%; top: 20%; max-width: 10em; font-weight: bold;}
.rules .picwithtext.gameprep_general .text2 {left: 15%; top: 56%; max-width: 10em; text-align:right; color: #015AAA;}
.rules .picwithtext.gameprep_general .text3 {left: 77%; top: 56%; max-width: 10em; color: #00AEEF;}

.rules .picwithtext.gameprep_personal {max-width: 30em; margin-top: -1em; }
.rules .picwithtext.gameprep_personal .text1 {left: 36%; top: 20%; max-width: 10em; font-weight: bold;}
.rules .picwithtext.gameprep_personal .text2 {left: 23%; top: 58%; color: #606060;}

.rules .picwithtext.scoring { margin-left: 0em; margin-right: -9vw; }
.rules .picwithtext.scoring.s2 { margin-left: -9vw; margin-right: 0em; margin-top: 5em;}
@media (max-width: 768px) {
      .rules .picwithtext.scoring { margin-left: 0em; margin-right: 0em; }
      .rules .picwithtext.scoring.s2 { margin-left: 0em; margin-right: 0em; margin-top: -8em;}
    }
.rules .picwithtext.scoring .scoring-scale { left: 59%; top: 30%; position: absolute; transform: translate(-50%, -50%); width: 65%; font-size: clamp(0.8em, 1vw, 1.1em); line-height: 1.1em;  }
.rules .picwithtext.scoring .scoring-scale2 { left: 42%; top: 76%; position: absolute; transform: translate(-50%, -50%); width: 75%; font-size: clamp(0.8em, 1vw, 1.1em); line-height: 1.1em;  }
.rules .picwithtext.scoring .text { left: 59%; top: 42%; max-width: 10em; color: #606060; font-size: clamp(0.8em, 0.9vw, 1em);}
.rules .picwithtext.scoring .scoring-table { white-space: nowrap;}
.rules .picwithtext.scoring .scoring-title { font-size: 1.1em; margin-bottom: .35em; font-weight: bold;}
.rules .picwithtext.scoring .scoring-row { display: flex; justify-content: space-between; gap: 1.5em;}
.rules .picwithtext.scoring .scoring-row > span:last-child { text-align: right;}
.rules .picwithtext.scoring .scoring-total { display: flex; justify-content: space-between; gap: 1.5em; margin-top: .3em; font-weight: bold;}
.rules .picwithtext.scoring .scoring-total > span:last-child { border-top: 1px solid black;}


/* special pictures*/
.rules .cards { width: 50%; float: left; margin-right: 1em;}


#panelRules .picwithtext.scoring, #panelRules .picwithtext.scoring.s2 { margin: 0; }
.rules .flex.mobile > .column { min-width: 0; }
