/* ----------------------------------- *\
   Variabili colore
\* ----------------------------------- */

:root {
    --main-bg-color: #F2F4F4;
    --current-box-color: #3498DB;
    --current-box-color-hover: #2E86C1;

    --box-color-gray: #839192;
    --box-color-blue: #2E86C1;
    --box-color-red: #E74C3C;
    --box-color-green: #28B463;
    --box-color-orange: #F39C12;
    --box-color-yellow: #D4AC0D;

    --button-bg-color: #555;
    --button-bg-color-hover: #333;
}

/* ----------------------------------- *\
   BOX COLORS (stili per i diversi box)
\* ----------------------------------- */

.box-color-default { color: var(--box-color-gray); }
.box-color-blue { color: var(--box-color-blue); } 
.box-color-red { color: var(--box-color-red); } 
.box-color-green { color: var(--box-color-green); }
.box-color-orange { color: var(--box-color-orange); }
.box-color-yellow { color: var(--box-color-yellow); }

.box-bkg-default { background-color: var(--box-color-gray); }
.box-bkg-blue { background-color: var(--box-color-blue); } 
.box-bkg-red { background-color: var(--box-color-red); } 
.box-bkg-green { background-color: var(--box-color-green); }
.box-bkg-orange { background-color: var(--box-color-orange); }
.box-bkg-yellow { background-color: var(--box-color-yellow); }

/* ----------------------------------- *\
   BODY
\* ----------------------------------- */

* {
    font: inherit;
    color: inherit;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    margin: 0;
    padding: 0;
    background-color: var(--main-bg-color);
}

p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
}

/* ================================================================================ *\
   LOGIN PAGE 
\* ================================================================================ */

div#login-container {
    width: 100%;
    height: 100vh;
    display:flex;
    align-items: center;
    justify-content: center;
}

div#login-box {
    width: 600px;
    height: 300px;
    background-color: white;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;   
}

div#login-logo {
    height: 100px;
    width: 600px;
    display:flex;
    align-items: center;
    justify-content: center;
}

div#login-logo > i {
    font-size: 2.5rem;
}

div#login-logo > span {
    font-size: 2.5rem;
    font-style: italic;
    font-weight: 700;
}

form#login-form {
    width: 600px;
    height: 200px;
}

div.login-form-field {
    display: flex;
    place-items: center;
    justify-content: center;
    border: 0px solid red;
    margin: 10px 0;
}

div.login-form-field > label {
    display: block;
    width: 100px;
    font-size: 1.1rem;
    font-weight: 300;
}

div.login-form-field > input {
    width: 180px;
    border: 1px solid #999;
    border-radius: 10px;
    font-size: 1.1rem;
    outline: none;
    padding: 4px 8px;
}

div.login-form-buttons {
    padding-top: 10px;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}



/* ----------------------------------- *\
   Container (griglia principale)
\* ----------------------------------- */

div#container {
    display: grid;
    height: 100vh;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto 1fr auto;
    gap: 10px;
    margin-top: 10px;
    position: relative;
}



/* ================================================================================ *\
   LOGO 
\* ================================================================================ */

div#logo {
    grid-column: 1 / span 2;
    background-color: var(--main-bg-color);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0px solid red;    
}

div#logo > i {
    font-size: 3rem;
}

div#logo > span {
    font-size: 3rem;
    font-style: italic;
    font-weight: 700;
}

/* ================================================================================ *\
   BOX SELECTOR 
\* ================================================================================ */

div#selector {
    grid-column: 3 / span 2;
    background-color: var(--main-bg-color);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 0px solid red;
}

div#box-selector {
    width: 100%;
    height: 40px;
    border: 0px solid #666;
    border-radius: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    gap: 20px;
    color: white;
}

div#box-selector:hover {
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

div#box-selector:hover {
    cursor: pointer;
}

div#box-icon {
    padding-top: 3px;
    font-size: 1.4rem;
} 

div#box-name {
    padding-top: 2px;
    font-size: 1.2rem;
}

