@charset "utf-8";

/* NAMING CONVENTIONS: {Type}{Context} */

/* rem is used for text, spacing (Margins & Padding). % is used for containers or blocks (Also for sizing whole table blocks) */

/* h1 = Main page title, h2 = major section under h1, h3 = subsection under h2 */

/* 

base.html contains three blocks, title, page_header, and content

All things put inside each block will then be put onto base.html and rendered

title and page_header do not need <> as they are already wrapped in <title> and <header> respectively

Everything in content has already been wrapped in .container

Each HTML file should contain

{% extends "core/base.html" %}

{% block title %}
Text
{% endblock %}

{% block page_header %}
Text
{% endblock %}

{% block content %}
Page contents...
{% endblock %}

*/

/* 

Page headers should be NAME - Var1 - Var2 - ... - Varx 

For example Bread BOM - Week 2026-01-01 - Monday 

Except for store names, which should be first before NAME

Page titles should just be NAME, not including store names

*/

/* DYNAMIC MARGINS */

.centre {margin-left: auto; margin-right: auto;}

.mt-sm {margin-top: 0.5rem;}
.mt-md {margin-top: 1rem;}
.mt-lg {margin-top: 2rem;}

.mb-sm {margin-bottom: 0.5rem;}
.mb-md {margin-bottom: 1rem;}
.mb-lg {margin-bottom: 2rem;}

.ml-sm {margin-left: 0.5rem;}
.ml-md {margin-left: 1rem;}
.ml-lg {margin-left: 2rem;}

.mr-sm {margin-right: 0.5rem;}
.mr-md {margin-right: 1rem;}
.mr-lg {margin-right: 2rem;}

/* PAGE LAYOUT - base.html ONLY */

* {box-sizing: border-box;}

