/*
Author: Austin Still
File Name: styles.css
Project: stillitstock.net (IT Inventory)
Date: 10/26/2026
*/

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

body, header, nav, main, footer, ul, li, h1, h2, h3, p, fieldset, legend, form {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Style rules for body */
body {
    background-color: #ffffff;
    color: #1a1a1a;
    font-family: Verdana, Arial, sans-serif;
}

img, svg {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

/* Style rules for header area */
header {
    padding: 2% 3%;
}

header h1 {
    font-size: 2em;
    font-weight: bold;
}

header .breadcrumb {
    margin-top: 0.5em;
    color: #333333;
}

/* Style rules for navigation area */
nav {
    background-color: #cfe2f3;
    padding: 1.5% 3%;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
}

nav li {
    flex: 1 1 auto;
}

nav li a {
    display: block;
    text-align: center;
    background-color: #ffffff;
    border: 2px solid #1a1a1a;
    border-radius: 4px;
    padding: 0.75em 1em;
    font-weight: bold;
    text-decoration: none;
    color: #1a1a1a;
}

nav li a:hover {
    background-color: #e8e8e8;
}

nav li a.current {
    background-color: #a9a9a9;
}

/* Style rules for main content */
main {
    padding: 4% 3%;
}

main h2 {
    font-size: 1.5em;
    margin-bottom: 1em;
}

main > p {
    margin-bottom: 1.5em;
    line-height: 1.5;
}

/* Style rules for item grid / cards */
.item-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2em;
}

.item-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.item-image {
    width: 140px;
    height: 140px;
    border: 3px solid #5b6b7c;
    border-radius: 4px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1em;
}

.item-image svg {
    width: 70%;
    height: 70%;
}

.card {
    border: 2px solid #1a1a1a;
    width: 100%;
    max-width: 280px;
    background-color: #ffffff;
}

.card-header {
    border-bottom: 2px solid #1a1a1a;
    padding: 0.6em 0.75em;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.card-header .toggle-icon {
    width: 14px;
    height: 14px;
    border: 1px solid #1a1a1a;
    background-color: #e8e8e8;
    flex-shrink: 0;
}

.card-body {
    padding: 1em 0.75em;
}

.card-body p {
    color: #2a5885;
    margin-bottom: 0.5em;
}

.card-body p:last-child {
    margin-bottom: 0;
}

/* Style rules for restock form */
.restock-form {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 2px solid #cfe2f3;
}

.restock-form h2 {
    margin-bottom: 1em;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1em;
    max-width: 500px;
}

fieldset {
    border: 2px solid #1a1a1a;
    padding: 1em;
    margin-bottom: 1.5em;
}

legend {
    font-weight: bold;
    padding: 0 0.5em;
}

.form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1em;
}

.form-field:last-child {
    margin-bottom: 0;
}

.form-field label {
    font-weight: bold;
    margin-bottom: 0.3em;
}

.form-field input {
    padding: 0.5em;
    border: 1px solid #5b6b7c;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1em;
}

.btn {
    background-color: #2a5885;
    color: #ffffff;
    border: 0;
    border-radius: 4px;
    padding: 0.75em 1.5em;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    width: fit-content;
}

.btn:hover {
    background-color: #1a4d8f;
}

/* Style rules for footer content */
footer {
    text-align: center;
    font-size: 0.85em;
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 2% 0;
    margin-top: 3em;
}

footer a {
    color: #cfe2f3;
    text-decoration: none;
}

/* Media Query for Tablet Viewport */
@media screen and (min-width: 620px) {

    nav ul {
        justify-content: flex-start;
    }

    nav li {
        flex: 0 1 auto;
    }

    .item-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Media Query for Desktop Viewport */
@media screen and (min-width: 960px) {

    .item-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}