/* ----------------------------------- *\
   Boxes Popup Menu
\* ----------------------------------- */

div#selector-menu {
    position: absolute;
    background-color: white;
    border-radius: 10px;
    width: 260px;
    /* height: 300px; */
    top: 80px;
    left: 10px;
    border: 0px solid #aaa;
    z-index: 1;
    padding: 6px 0;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    display: none;
}

div.box-menu-item {
    color: #666;
    text-align: center;
    font-size: 1.2rem;
    margin: 4px 10px;
    cursor: pointer;
    padding: 4px 0;
    border-radius: 10px;
}

div.box-menu-item:hover {
    background-color: #eee;
}

/* ================================================================================ *\
   SEARCH BAR
\* ================================================================================ */

div#search {
    grid-column: 5 / span 3 ;
    background-color: var(--main-bg-color);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0px solid red;
    position: relative;
}

div#app-message {
    width: 100%;
    height: 32px;
    background-color: white;
    border: none;
    border-radius: 20px;
    position: absolute;
    display: none;
    z-index: 1;
    top: 26px;
    left: 10px;
    text-align: center;
    color: #E74C3C;
    font-weight: 400;
    padding-top: 10px;
    animation: animate 4s linear infinite;
}

@keyframes animate{ 
    0%   { opacity: 1.0; } 
    15%  { opacity: 1.0; } 
    50%  { opacity: 1.0; }
    85%  { opacity: 0.7; } 
    100% { opacity: 0.0; } 
} 

div#search-input {
    width: 100%;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 20px;
    display: flex;
    background-color: white;
    font-size: 1.2rem;
}

div#search-input > i {
    margin-left: 15px;
    margin-right: 15px;
    align-self: center; 
} 

div#search-input > input {
    height: 30px;
    align-self: center; 
    width: 85%;
    border: none;
    background: transparent;
}

div#search-input > input:focus {
    outline: none;
}

/* ================================================================================ *\
   MENU
\* ================================================================================ */

div#menu {
    grid-column: 8 / span 5;
    background-color: var(--main-bg-color);
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-content: center;
    border: 0px solid red;
    position: relative;
}

button.btn-menu {
    height: 44px;
    padding: 8px 20px;
    border: 0px solid var(--main-bg-color);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 300;
    cursor: pointer;
    background-color: transparent;  
}

button.btn-menu:hover {
    background-color: white;
    border: 0px solid #ccc;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

button.btn-menu > i {
    display: inline-block;
    margin-right: 12px;    
}

/* ================================================================================ *\
   TAG SEARCH BAR 
\* ================================================================================ */

div#tag-search {
    grid-column: 1 / span 2;
    background-color: var(--main-bg-color);
    padding: 0 10px;
    position: relative;
    display: flex;
    place-items: center;
    border: 0px solid red;
}

div#tag-input {
    width: 100%;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 20px;
    display: flex;
    background-color: white;
    font-size: 1.2rem;
}

div#tag-input > i {
    margin-left: 15px;
    margin-right: 15px;
    align-self: center; 
} 

div#tag-input > input {
    height: 30px;
    align-self: center; 
    width: 75%;
    border: none;
    background: transparent;
}

div#tag-input > input:focus {
    outline: none;
}

div#tag-list {
    position: absolute;
    background-color: white;
    border-radius: 10px;
    width: 260px;
    height: 300px;
    top: 60px;
    left: 10px;
    z-index: 1;
    padding: 6px 0;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    display: none;
}

div.tag-list-item {
    color: #666;
    text-align: left;
    font-size: 1.0rem;
    margin: 4px 10px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 10px;
}

div.tag-list-item:hover {
    background-color: #eee;
}

/* ================================================================================ *\
   TOOLBAR
\* ================================================================================ */

div#toolbar {
    grid-column: 3 / span 4;
    background-color: var(--main-bg-color);
    padding: 0 10px;
    display: flex;
    place-items: center;
    gap: 10px;
    border: 0px solid red;
}

