@import url('https://fonts.googleapis.com/css2?family=Eagle+Lake&display=swap'); /* font h */
@import url('https://fonts.googleapis.com/css2?family=Poiret+One&display=swap'); /* font p */


:root {
  --color-body-background: #FEE8C3;
  --color-dnd-red-dark: #CC0000E5;
  --color-dnd-red-light: #FF7070E5;
  --color-transparent-dark: #00000050;
  --color-header: #454731;
  --color-body: #6F6B49;
  --color-body-light: #6f6b4922;
  --font-h: 'Eagle Lake', serif;
  --font-p: 'Poiret One', sans-serif;
}

body {
    background: var(--color-body-background);
    font-family: var(--font-p);
    max-width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#main {
    padding: 0px 10%;
    flex-grow: 9;
}

.hidden {
    visibility: hidden;
}

.transparent-dark {
    color: var(--color-transparent-dark);
}


/* |   | |||||  |||  ||||  ||||| ||||
/* |   | |     |   | |   | |     |   |
/* ||||| ||||  ||||| |   | ||||  ||||
/* |   | |     |   | |   | |     | |
/* |   | ||||| |   | ||||  ||||| |  || */

#header {
    background: var(--color-body-light) url(../images/header/header_background_image.webp) no-repeat 30% 100% / cover;
    height: 200px;
}

#header-h {
    color: var(--color-body-background);
    font-family: var(--font-h);
    text-align: center;
    padding-top: 20px;
}

#header-p {
    color: var(--color-dnd-red-light);
    text-align: center;
    margin: 10px 0px;
    font-size: 15px;color: var(--color-dnd-red-dark);
    font-weight: bold;
}


/* |   |  |||   ||||  |||| ||||  | ||||  |||||
/* ||  | |   | |     |     |   | | |   |   |
/* | | | |   |  |||  |     ||||  | ||||    |
/* |  || |   |     | |     | |   | |       |
/* |   |  |||  ||||   |||| |  || | |       |  */

#header-p,
#main {
    display: none;
}

noscript,
#main404 {
    width: 100%;
    padding: 5px;
    text-align: center;
    position: fixed;
    top: 50%;
}


/* | |   |  |||| ||||| ||||  |   |  |||| ||||| |  |||  |   |  ||||
/* | ||  | |       |   |   | |   | |       |   | |   | ||  | |
/* | | | |  |||    |   ||||  |   | |       |   | |   | | | |  |||
/* | |  ||     |   |   | |   |   | |       |   | |   | |  ||     |
/* | |   | ||||    |   |  ||  |||   ||||   |   |  |||  |   | ||||  */

#instructions-area {
    padding: 5px;
}

#show-instructions-button {
    border: 2px solid var(--color-header);
    border-radius: 20px 0px;
    padding: 5px 5px 5px 20px;
    display: block;
    cursor: pointer;
}

#hide-instructions-button {
    border: 2px solid var(--color-header);
    border-radius: 20px 0px 0px 0px;
    padding: 5px 5px 5px 20px;
    display: none;
    cursor: pointer;
}

#instructions {
    padding: 5px;
    display: none;
}

#instructions ol,
#instructions ul {
    padding-left: 15px;
}

.header {
    color: var(--color-body-background);
    background: var(--color-header);
    font-family: var(--font-h);
}

.header-body {
    color: var(--color-body-background);
    background: var(--color-body);
    font-family: var(--font-p);
    border: 2px solid var(--color-header);
    border-radius: 0px 0px 20px 0px;
}

.instructions-die {
    list-style-type: square;
    display: flex;
    flex-wrap: wrap;
    column-gap: 50px;

}

#instructions-die li {
    flex-basis: 100px;
}

.die-keyup {
    color: #ECA2C7;
    background: var(--color-transparent-dark);
    padding: 2px 5px;
    border-radius: 5px;
}

.die-label {
    display: none;
    text-align: center;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--color-header);
}