body {
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

/* Used with <header> */
.page-head {
    width: 100%;
    min-height: 4rem;
    padding: 1rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(180deg, #f7f8f3 0%, #f2f4ec 100%);
}

.page-head h1 {
    margin: 0;
    display: inline-block;
}

.page-head h1::before {
    content: "";
    display: block;
    width: 100%;
    height: 0.28rem;
    margin-bottom: 0.75rem;
    border-radius: 999px;
    background-color: #777e68;
}

/* Used with <nav> */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    min-height: 4rem;
    z-index: 1000;
    padding: 0.5rem 1rem;
    background-color: #777e68;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 12px rgba(0, 0, 0, 0.18);
    color: whitesmoke;
    display: flex;
    align-items: center;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.navbar-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: whitesmoke;
    font-weight: bold;
    border-radius: 8px;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.navbar-links a:hover {
    background-color: #6b715d;
}

.navbar-links a:active {
    background-color: #5f654f;
    transform: translateY(1px);
}

.navbar-links a:focus-visible {
    outline: 2px solid whitesmoke;
    outline-offset: 2px;
}

.navbar-logout-form {
    margin: 0 1rem 0 auto
}

.navbar-logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    color: whitesmoke;
    font-weight: bold;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.navbar-logout-button:hover {
    background-color: #6b715d;
}

.navbar-logout-button:active {
    background-color: #5f654f;
    transform: translateY(1px);
}

.navbar-logout-button:focus-visible {
    outline: 2px solid whitesmoke;
    outline-offset: 2px;
}

.navbar-logo {
    height: 3rem;
    width: auto;
}

/* Used with <main> */
.container {
    flex: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1rem 0.5rem;
    background-color: white;
    display: flex;
    flex-direction: column;
}

/* Used with <footer> */
.page-footer {
    width: 100%;
    height: 2rem;
    background-color: #777e68;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -6px 12px rgba(0, 0, 0, 0.18);
}

/* TABLES */

.table-general {
    text-align: center;
    border-collapse: collapse;
    width: 90%;
    background-color: whitesmoke;
    border: none; 
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    table-layout: fixed;
    margin-left: auto;
    margin-right: auto;
}

.th-general {
    padding: 1.5%;
    color: whitesmoke;
    background-color: #777e68;
}

.td-general {
    padding: 1.5%;
    border-top: 1px solid #777e68;
    top: 0;
}

.td-general-fatten {
    height: 5rem;
}

.table-general .td-general input:not([type="checkbox"]) {
    width: 100%;
    height: 100%;
    margin: 0;
    box-sizing: border-box;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
}

/* BUTTONS */

/* To be used with button-save */
.button-bars {
    display: flex;
    align-items: center;
    gap: 2.5%;
    margin-left: 1rem;
    margin-right: 1rem;
}

.button-bars::before,
.button-bars::after {
    content: "";
    flex: 1;
    background-color: whitesmoke;
    height: 1rem;
    border-radius: 0.5rem;
}

/* Used when saving forms */
.button-save {
    border: none; 
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
    width: 25%;
    aspect-ratio: 5 / 1;
    background-color: #777e68;
    color: whitesmoke;
    font-size: 1rem;
    font-weight: bold;
}

.button-save:hover {
    background-color: #6b715d;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.14), 0 8px 8px rgba(0, 0, 0, 0.12);
}

.button-save:active {
    background-color: #5f654f;
    transform: translateY(1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.16), 0 2px 4px rgba(0, 0, 0, 0.12);
}

/* Used in tables, e.g. a delete button next to an instance or search button next to a date input */
.button-table {
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    color: whitesmoke;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    background-color: #777e68;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.button-table:hover {
    background-color: #6b715d;
}

.button-table:active {
    background-color: #5f654f;
    transform: translateY(1px);
}

/* Used when navigating to another page */
.button-navigate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    
    border: none; 
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
    width: 25%;
    aspect-ratio: 5 / 1;
    background-color: #777e68;
    color: whitesmoke;
    font-size: 1rem;
    font-weight: bold;
    margin-left: auto;
    margin-right: auto;
}

.button-navigate:hover {
    background-color: #6b715d;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.14), 0 8px 8px rgba(0, 0, 0, 0.12);
}

.button-navigate:active {
    background-color: #5f654f;
    transform: translateY(1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.16), 0 2px 4px rgba(0, 0, 0, 0.12);
}

.button-navigate-lg {
    width: 90%;
    aspect-ratio: 10 / 1;
}

/* Used to display navigation buttons in a grid of X columns */
.button-three-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.button-two-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.button-grid-modifier {
    width: 100%;
    margin-left: 0;
    margin-left: 0;
}

/* PHOTOS */

.div-images {
    width: 90%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-left: auto;
    margin-right: auto;
}

/* To be nested inside div-images */
.div-subimages {
    width: 47.5%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* To be used with 500 x 500 pixel images */
.image-general {
    width: 47.5%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
}

/* To be used w 500 x 200 pixel images */
.subimage-general {
    width: 100%;
    aspect-ratio: 38 / 17;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
}

/* VISUAL BREAKS */

.div-break {
    background-color: whitesmoke;
    height: 1rem;
    border-radius: 0.5rem;
}

/* POP UPS */

.note-dialog {
    border: none;
    border-radius: 10px;
    padding: 0;
    max-width: 30rem;
    width: 90%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18), 0 6px 6px rgba(0, 0, 0, 0.14);
}

.note-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.35);
}

.note-dialog-content {
    padding: 1.5rem;
    text-align: left;
}

.note-dialog-content p {
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

/* TEXT */

.heading-general {
    display: flex;
    align-items: center;
    color: #777e68;
    margin-left: 1rem;
    margin-right: 1rem;
    gap: 2.5%;
}

.heading-general::before,
.heading-general::after {
    content: "";
    flex: 1;
    background-color: whitesmoke;
    height: 1rem;
    border-radius: 0.5rem;
}

.subheading-form-errors {
    margin: 0 2rem 2rem 2rem;
    color: #B00020;
}

/* BEGIN PAGE SPECIFIC STYLES */

/* LOGIN PAGE */

.div-login{
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    background-color: whitesmoke;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* HOME PAGE */

/* Is 1080 x 631 pixels */
.image-logo {
    width: 47.5%;
    height: auto;
}

/* Must be 1080 x 631 pixels */
.subimage-logo {
    width: 47.5%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
}

/* 403 */

.heading-permission-denied {
    color: #B00020;
    margin: 2rem auto 2rem auto;
    font-weight: bold;
    font-size: 1.5rem;
}