/* ================================================================================ *\
   NAVIGATION SETTINGS
\* ================================================================================ */

div#navigation-settings {
    grid-column: 7 / span 4;
    padding: 10px;
    display: flex;
    place-items: center;
    position: relative;
    border: 0px solid red;
}

div#num-items {
    width: 60px;
    text-align: right;
    margin-right: 8px;
    font-size: 1.4rem;
    font-weight: 500;
}

div#num-items-label {
    padding-top: 0px;
}

div#num-items-per-page {
    width: 50px;
    text-align: right;
    margin-right: 8px;
    font-size: 1.4rem;
    font-weight: 500;
    color: #333;
}

div#ipp-text {
    margin-right: 8px;;
}

div#num-page-value {
    padding: 0 10px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 500;
}

div#num-page-label {
    margin-left: 30px;
    padding-top: 0px;
}

div#tot-page-value {
    padding: 0 10px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 500;
}

div#tot-page-label {
    padding-top: 0px;
}

/* ----------------------------------- *\
   Popup per numero items per pagina
\* ----------------------------------- */

div#nav-ipp-list {
    position: absolute;
    background-color: white;
    border-radius: 10px;
    width: 120px;
    max-height: 300px;
    top: 60px;
    left: 216px;
    z-index: 5;
    padding: 6px 0;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    display: none;
}

div.nav-ipp-list-item {
    color: #666;
    text-align: center;
    font-size: 1.0rem;
    margin: 4px 10px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 10px;
}

div.nav-ipp-list-item:hover {
    background-color: #eee;
}

/* ================================================================================ *\
   NAVIGATION  
\* ================================================================================ */

div#navigation {
    grid-column: 11 / span 2;
    background-color: var(--main-bg-color);
    padding-right: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-content: center;
    gap: 10px;
    position: relative;
    border: 0px solid red;
}

/* ----------------------------------- *\
   Nav Buttons
\* ----------------------------------- */

button.btn-nav {
    height: 40px;
    width: 40px;
    padding: 8px 8px;
    border: none;
    background: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 300;
    cursor: pointer;
    
    color: black;
}

button.btn-nav:hover {
    /* border: 1px solid black; */
    background-color: white;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

button.btn-nav-disabled {
    height: 40px;
    width: 40px;
    padding: 8px 12px;
    border: none;
    background: none;
    font-size: 1.2rem;
    font-weight: 300;
    color: #bbb;
}

/* ----------------------------------- *\
   Popup per la selezione della pagina
\* ----------------------------------- */

div#nav-page-list {
    position: absolute;
    background-color: white;
    border-radius: 10px;
    width: 120px;
    max-height: 300px;
    top: 60px;
    right: 80px;
    z-index: 5;
    padding: 6px 0;
    overflow: auto;
    overflow-x: hidden;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    display: none;

}

div.nav-page-list-item {
    color: #666;
    text-align: center;
    font-size: 1.0rem;
    margin: 4px 10px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 10px;
}

div.nav-page-list-item:hover {
    background-color: #eee;
}

/* ================================================================================ *\
   SIDEBAR
\* ================================================================================ */

div#sidebar {
    grid-column: 1 / span 2;
    grid-row: 3;
    background-color: var(--main-bg-color);
    padding: 20px 10px 10px 10px;
}

/* ----------------------------------- *\
   Tag Filter List
\* ----------------------------------- */

div#sidebar-tags {
    margin-top: 0;
}

div.tag-filter {
    width: calc(100% - 20px);
    height: 28px;
    border: 0px solid var(--current-box-color-hover);
    background-color: var(--button-bg-color);
    border-radius: 10px;
    gap: 20px;
    font-size: 0.9rem;
    font-weight: 400;
    color: white;
    margin-bottom: 8px;
    padding: 4px 10px;
    position: relative;
    cursor: pointer;
}

