/* 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 */

/* Shared by the standalone rules, inline side panel and Bootstrap popovers. */
.rules.ccRules { container-type: inline-size; color: #30271e; background: #fffaf0; padding: clamp(12px, 3%, 32px); font: 1rem/1.6 system-ui, sans-serif; overflow-wrap: anywhere; }
.ccRules h1, .ccRules h2, .ccRules h3 { color: #654b2e; line-height: 1.25; clear: both; }
.ccRules h1 { font-size: 2rem; }
.ccRules h2 { font-size: 1.5rem; padding-top: 1rem; border-bottom: 2px solid #c9ac77; }
.ccRules h3 { font-size: 1.15rem; }
.ccRules a { color: #79501b; text-decoration: underline; }
.ccRules img { max-width: 100%; height: auto; }
.ccRules .itemisation { list-style: none; margin-left: 0; padding-left: 0; }
.ccRules .itemisation li { display: grid; grid-template-columns: 2.5ch minmax(0, 1fr); column-gap: .75rem; }
.ccRules .itemisation .itemcnt { width: auto; float: none; text-align: right; white-space: nowrap; }
.ccRules .itemisation .item { margin-left: 0; }
.ccRules ul, .ccRules ol { padding-left: 1.4rem; }
.ccRules li { margin-bottom: .45rem; }
.ccRules .ccRuleCard { display: flow-root; padding: 1rem; margin-block: .75rem; background: white; border: 1px solid #ddcba8; border-radius: .6rem; }
.ccRules .ccRuleContents { padding: 1rem; background: #f3e7cf; border-radius: .6rem; }
.ccRules .ccRuleContents ul { margin: 0; }
.ccRules .ccRuleGrid { gap: .75rem; margin-block: 1rem; }
.ccRules .ccRuleGrid > .column { flex: 1 1 calc(50% - .375rem); box-sizing: border-box; margin: 0; min-width: 0; }
.ccRules .ccRuleGrid > .ccRuleWide { flex-basis: 100%; }
.ccRules .ccRuleCard ol, .ccRules .ccRuleCard ul { clear: both; }
.ccRules .ccRuleCard h3 { clear: none; margin: 0 0 .4rem; }
.ccRules .ccRuleImage { width: 88px; max-width: 35%; float: left; margin: 0 1rem .5rem 0; }
.ccRules .ccRuleRedSide { clear: both; color: #8c251b; padding-top: .75rem; }
#panelRules .ccRules .noSidebar { display: none; }
.ccPopover { max-width: min(460px, calc(100vw - 24px)); }
.ccPopover .popover-body { max-height: min(70dvh, 600px); overflow: auto; }
/* All Carson City dialogs share the same quiet parchment surface. */
.ccRulesPopover, .ccPopover.carsoncity2-state-1 { width: min(460px, calc(100vw - 24px)); }
.ccPopover, body.carsoncity2 .modal-content {
    --bs-popover-bg: #f8edcf;
    --bs-popover-border-color: #b59660;
    --bs-popover-body-color: #30271e;
    --bs-modal-bg: #f8edcf;
    --bs-modal-color: #30271e;
    --bs-modal-border-color: #b59660;
    --bs-modal-header-border-color: #ddcba8;
    --bs-modal-footer-border-color: #ddcba8;
    background-image: radial-gradient(ellipse at top left, #fffaf0, transparent 75%),
        linear-gradient(135deg, #f8edcf, #f0dfb5);
    box-shadow: 0 5px 18px rgb(48 39 30 / 22%);
}
.ccPopover .ccRules, .ccPopover .ccRules .ccRuleCard { background: transparent; }
.ccPopover .ccRules .ccRuleCard { border-color: #c9ac77; }
.ccPopover .ccRules { padding: .25rem; }
.ccPopover .ccCompactRules {
    padding: .125rem 0;
    font-size: .9rem;
    line-height: 1.35;
}
.ccCompactRules h2 {
    margin: 0 0 .25rem;
    padding: 0 0 .25rem;
    font-size: 1rem;
}
.ccCompactRules .ccRuleCard {
    margin: 0;
    padding: .375rem 0;
    border: 0;
    border-radius: 0;
}
.ccCompactRules .ccRuleCard + .ccRuleCard {
    border-top: 1px solid #ddcba8;
}
.ccCompactRules .ccRuleCard h3 {
    margin: 0 0 .125rem;
    font-size: .95rem;
}
.ccCompactRules .ccRuleImage {
    width: 44px;
    margin: 0 .5rem .125rem 0;
}
.ccCompactRules ol { margin-bottom: .25rem; }
.ccCompactRules li { margin-bottom: .25rem; }
.ccCompactRules p { margin: .375rem 0 0; }
.ccPersonalityHelp .ccRuleImage { width: 52px; }
.ccPopover img.building { width: min(240px, 55vw); height: auto; }
.ccPopover .personalBuildings img.building { width: 70px; height: auto; }
.ccPopover .meeple { display: inline-block; width: 1.4em; }
.ccPopover .meepleImg { width: 100%; }
