* {
    box-sizing: border-box;
}

div {
    display: block;
    position: initial;
}

body {
    margin: 0;
}
/* #region backgrounds */

.background {
    background-attachment: scroll;
    background-image: url("/_img/Skybound Background.png");
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    border: 0px solid;
}


.bg0, /* Almost Black */
.background {
    background-color: #12110f;
}

.bg1, /* Dark Brown */
.side-nav, .headerfloater, .iconlink, .ContentMain {
    background-color: #211f1a;
}
.bg2, /* Soft Brown */
.font-title, .titleheader, 
.h1,.h2, .e1,.e2 {
    background-color: #453e34;
}
.bg3, /* Main Paper Colour */
.body-mid,.b1 {
    background-color: #cbc0af;
}

.bg4, /* As white as I go */
.dropdown-font:hover {
    background-color: antiquewhite;
}

.bg5, /* Slightly warmer paper */
.dropdown-font {
    background-color: #efd5b0;
}

.bg6, /* Burnt Orange */
.top-navitem:hover {
    background-color: #7a5f1e;
}
.bg7, /* GoldenRod */
.top-navitem:active {
    background-color: darkgoldenrod;
}
/* #endregion */
/* #region font family*/

.ff1,
.f-body, .sidebarText,
.titleheader, .font-subtitle, .font-charactertitle, .top-navbar, .dropdown-font, .iconlink, .h1, .font-title, .body-mid, .b1, .font1 {
    font-family: Verdana, Geneva, sans-serif;
}

.fontfamily-2{
    
}

/* #endregion */
/* #region Font Styles */

.f-title {
    font-size: 2.5em;
    line-height: 1.5em;
    font-weight: 700;
    text-shadow: 2px 2px 4px black;
}

.f-subtitle, 
.subtitle{
    font-size: 0.75em;
    font-weight: 500;
    text-shadow: 1px 1px 4px black;
    font-style: italic;
    text-decoration: overline;
}

.f-body,
.ContentMain {
    font-size: 1.1em;
    font-weight: 500;
    text-decoration: unset;
}

.f-small,
.iconlink
{
    font-size: 0.9em;
}

.f-h1,
.h1, .e1
{
    font-size: 1.5em;
    font-weight: 700;
    text-shadow: 1px 1px 3px black;
}
.f-h2,
.h2, .e2 {
    font-size: 1.2em;
    font-weight: 550;
    text-shadow: 1px 1px 2px black;
}

.f-h3, .sidebarText,
.h3 {
    font-size: 1.6em;
    font-weight: 500;
    text-align: center;
    text-transform: none;
}

.f-h4,
.h4 {
    font-size: 1.4em;
    font-weight: 400;
    text-align: center;
    text-transform: none;
    /*border-bottom: 5px dotted;*/
}

.bold,
.top-navbar, .iconlink,
.font-link
{
    font-weight: 700;
}

.italic 
{
    font-style:italic;
}

.underline,
.iconlink,
font-link 
{
    text-decoration: underline;
}

/* #endregion */
/* #region Font colours */
.dropdown-font, .font-colour-active, .top-navitem:active,
.fc-black {
    color: black;
}

.top-navbar, .h1, .font-title, .titleheader, .font-charactertitle, .font-subtitle, .font-colour-hover,
.top-navitem:hover, .nav-link, .t1.a2, a.a2, .t1 a, .sidebarText,
.h1, .h2, .e1, .e2,
.fc-heading {
    color: wheat;
}

a,
.fc-link1 {
    color: darkblue;
}

.iconlink,
.fc-link2 {
    color: darkgoldenrod;
}

a:hover, .t1 a:hover, .iconlink:hover, .iconlink:hover,
.fc-hover {
    color: brown;
}

a:active, .t1 a:active, .iconlink:active,
.fc-active {
    color: gold;
}

/*#endregion*/
/* #region Text Align */
.alignLeft {
    text-align: left;
}
.alignCenter,
.subtitle, .sidebarText,
.nav-link, .dropdown-font, .headerfloater, .top-navitem, .iconlink, .font-charactertitle {
    text-align: center;
    align-content: center;
}
.alignRight {
    text-align: right;
}
.rightJustify {
    text-align: right;
}

/* #endregion */
/* #region Size */
.height100,
.navlink, .ContentMain, .characterIcon img, .heartmark img, .affinityIcon, .methodIcon, .body-mid {
    height: 100%;
}
.width100,
.bannerdiv, .headerfloater, .top-navbar, .top-navitem, .nav-link, .dropdown-font, .ContentMain, .link-icon, .icon-grid,
.content-row, .characterIcon img, .heartmark img, .affinityIcon, .methodIcon, .titleheader {
    width: 100%;
}

/* #endregion */
/* #region Font Blocks*/
.h1, .h2, .e1, .e2, .b1, .b2 {
    padding: 16px;
    width: auto;
}

.h2, .e2, .b2 {
    margin: 0px 0px 0px 32px;
    
}