/* ||||   |||  |     |
/* |   | |   | |     |
/* ||||  |   | |     |
/* | |   |   | |     |
/* |  ||  |||  ||||| |||||  */

#roll-area {
    padding: 5px;
}

.die {
    border: 5px solid black;
    padding: 5px;
    cursor: pointer;
}


/* die-buttons-area */

#die-buttons-area {
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.die-btn {
    border: 5px solid black;
    padding: 5px;
    flex-basis: 100px;
}

.d2,
.d4,
.d6,
.d8,
.d10,
.d12,
.d20,
.d-other {
    border: 5px solid black;
    padding: 5px;
}

#d100-contents {
    background-color: black;
    height: 80px;
    position: relative;
}

.d100 {
    width: 60%;
}

#d100-d10 {
    height: 48px;
}

#d10-180 {
    position: absolute;
    left: 40%;
    top: 35%;
    border-radius: 20px 0px 0px 0px;
}


/* roll-results-area */

#roll-results-area {
    padding: 5px;
}

#roll-results-container {
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

#current-roll-container,
#cumulative-roll-container,
#previous-rolls-container {
    padding: 5px;
    text-align: center;
    flex: 0 250px; /* grow 0 / shrink 1 / basis 250px */
}

#previous-rolls {
    word-wrap: break-word;
}


/* action-buttons-area / modal-buttons */

#action-buttons-area,
#teleport-button-container {
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

#save-button,
#reset-button,
#modal-submit,
#modal-cancel,
#teleport-to-homepage {
    background: var(--color-body) url(../images/header/header_background_image.webp) no-repeat 49% 89% / auto;
    border: 1px solid var(--color-header);
    text-align: center;
    flex: 0 150px; /* grow 0 / shrink 1 / basis 150px */
    cursor: pointer;
}

.button-h {
    color: #000000;
    border: 5px solid transparent;
    font-weight: bold;
}

#save-button:hover,
#modal-submit:hover,
#teleport-to-homepage:hover {
    transition: 1s;
    background: var(--color-header) url(../images/header/header_background_image.webp) no-repeat 83% 100% / auto;
}

#reset-button:hover,
#modal-cancel:hover {
    transition: 1s;
    background: var(--color-dnd-red-light) url(../images/header/header_background_image.webp) no-repeat 83% 100% / auto;
    filter: hue-rotate(-90deg) invert(100%);
}

.button-h:hover {
    color: var(--color-body-background);
}

#save-button:active,
#reset-button:active,
#modal-submit:active,
#modal-cancel:active,
#teleport-to-homepage:active {
    background-color: var(--color-dnd-red-dark);
}


/*  ||||  |||  |   | |||||  ||||
/* |     |   | |   | |     |
/*  |||  |||||  | |  ||||   |||
/*     | |   |  | |  |         |
/* ||||  |   |   |   ||||| ||||  */

table {
    padding: 5px;
    width: 100%;
    text-align: center;
    margin-bottom: 50px;
}

#previous-rolls-container,
tr:nth-child(odd) {
  background: var(--color-body-light);
}

tr.active {
    font-weight: bold;
}

tr.delete1 {
    background: var(--color-dnd-red-dark);
    transition: all 1s ease;
}

tr.delete2 {
    color: var(--color-body-background);
    background: var(--color-body-background);
    transition: all 1s ease;
}

th {
    background: var(--color-header);
    color: var(--color-body-background);
    padding: 5px;
}

td {
    color: var(--color-header);
    padding: 5px;
}

#table-th-number {
    width: 10px;
}

#table-th-name {
    width: 100px;
}

#table-th-edit-button {
    width: 19px;
}

#table-th-delete-button {
    width: 19px;
}

.rename-button,
.delete-button {
    cursor: pointer;
    stroke: var(--color-header);
}

tr.delete1 td,
tr.delete1 .rename-button,
tr.delete1 .delete-button,
tr.delete2 td,
tr.delete2 .rename-button,
tr.delete2 .delete-button {
    color: currentColor;
    stroke: currentColor;
}