div.tag-filter:hover {
    background-color: var(--button-bg-color-hover);
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

div.tag-filter > i {
    display: inline-block;
    font-size: 1.2rem;
    margin-right: 0px;
    margin-top: 5px;
    border: 0px solid green;
}

div.tag-filter-label {
    display: inline-block;
    border: 0px solid red;
    padding-top: 0;
    position: absolute;
    top: 8px;
    left: 32px;;
}

/* ----------------------------------- *\
   Filters List
\* ----------------------------------- */

div#sidebar-filter-list {
    margin-top: 40px;
}

div.sidebar-filter-item {
    width: calc(100% - 20px);
    height: 28px;
    border: 0px solid var(--current-box-color-hover);
    /* background-color: var(--button-bg-color); */
    border-radius: 10px;
    gap: 20px;
    font-size: 0.9rem;
    font-weight: 400;
    color: white;
    margin-bottom: 8px;
    padding: 4px 10px;
    position: relative;
    cursor: pointer;
}

div.sidebar-filter-item:hover {
    /* background-color: var(--button-bg-color-hover); */
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

div.sidebar-filter-item > i {
    display: inline-block;
    font-size: 0.9rem;
    margin-right: 0px;
    margin-top: 7px;
    border: 0px solid green;
}

div.sidebar-filter-item-label {
    display: inline-block;
    border: 0px solid red;
    padding-top: 0;
    position: absolute;
    top: 8px;
    left: 32px;;
}

/* ================================================================================ *\
   MAIN 
\* ================================================================================ */

div#main {
    grid-column: 3 / span 10;
    background-color: var(--main-bg-color);
    padding: 20px 10px 10px 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    align-content: flex-start;
    gap: 30px;
    position: relative;
}

/* ----------------------------------- *\
   Main => ITEMS
\* ----------------------------------- */

div.item {
    width: 240px;
    height: 316px;
    border: 0px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
    background-color: white;
    cursor: pointer;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    color: #666;
}

div.item:hover {
    background-color: var(--button-bg-color);
    color: white;
}

div.item-img {
    width: 240px;
    height: 240px;
    background: url("img/item-bkg-7.png");
    background-size: 240px 240px;
    overflow: hidden;
    display: flex;
    justify-items: center;
    align-items: center;
}

div.item-img > img {
    width: 240px;
    aspect-ratio: 1 / 1;
    object-fit: contain;    
}

div.item-text {
    width: calc(100% - 26px);
    height: 56px;
    display: flex;
    justify-items: center;
    align-items: center;
    margin: 8px 12px;
    font-size: 1.1rem;
    font-weight: 400;
    border: 0px solid red;
}

div.item-text > div { 
    display: inline-block;
    border: 0px solid green;
    text-align: center;
    margin: auto;
}

/* ----------------------------------- *\
   Main => FILTERS
\* ----------------------------------- */