.b1, .b2 {
    min-height: 3em;
    width: 100%;
    flex: auto;
}
.h3 {
    border-bottom: 5px dotted;
}

/* #endregion */

/* #region Modifer Functions */
/* NOTE, these should be at the BOTTOM OF THE CSS.*/
.padding8{
    padding:8px;
}

.tabbed
{
    padding-left:32px;
}
.nopadding {
    padding: unset;
}
.b-flow {
    border-radius: 0px 0px 0px 0px;
}



/* #endregion */
/* Banner */
.bannerdiv {
    display: flex;
    justify-content: center;
    position: static;
}
/* #region Header */
.Header {
    align-items: flex-start;
    display: flex;
    justify-content: center;
    left: 0px;
    position: sticky;
    top: 10px;
    z-index: 100;
}

.headerfloater {
    display: flex;
    align-items: stretch;
    max-width: 1440px;
    align-self: center;
    border-radius: 16px;
    padding: 0px 16px 0px 0px;
}

.top-icon {
    margin: 8px 12px 8px 12px;
    border-radius: 8px;
}

/* Top Navbar & Items */
/* Overall Nav Bar*/
.top-navbar {
    display: grid;
}
/* Nav Row */
.top-nav-list {
    display: flex;
    margin: 0;
    padding: 0;
}
/* Nav Row Item*/
.top-navitem {
    position: relative;
    display: flex;
    cursor: pointer;
}

    .top-navitem:active {
    }

.nav-link {
    text-decoration: none;
}

/* Dropdown Menu */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    z-index: 10;
}

.top-navitem:hover > .dropdown {
    display: block;
}

/* Individual Dropdown Items */
.dropdown {
}

.dropdown-font {
    min-width: 200px;
    display: block;
    padding: 8px 16px;
    box-shadow: 2px 8px 16px rgba(0, 0, 0, 0.74);
    z-index: 1;
    padding: 10px;
    text-decoration: none;
}

    .dropdown-font:hover {
        
        box-shadow: 0 0 2px 5px #ffe16c inset;
        box-shadow: 0px 0px 2px 5px #ffe16c inset;
    }
/* #endregion */
/* #region Side Bar */

.Sidebar {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    left: 0px;
    min-width: 256px;
    position: sticky;
    top: 116px;
    width: 256px;
    z-index: 50;
}
/* Side Nav*/
.side-nav {
    align-self: flex-start;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    left: 0px;
    margin: 0px 0px 8px 0px;
    min-width: 256px;
    padding: 16px;
    position: inherit;
    width: 256px;
}

.side-navbuttondiv {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #33b627;
    border: 2px solid #005304;
    border-radius: 8px;
    box-shadow: 1px 1px 5px 1px #363128, -2px -2px 5px 1px #0e5511 inset, 2px 2px 5px 1px #69ff70 inset;
    color: #000;
    font-family: Verdana, Geneva, sans-serif;
    font-weight: 700;
    font-size: 100%;
    margin: 8px;
    padding: 8px;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease-out, box-shadow 0.2s ease-in;
    cursor: pointer;
}

    .side-navbuttondiv:hover {
        background-color: #e8c661;
        border: 2px solid #00d2ff;
        box-shadow: -2px -2px 5px 2px #c8a54e inset, 2px 2px 5px 2px #baff98 inset, 0 0 4px 2px #00f2ff;
        transition: background-color 0.1s ease-in;
    }

    .side-navbuttondiv.navbuttonhover:hover {
        background-color: #fff583;
        transition: background-color 0.2s ease-in;
    }

    .side-navbuttondiv:active {
        background-color: #b69739;
        border: 2px solid #ff8b00;
        box-shadow: 1px 1px 5px 1px #363128, 2px 2px 5px 1px #55290e inset, -2px -2px 5px 1px #ffe669 inset;
    }

/* Button Inner Elements */
.side-navbuttonicon {
    width: 32px;
    height: 32px;
    margin-right: 8px;
}

.side-navbuttontext {
    width: 100%;
    padding: 8px;
    white-space: nowrap;
    font-size: 100%;
}

/* Nav Link Text */
.side-navfont {
    margin: 16px;
    padding: 16px;
}

/* define terms*/
.def {
    position: relative;
    cursor: help;
    text-decoration: underline dotted;
}

    .def::after {
        content: attr(data-def);
        position: absolute;
        left: 0;
        top: 1.5em;
        background: #222;
        color: #fff;
        padding: 0.3em 0.6em;
        border-radius: 6px;
        font-size: 0.85em;
        white-space: nowrap;
        display: none;
        z-index: 10;
    }

    .def:hover::after {
        display: block;
    }
/* #endregion */

/* Main Content */

.ContentOA {
    display: flex;
    align-items: start;
    justify-content: center;
    position: static;
    padding: 16px;
    gap: 16px;
}

.ContentMain {
    align-content: flex-start;
    border-radius: 16px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    min-height: 100px;
    outline: #ffffff;
    padding: 8px;
    max-width: 1168px;
}