.rename-button:hover,
.delete-button:hover {
    stroke: var(--color-dnd-red-light);
    transition: stroke 400ms ease 100ms; /* transition-property / transition-duration / transition-timing-function / transition-delay */
}

.rename-button:active,
.delete-button:active {
    stroke: var(--color-body-link);
}


/* |   |  |||  ||||   |||  |
/* || || |   | |   | |   | |
/* | | | |   | |   | ||||| |
/* |   | |   | |   | |   | |
/* |   |  |||  ||||  |   | ||||| */

#modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

#modal-container {
    background: var(--color-body-background);
    margin: 15% auto 5%;
    padding: 20px;
    border: 1px solid var(--color-body);
    width: 80%;
    max-width: 600px;
    text-align: center;
}

#modal-input {
    background: var(--color-body-light);
    border: 1px solid var(--color-body);
    border-radius: 5px;
    color: #000000;
    margin-top: 10px;
}

#modal-input:focus {
    border: 2px solid var(--color-body);
}

#modal-submit {
    margin: 10px;
}


/* customs */

#modal-die-69-container {
    max-width: 498px;
    max-height: 280px;
    display: none;
    margin: 5% auto;
}

#modal-die-420-container {
    max-width: 290px;
    max-height: 290px;
    display: none;
    margin: 5% auto;
}

#modal-die-literal-container {
    max-width: 300px;
    max-height: 356px;
    display: none;
    margin: 5% auto;
}

#modal-die-no-container {
    max-width: 480px;
    max-height: 480px;
    display: none;
    margin: 5% auto;
}


/* |||||  |||   |||  ||||| ||||| ||||
/* |     |   | |   |   |   |     |   |
/* ||||  |   | |   |   |   ||||  ||||
/* |     |   | |   |   |   |     | |
/* |      |||   |||    |   ||||| |  || */

#footer {
    width: 100vw;
    text-align: center;
    background: var(--color-body);
    color: var(--color-body-background);
    display: flex;
    justify-content: space-evenly;
}

.footer-button {
    width: 60px;
    border-radius: 30px;
    padding: 5px 10px;
    cursor: pointer;
}

.footer-svg-path {
    fill: black;
    padding: 5px;
}

div:hover .footer-svg-path {
    transition: all 1s;
}

#discord:hover,
#github:hover {
    background: #00000099;
    transition: all 1s;
}

#discord:hover .footer-svg-path {
    fill: #5865F2;
}

#github:hover .footer-svg-path {
    fill: #ffffff;
}

#footer-text {
    color: var(--color-body-background);
    text-decoration: none;
    padding: 0px 10px;
    border-radius: 30px;
    cursor: pointer;
}

#footer-h,
#footer-p {
    margin: 0px;
}

.link {
    color: #000000;
    font-weight: bold;
}

#footer-text:hover {
    background: var(--color-transparent-dark);
    transition: all 1s ease;
}

#footer-text:hover .link {
    color: var(--color-dnd-red-light);
    text-decoration: underline;
    transition: all 1s ease;
}


/*    /   |||     /
/*   /   |   |   /
/*  / |  |   |  / |
/* ||||| |   | |||||
/*    |   |||     | */

#teleport-to-homepage {
    text-decoration: none;
}


/*  ||||  |||| ||||  ||||| ||||| |   |  ||||
/* |     |     |   | |     |     ||  | |
/*  |||  |     ||||  ||||  ||||  | | |  |||
/*     | |     | |   |     |     |  ||     |
/* ||||   |||| |  || ||||| ||||| |   | ||||  */

@media screen and (min-width: 768px) {
    #header {
        height: 400px;
    }

    #header-h {
        text-align: left;
        padding: 75px 100px;
    }

    #instructions ol,
    #instructions ul {
        padding-left: 2rem;
    }
}