body {
    font-size: 24px;    
    font-family: monospace;
    background-color: black;
    color: white;
}

#title-page {
    font-size: 18px;
    white-space: pre;
    margin-left: 2em;
}

#title-content-flasher {
    text-align: center;
    animation: blink 2s linear infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

#gametable {
    display: grid;
    grid-template-columns: repeat(48, 1em);

    border-style: double;
    border-color: gray;

    user-select: none;

    /*width: 60%;*/
    width: 100%;
    grid-gap: 0px;
    /*aspect-ratio: 1/1;*/

}

#gametable > .cell-holder {
    /*padding:4px;*/
    text-align: center;
    padding: 0px;
    margin: 0px;
    width: 1em;
    height: 1em;
    /*aspect-ratio: 1/1;*/

}
table {
    border-collapse: collapse;
    display: table;

}

.cell {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}


.illuminated {
}

.cell-holder:has(.not-illuminated.seen) {
    background-color: #1c1c1c;
    filter: grayscale(.8);
}

.cell-holder:has(.not-illuminated.never-seen) {
    background-color: #373737;
}

.never-seen {
    display: none;
}

/* hide overlay cells (e.g., items) on tiles that haven't been seen */
.never-seen ~ .cell {
    display: none;
}


/* maze stuff when not illuminated in the maze (after invent), it should be as if not seen */
.maze-tile-pt2.not-illuminated {
    display:none;
}
.maze-tile-pt2.not-illuminated ~ .cell {
    display: none;
}
.cell-holder:has(.maze-tile-pt2.not-illuminated) {
    background-color: #373737;
}

#textbox {
    padding-left: 10%;
    padding-right: 10%;
    overflow: scroll;
    white-space: pre;

    user-select: none;

    border-style: double;
    border-color: gray;
    grid-column: 1/3;

    /* XXX make this height dynamic...... */
    /*height: 8em;*/
    padding: 1em;

    /* so we can put the timer bar at the bottom of it. */
    position: relative;

}

#menu-holder {
    display:grid;
    height:100%;
    display: grid;
    grid-template-rows: 50% 50%;
}

#inventory {
    border-style: double;
    border-color: gray;
    overflow-y: scroll;
    padding: 1em;
}


#menu {
    border-style: double;
    border-color: gray;
    overflow-y: scroll;
    padding: 1em;
}

.title {
    text-align: center;
    text-decoration: underline;
}

.menu-item {
    padding: 3px;
}

.menu-gui {
    display: flex;
    flex-direction: column;
}

.sub-menu-gui {
    padding: 2px;
    margin: 2px;
    border-style: solid;
    border-color: white;

    position: relative;

}

.sub-menu-gui.menu-odd {
    background: #1c1c1c;
}
.sub-menu-gui.menu-even {
    background: #000000;
}

.menu-item.sub-menu-opened:before{
    content: "| ";
}

.menu-item:before{
    content: "  ";
}

.menu-item-sub-menu.sub-menu-opened > .menu-item-text {
    /*color: green;*/
    font-weight: bold;
}

/*
.menu-item-sub-menu.sub-menu-opened > .menu-item-text:has(+.menu-odd) {
    background: #373737;
    border-style: solid;
    border-color: white;
}
.menu-item-sub-menu.sub-menu-opened > .menu-item-text:has(+.menu-even) {
    background: #000000;
    border-style: solid;
    border-color: white;
}
*/


.ephemeral > .menu-item-text {
    /*text-decoration: underline;*/
    background-color: #373737;
}
.menu-item-text:hover {
    /*text-decoration: underline;*/
    background-color: blue;
}

.cell-holder:has(.hi-bc-hovered) {
    background-color:blue;
}

/* hide children that are "underneath" */
.cell:not(:last-child) {
    display:none;
}

.pool-of-blood {
    color: red;
}

.cell.bloodied {
    color: red;
}

#gametable.bloodied {
    border-color: red;
}
#gametable.just-hit {
    border-color: red;
}

#health-bar.bloodied {
    border-color: red;
}
#health-bar.just-hit {
    color: red;
}
#health-bar.just-healed{
    color: green;
}


#gametable.poisoned {
    border-color: #2c552c;
}
#health-bar.poisoned {
    border-color: #2c552c;
}
.cell.poisoned {
    color: #2c552c;
}

body {
    height:100%;
    display: grid;
    /*grid-template-columns: 60% 40%;*/
    grid-template-columns: 75% 25%;
    /*grid-template-rows: auto max-content;*/
    /*grid-template-rows: 75% 25%;*/
    grid-template-rows: 3fr 1fr;
    grid-gap: 10px;
}

.dialogue-state {
    opacity: 0.3;
}

.textbox-prompt {
    margin-bottom: 1em;
}

.textbox-option {
    margin-left: 1em;
    margin-bottom: 1em;
}
.textbox-option:hover {
    /*text-decoration: underline;*/
    background-color: blue;
}

#textbox-option-selected {
    background-color: blue;
}
/*
#textbox-option-selected:before {
    content: "> ";
}
*/

.feature {
    color: purple;
}


#status-holder {
    position: absolute;
    top: 1em;
    left: 1em;
    user-select: none;
    z-index: 3;
}

#health-bar {
    font-size: 12px;
    border-style: solid;
    border-color: gray;
    white-space: pre;
    font-family: monospace;
}

.timer-bar {
    font-size: 12px;
    border-style: solid;
    border-color: gray;
    white-space: pre;
    font-family: monospace;

    position: absolute; /* absolute rel to parent if parent is position: relative */
    bottom: 1em;
    user-select: none;
    z-index: 3;
}


.active-statue {
    color: green;
}

.cell.item {
    color: #aa3ce8;
}
