/* 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 */

.ttRules {
  container-type: inline-size;
  box-sizing: border-box;
  width: 100%;
  max-width: 1000px;
  margin: auto;
  padding: clamp(8px, 2.5cqi, 24px);
  color: #352719;
  font-size: clamp(14px, 1.8cqi, 16px);
  line-height: 1.55;
  overflow-wrap: break-word;
}
.ttRules *, .ttRules *::before, .ttRules *::after { box-sizing: border-box; }
.ttRules h2 {
  margin: 1.8em 0 .7em;
  padding-bottom: .2em;
  border-bottom: 1px solid #b79764;
  color: #593b20;
  font-size: clamp(1.35rem, 4cqi, 1.75rem);
  line-height: 1.2;
}
.ttRules h3 { margin: .4em 0 .6em; color: #593b20; line-height: 1.25; }
.ttRules h4 { color: #593b20; }
.ttRules h1 {
  margin: 0 0 1em;
  padding: .55em .7em;
  border: 1px solid #8f6028;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(135deg, #6c421f, #9a672e);
  color: #fff3d6;
  font-size: clamp(1.55rem, 5cqi, 2.25rem);
  line-height: 1.15;
  text-shadow: 0 1px 1px #38210f;
  box-shadow: 0 3px 8px #4a2c1530;
}
.ttRules p { margin: .65em 0; }
.ttRules ul, .ttRules ol { margin: .65em 0; padding-left: 1.6em; }
.ttRules li + li { margin-top: .35em; }
.ttRules img { max-width: 100%; height: auto; vertical-align: middle; }
.ttRules .rule-rows {
  margin: .75em 0;
}
.ttRules .rule-rows > .flex {
  justify-content: flex-start;
  margin-bottom: .65em;
}
.ttRules .column { min-width: 0; }
.ttRules .city-card { height: 30px; }
.ttRules .carriage-points { border-collapse: collapse; }
.ttRules .carriage-points th,
.ttRules .carriage-points td {
  padding: .25em .5em;
  border: 1px solid #b79764;
  text-align: left;
}
.ttRules img[src$="/postillion.webp"],
.ttRules img[src$="/postmeister.webp"],
.ttRules img[src$="/amtmann.webp"],
.ttRules img[src$="/wagner.webp"] { width: 42px; max-width: 42px; }
.ttRules img[src$="/postalCarrier.webp"],
.ttRules img[src$="/postmaster.webp"],
.ttRules img[src$="/administrator.webp"],
.ttRules img[src$="/cartwright.webp"] { width: 72px; max-width: 72px; }

@container (max-width: 700px) {
  .ttRules h2 { margin-top: 1.45em; }
  .ttRules ul, .ttRules ol { padding-left: 1.35em; }
}