/* Icon Links*/
.iconlink {
    border-radius: 16px;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-content: stretch;
    min-width: 100px; /* don't shrink below this */
    max-width: 150px; /* don't grow beyond this */
    height: auto;
    flex-grow: 1;
}

.grid-spacer {
    height: 0px;
    display: contents;
}

.grid-line {
    height: 0px;
    grid-column: 1 / -1; /* span the entire row, effectively pushing the next items down */
    grid-row:none;
}

.icon-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    align-content: flex-start;
}

.content-row {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    align-content: flex-start;
}

.link-icon {
    padding: 8px;
}

.characterSheetGrid{

}

.titleheader {
    border-radius: 8px 8px 0px 0px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    padding: 10px 10px 10px 10px;
}

/* Font Styles */

.font-charactertitle {
    flex:1;
}

.characterPortrait {
    display: flex;
    width: 41%;
    object-fit: contain;
    height: fit-content;
}

.body-mid {
    display: flex;
    min-height: fit-content;
    gap:16px;
}

.body-flexrows {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: fit-content;
    gap: 8px;
}

.body-flex {
    display: flex;
    flex-direction: row;
    min-height: fit-content;
    gap: 8px;
}

#update {
    color: #eae6c1;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.9em;
    padding: 10px;
}

/*#region Stat Bars*/
.stat-bar {
    display: flex;
    gap: 1px;
}

.pip {
    flex: 1;
    height: 16px;
    background-color: #423f3a; /* empty color */
}

    .pip.filled {
        background-color: var(--stat-color, #d8a965);
        transition: background-color 0.2s ease;
    }

/* #endregion*/

/* #region Content Panels - To be Over-ridden & replaced hopefully. . .*/
.content-panel {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 16px 16px;
    margin: 8px;
}

.contentcontainer {
    align-items: stretch;
    display: flex;
    flex-wrap: nowrap;
    left: 0px;
    width: 100%;
}
/* #endregion*/
/* #region Flex Blocks */

.flexpanel /*This is the Block for an entire span section*/ {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    margin: 8px;
    gap: 16px 16px;
}

.horiz /*Horizontal Flow*/ 
{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width:auto;
}

.vert /*Vertical Flow*/ {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    flex:1;
}

.line {
    height: 0.5em;
}


/* #endRegion*/

/* #region Block Modifiers */
/* #region Flex#*/
.flex, flex1 {
    display: flex;
    flex: 1;
}

.flex2 {
    display: flex;
    flex: 2;
}

.flex3 {
    display: flex;
    flex: 3;
}
.flex4 {
    display: flex;
    flex: 4;
}
/*#endregion*/

/* #region Corners */

.corners-top, 
.h1, .h2 {
    border-radius: 8px 8px 0px 0px;
}

.corners-bottom,
.e1, .e2, .b1, .b2, .ending {
    border-radius: 0px 0px 8px 8px;
}

.corners-left{

}

.corners-right{

}

.corners-bottomleft {
    border-radius: 0px 0px 0px 8px;
}

.corners-bottomright {
    border-radius: 0px 0px 8px 0px;
}

.corners-clear {
    border-radius: 0px 0px 0px 0px;
}

/*#endregion*/

/* #region region */

/*#endregion*/

/*#endregion*/

/* Content Blocks*/

.cblock {
    align-content: flex-start;
    align-items: stretch;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    justify-content: flex-start;
}

.gap {
    gap: 16px;
}

.nogap{
    gap:0px;
}

.width100 {
    width: 100%;
}

.width66 {
    width: 70%;
}

.width33 {
    width: 33%;
}

.image20 {
    width: 20%;
    border-radius: 8px;
    height: fit-content;
}

.image100 {
    width: 100%;
    border-radius: 8px;
    height:fit-content;
}

/* #region Marks */

/* Containers for icons */
.mark, .heartmark, .characterIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
}

/* Separate heights */
.mark {
    height: 3.5em;
}

.characterIcon, .heartmark {
    height: 8em;
}

.inlineIcon{
    height: 1.1em;
    display: inline-flex;
}
.icon{
    height:64px;
    width:64px;
    display:inline-flex;
}

/* Zoomed icons */
.affinityZoom {
    transform: scale(1.4);
    transform-origin: center;
}

/* Normal row icons */
.mark .icon-wrapper,
.characterIcon .icon-wrapper {
    position: relative;
}

/* Overlay icons */
.heartmark {
    position: relative;
}

    .heartmark .icon-wrapper {
        position: absolute;
        top: 0;
        left: 0;
    }

/* Icon images */
.icon-wrapper img {
    display: block; /* remove inline spacing */
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Tooltip */
.icon-wrapper .tooltip-text {
    visibility: hidden;
    opacity: 0;
    background-color: rgba(20, 20, 20, 0.9);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 4px 8px;
    position: absolute;
    z-index: 100;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.8em;
    pointer-events: none; /* tooltip itself does not block hover */
    transition: opacity 0.2s ease-in-out;
}

/* Show tooltip on hover */
.icon-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

p:empty {
    display: none;
    margin: 0;
    padding: 0;
}

/* #endregion*/