/************************************************************/
/*  Reset                                                   */
/************************************************************/
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    vertical-align: middle;
}

input,
button,
textarea,
select {
    font: inherit;
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
}

/*      FONTS          */

@font-face {
    font-family: "Stardew Valley";
    src: url(../fonts/stardew_valley.ttf);
    font-weight: normal;
    font-style: normal;
}

/*      VARIABLES      */

:root {
    
    /* Color */
    --silver: #EBEBEB;
    --gold: #F8EFDD;
    --iridium: #E8E0F6;
    
    --gray: #929292;
    --offwhite: #F9F5F1;
    
    --textbrown: #4E3A2C;
    
    
    /* Size */
    --quick-look-width: 340px;
    --items-panel-width: 30vw;
    --main-width: calc(100% - var(--items-panel-width) - var(--quick-look-width));
    
    
    --item-cell: calc(((30vw - 24px) / 12) - 2px );
    
    --padding-sm: 4px;
    
    /* Transition */

}

/************************************************************/
/*  Basic Layout                                            */
/************************************************************/

h1, h2, h3, h4 {
    font-weight: normal;
    line-height: 1;
}
h1 {
    font-family: 'Stardew Valley';
    font-size: 2.25rem;
    letter-spacing: 1px;
}
h2 {
    margin-bottom: .5rem;
}
h2, h3 {
    font-weight: bold;
}
h3, h4 {
    font-size: 1rem;
}


body {
    background: var(--offwhite);
    color: var(--textbrown);
    font-size: 100%;
    font-family: monospace;
    font-size: 1rem;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

header {
    width: 100%;
    padding: 6px 12px;
    background: var(--gray);
    color: var(--offwhite);
    position: fixed;
    text-align: right;
    z-index: 1001;
}

.wrapper {
    display: flex;
    position: relative;
}

aside, main {
    margin: 0;
    height: 100vh;
    position: relative;
    margin-top: calc(2.25rem + 12px);
}

main {
    height: 100%;
    flex: 1 1 var(--main-width);
    padding: 12px;
    min-width: 0%;
    background: var(--offwhite);
}

main p {
    line-height: 1.4;
}


aside:first-child {
    width:  var(--quick-look-width);
    flex: 0 0 var(--quick-look-width);
}
aside:last-child {
    width: var(--items-panel-width);
    flex: 0 0 var(--items-panel-width);
}

#quick-look, #all-items {
    padding: 12px;
    position: fixed;
    height: 100%;
}

#quick-look {
    width: var(--quick-look-width);
    overflow-y: auto;
    border-right: 1px solid var(--gray);
}
#all-items {
    display: flex;
    max-width: var(--items-panel-width);
    right: 0;
    border-left: 1px solid var(--gray);
    overflow-y: auto;
}



/************************************************************/
/*  Item Grid                                            */
/************************************************************/

#seasons, #buildings {
    max-height: 100vh;
}

.season, .building {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    margin-bottom: 2rem;
    position: relative;
    overflow-x: visible;
}

#all-items h3 {
    width: 100%;
    margin-bottom: var(--padding-sm);
}

#all-items .item {
    width: var(--item-cell);
    height: var(--item-cell);
    min-width: 18px;
    min-height: 18px;
    flex: 0 0 var(--item-cell);
    border: 1px var(--silver) solid;
    background: white;
    padding: var(--padding-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-left: -1px;
    margin-top: -1px;
}
#all-items p {
    white-space: nowrap;
    text-align: center;
    margin: 0 auto;
    padding: 1ch;
    position: absolute;
    z-index: 100;
    top: 36px;
    opacity: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    background: white;
    filter: drop-shadow(2px 2px 2px var(--gray));
}
#all-items .item, #all-items img, #all-items p {
    transition: all .2s ease;
}

/*tooltip arrow*/
#all-items p::before {
    content: '';
    width: 0;
    height: 0;
    display: block;
    border-style: solid;
    border-width: 15px;
    border-color: transparent transparent white transparent;
    top: -24px;
    position: absolute;
}

#all-items .item:hover, #all-items .item.active {
    background: var(--silver);
}
#all-items .item:hover img, #all-items .item.active img {
    opacity: .5
}
#all-items .item:hover p {
    opacity: 1;
}

/************************************************************/
/*  Item Facts                                            */
/************************************************************/

#quick-look {
    text-transform: capitalize;
}

#basic {
    width: 100%;
    display: flex;
    align-items: flex-end;
    margin-bottom: 1rem;
}
#basic img {
    width: 50px;
    margin-right: var(--padding-sm);
}

#standard p, .prices td {
    width: 100%;
    font-variant: small-caps;
    text-transform: lowercase;
    line-height: .8;

}
#standard p {
   padding: var(--padding-sm);
    border-bottom: 1px solid var(--gray);
}
.prices td, .prices p {
    border: 1px solid var(--gray);
    padding: var(--padding-sm);
    vertical-align: top;
}
#standard .prices p {
    text-align: center;
    width: calc(25% - 2px);
}
#standard .prices span {
    display: block;
    font-size: 1.5rem;
    padding-top: var(--padding-sm);
}

.prices td span, #standard span {
    display: inline;
    font-size: .8rem;
    font-weight: 600;
}

#standard .prices {
    display: flex;
    justify-content: space-between;
}

#details > div, #processing div {
    margin-bottom: 1rem;
}

.prices {
    width: 100%;
    margin-bottom: 2px;
}

.prices td {
    width: 33.3%;
}

.prices span:after, #max span:after, .seed-price:after {
    content: 'g';
    text-transform: lowercase;
}

#quick-look table {
    border-collapse: collapse;
    margin: var(--padding-sm) 0 1rem 0;
}

/* Add  Color */
.silver {
    background: var(--silver);
}
.gold {
    background: var(--gold);
}
.iridium {
    background: var(--iridium);
}
.not-applicable {
    color: var(--gray);
    background: none;
    font-weight: normal !important;
}
.not-applicable span:after, span.not-applicable:after {
    content: none !important;
}


/************************************************************/
/*  Other                                            */
/************************************************************/

main svg {
    margin: 0 auto;
}

.observablehq {
    margin: 1rem 0 2rem 0;
}

/*Hide Dropdown*/
main > .container:nth-child(2) > div:first-child,  main > .container:first-child > div:nth-child(2) {
    display: none;
    visibility: hidden;
}

#quick-look > div .caption {
    font-variant: none;
    font-size: .8rem;
    line-height: 1.5;
    letter-spacing: .2px;
    text-transform: none;
    border: none;
    margin-bottom: 1rem;
}


.btn {
    width: 174px;
    padding: calc(20px - .75rem) 0; 
    margin: 0 auto;
    background: url('../layout/btn-bg.png') no-repeat center;
    background-size: contain;
    color:#CE5252; 
    display: block;
    font-family: "Stardew Valley";
    text-align: center;
    font-size: 1.5rem;
    text-decoration: none;
    filter: unset;
    transition: 0.3s;
}

.btn:hover {
    transform: scale(1.2);
}


.container {
    margin-bottom: 4rem;
}


.observablehq {
    width: 100%;
    margin: 0 auto;
    padding: 24px;
    background: white;
    margin-bottom: 4rem;
    margin-top: 1rem;
}
.observablehq h2 {
    font-weight: normal;
    text-transform: capitalize;
    font-size: 1rem;
}