div.filter {
    border: 1px solid white;
    padding: 6px 24px;
    border-radius: 6px;
    background-color: white;
    border: 0px solid #ccc;
    cursor: pointer;
    font-weight: 400;
    color: black;
    font-size: 1.1rem;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

div.filter:hover {
    background-color: var(--button-bg-color);
    color: white;
}

/* ----------------------------------- *\
   Main => TAGS
\* ----------------------------------- */

div.tag {
    border: 1px solid white;
    padding: 6px 24px;
    border-radius: 6px;
    background-color: white;
    border: 0px solid #ccc;
    cursor: pointer;
    font-weight: 400;
    color: black;
    font-size: 1.1rem;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

div.tag:hover {
    background-color: var(--button-bg-color);
    color: white;
}

/* ----------------------------------- *\
   Main => BOXES
\* ----------------------------------- */

div.box {
    width: 250px;
    height: 30px;
    border: 1px solid white;
    padding: 7px 24px 5px 24px;
    border-radius: 20px;
    /* background-color: white; */
    border: 0px solid #ccc;
    cursor: pointer;
    text-align: center;
    font-weight: 400;
    color: white;
    font-size: 1.2rem;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

div.box:hover {
    background-color: var(--button-bg-color);
    color: white;
}

/* ================================================================================ *\
   FOOTER
\* ================================================================================ */

div#footer {
    grid-column: 1 / span 12;
    background-color: var(--main-bg-color);
    padding: 10px;
}

/* ================================================================================ *\
   FORMS
\* ================================================================================ */

form#box-form {
    min-width: 500px;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;   
}

div.box-form-title {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 20px;
}

div.box-form-field {
    margin-bottom: 15px;
    display: flex;
    place-items: center;
    border: 0px solid red;
}

div.box-form-field > label {
    display: inline-block;
    width: 120px;
    font-size: 1.1rem;
    font-weight: 300;
}

div.box-form-field > input {
    width: 300px;
    border: 1px solid #999;
    border-radius: 10px;
    font-size: 1.1rem;
    outline: none;
    padding: 4px 8px;
}

div.box-form-buttons {
    padding-top: 10px;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

div.box-form-text {
    margin-bottom: 15px;
    display: flex;
    place-items: center;
    border: 0px solid red;
}

div.box-form-text > label {
    display: inline-block;
    width: 120px;
    font-size: 1.1rem;
    font-weight: 300;
}

div.box-form-text > textarea {
    width: 300px;
    height: 134px;
    border: 1px solid #999;
    border-radius: 10px;
    font-size: 1.1rem;
    outline: none;
    padding: 4px 8px;
}

/* ----------------------------------- *\
   Upload Form
\* ----------------------------------- */

/* Serve per nascondere il pulsante "Browse" standard */
input.inputfile {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}


/* ================================================================================ *\
   CARDS
\* ================================================================================ */

div#box-card {
    width: 1200px;
    height: 600px;
    background-color: white;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px; 
    display: flex;
    justify-items: flex-start;
    overflow: hidden;
}

div#box-card-img {
    width: 600px;
    height: 600px;
    background: url("img/item-bkg-7.png");
    background-size: 600px 600px;
    overflow: hidden;
    display: flex;
    justify-items: center;
    align-items: center;
}

div#box-card-img > img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;    
}

div#box-card-data {
    width: 600px;
    height: 600px;
}

div.box-card-title {
    font-size: 2rem;
    font-weight: 300;
    margin: 20px;
}

div.box-card-url {
    margin: 20px;
}

div.box-card-url > a {
    text-decoration: none;
}

/* ================================================================================ *\
   ITEM TAGS
\* ================================================================================ */

div#box-item-tags {
    width: 1200px;
    height: 600px;
    background-color: white;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px; 
    overflow: hidden;
}

div.box-item-tags-title {
    font-size: 2rem;
    font-weight: 300;
    margin: 20px;
}

div.box-item-tags-text {
    font-size: 0.9rem;
    font-weight: 300;
    margin: 20px;
}

div.box-item-tags-list {
    margin: 20px;
    border: 0px solid red;
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    align-content: flex-start;
    gap: 20px;
}

div.box-item-tags-list-item {
    border: 1px solid white;
    padding: 6px 24px;
    border-radius: 6px;
    background-color: white;
    border: 0px solid #ccc;
    cursor: pointer;
    font-weight: 300;
    color: black;
    font-size: 1.0rem;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

div.box-item-tags-list-item:hover {
    background-color: var(--button-bg-color);
    color: white;
}


/* ================================================================================ *\
   OTHER 
\* ================================================================================ */

/* ----------------------------------- *\
   Action Button
\* ----------------------------------- */

button.btn {
    height: 40px;
    padding: 8px 32px;
    border-radius: 10px;
    font-size: 1.0rem;
    font-weight: 400;
    cursor: pointer;
    background-color: var(--button-bg-color);
    color: white;
    border: none;
}

button.btn:hover {
    background-color: var(--button-bg-color-hover);
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

label.btn {
    height: 40px;
    padding: 8px 32px;
    border-radius: 10px;
    font-size: 1.0rem;
    font-weight: 400;
    cursor: pointer;
    background-color: var(--button-bg-color);
    color: white;
    border: none;
}

label.btn:hover {
    background-color: var(--button-bg-color-hover);
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
