
:root {
  --color-navy: #123C5C;
  --color-navy-light: #cddbe4;
  --color-gold: #F2A93B;
  --color-gold-dark: #4A2E05;
  --color-cream: #FBF7F0;
  --color-charcoal: #2B2B2B;
  --font-heading: Georgia, 'Times New Roman', serif;
}


body {
  background-color: var(--color-cream);
  color: var(--color-charcoal);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-navy);
}

/* Headings default to --color-navy above, too dark in
   dark mode swapped for the gold accent instead,
   */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: var(--color-gold);
}

/* Specials used gold text on gold background, switched in dark mode, switched text to navy
 */
body.dark-mode .specials-title h2 {
  color: var(--color-navy);
}

/* as above */
body.dark-mode .home-aside h2 {
  color: var(--color-navy);
}

/* as above */
body.dark-mode .home-header h1 {
  color: var(--color-navy);
}

/* as above */
body.dark-mode .menu-item-card h3,
body.dark-mode .specials-item h3 {
  color: var(--color-navy);
}

/* when checking out, order items had too little contrast in dark modedue to bootstraps default being grey
   manually set to be more visible */
body.dark-mode .table {
  color: #f1f1f1;
}


.bg-navy {
  background-color: var(--color-navy) !important;
}

.navbar-dark .nav-link,
.navbar-dark .navbar-brand {
  color: var(--color-cream);
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link:focus,
.navbar-dark .navbar-brand:hover {
  color: var(--color-gold);
}

.footer {
  color: var(--color-cream);
}

.footer a {
  color: var(--color-gold) !important;
}

body.dark-mode .footer a {
  color: var(--color-gold) !important;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.footer-links {
  flex: 1 1 auto;
  min-width: 0;
}

/* wraps map iframe and fits "view full map" text underneath */
.footer-map-wrap {
  flex: 0 0 auto;
  text-align: center;
}

/* map default is a 450px iframe, crops it to a fixed window. */
.footer-map-crop {
  position: relative;
  width: 160px;
  height: 120px;
  overflow: hidden;
  border: 2px solid var(--color-gold);
  border-radius: 6px;
}

/* shifts top of map up 165 pixels to center 450px map in new 160x120 box */
.footer-map {
  display: block;
  border: none;
  width: 160px;
  height: 450px;
  position: absolute;
  top: -165px;
  left: 0;
  pointer-events: none;
}

.footer-map-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.8rem;
}

/*    Global submit-button styling, only on submit type buttons though, not regular buttons */
button[type="submit"]:not(.nav-link),
input[type="submit"]:not(.nav-link) {
  background-color: var(--color-gold);
  color: var(--color-gold-dark);
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
}

button[type="submit"]:not(.nav-link):hover,
input[type="submit"]:not(.nav-link):hover {
  background-color: var(--color-navy);
  color: var(--color-cream);
}


input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
  border: 1px solid var(--color-navy-light);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 1rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px var(--color-navy-light);
}

/* controls popup banner for order confirmation */
.site-status-banner {
  background-color: var(--color-gold);
  color: var(--color-navy);
  text-align: center;
  font-weight: bold;
  padding: 12px;
}

/* sets item quantity input to be inline with the button rather than sit below */
.item-qty-input {
  width: 50px;
  display: inline-block;
  margin-right: 6px;
}

/* Menu page search box. flexbox keeps all on one line. */
.menu-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.menu-search-clear {
  font-size: 0.9rem;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.inline-form {
  display: inline;
}

.contact-map {
  max-width: 100%;
  height: auto;
  min-height: 300px;
  border: 2px solid var(--color-gold);
  border-radius: 6px;
}

/* Centres page in a column rather than the form stretching across whole screen width */
.contact-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 10px 0 30px;
}


.contact-form-box {
  background-color: var(--color-cream);
  color: var(--color-navy);
  border: 1px solid var(--color-navy-light);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  padding: 24px;
  margin-bottom: 24px;
}


.contact-map-box {
  background-color: var(--color-cream);
  color: var(--color-navy);
  border: 1px solid var(--color-navy-light);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  padding: 24px;
}


.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  margin-bottom: 4px;
  font-weight: bold;
}

.form-field input,
.form-field textarea {
  width: 100%;
  box-sizing: border-box;
}

body.dark-mode .contact-form-box,
body.dark-mode .contact-map-box {
  background-color: #1e1e1e;
  color: var(--color-cream);
  border-color: #333;
}

.warning-text {
  color: #b00020;
  font-weight: bold;
}

/* Colour chosen to fit WCAG contrast rules*/
body.dark-mode .warning-text {
  color: #ff6b6b;
}

/* Success banner shown on Contact.cshtml after an email sends successfully. */
.form-success {
  color: #1b6ec2;
  font-weight: bold;
}


.home-header {
  background-color: var(--color-cream);
  color: var(--color-navy);
  text-align: center;
  padding: 10px;
}

/* wrap welcome header, and about us to fill page. */
.home-page {
  display: flex;
  flex-direction: column;
  min-height: 75vh;
}

/* Specials are outer card, wrapping title card, then item grid. coloumn keeps title above item grid */
.home-specials {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--color-navy);
  color: var(--color-cream);
  padding: 20px;
  border-radius: 8px;
}

.specials-title {
  background-color: var(--color-gold);
  color: var(--color-navy);
  text-align: center;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.specials-title h2 {
  margin: 0;
}

/* W3Schools. (n.d.). CSS website layout. W3Schools.
   Retrieved July 8, 2026, from https://www.w3schools.com/css/css_website_layout.asp */
.specials-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;

  flex: 1;
}

/*
    mind width overrides flex default refusal to shrink below content size (high res image) which prevented
    being responsive and fitting in container. forces card to hold width.
*/
.specials-item {
  flex: 1 1 220px;
  margin: 10px;
  box-sizing: border-box;
  min-width: 0;
}

/* GeeksforGeeks. (2025, July 23). CSS flexbox layout. GeeksforGeeks.
   https://www.geeksforgeeks.org/css/css-flexbox-layout/
 */
.specials-item {
  background-color: var(--color-cream);
  color: var(--color-navy);
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

/* GeeksforGeeks. (2025, July 23). CSS flexbox layout. GeeksforGeeks.
   https://www.geeksforgeeks.org/css/css-flexbox-layout/ */
.home-aside {
  background-color: var(--color-gold);
  color: var(--color-navy);
  padding: 20px;
  text-align: center;
}

/* forces image to fit inside the card */
.specials-item-image {
  width: 100%;
  max-width: 200px;
  height: 200px;
  object-fit: cover;
  display: block;
  align-self: center;
}


.home-header,
.home-aside {
  opacity: 0.85;
}

/*   Menu page (Pages/Menu/Index.cshtml) collapsible category accordion. */

.menu-categories {
  width: 100%;
}

/* W3Schools. (n.d.). How to create an accordion. W3Schools.
   Retrieved July 8, 2026, from https://www.w3schools.com/howto/howto_js_accordion.asp
   Taken from the "Create An Accordion" button example (.accordion class) -
   full-width, left-aligned button with no default border, used here as the
   category's clickable title. */
.category-header {
  background-color: var(--color-cream);
  color: var(--color-navy);
  cursor: pointer;
  padding: 18px;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  transition: 0.4s;
  font-size: 1.1rem;
  font-family: var(--font-heading);
}

/* W3Schools. (n.d.). How to create an accordion. W3Schools.
   Retrieved July 8, 2026, from https://www.w3schools.com/howto/howto_js_accordion.asp
   Taken from the same example's ".active, .accordion:hover" rule - highlights
   the header on hover */
.category-header:hover,
.category-header.is-open {
  background-color: var(--color-gold);
}

/* W3Schools. (n.d.). How to create an accordion. W3Schools.
   Retrieved July 8, 2026, from https://www.w3schools.com/howto/howto_js_accordion.asp
   Taken from the "Animated Accordion (Slide Down)" example's .panel rule -
   max-height:0 + overflow:hidden hides the content by default (only the
   category-header title shows), and the transition animates it open/closed
   when site.js sets an explicit max-height on click. */
.category-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}

/* wraps a header and panel into one card (rounded corners, drop shadow, spacing
   from the next category)*/
.category-card {
  margin-bottom: 10px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

body.dark-mode .category-card {
  background-color: #1e1e1e;
}

.category-items {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  padding: 10px 18px;
}

/* GeeksforGeeks. (2025, July 23). CSS flexbox layout. GeeksforGeeks.
   https://www.geeksforgeeks.org/css/css-flexbox-layout/ */
.menu-item-card {
  flex: 1 1 220px;
  margin: 10px;
  box-sizing: border-box;

  background-color: var(--color-cream);
  color: var(--color-navy);
  border: 1px solid var(--color-navy-light);
  padding: 20px;
  text-align: center;

  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* scales each menu item's image to fit inside the card without stretching it, as they contain images 
    of differentsizes and aspect ratios */
.menu-item-image {
  width: 100%;
  max-width: 200px;
  height: 200px;
  object-fit: cover;
  display: block;
  align-self: center;
}


.menu-item-action {
  margin-top: auto;
  padding-top: 10px;
}


.menu-item-action button[type="submit"] {
  width: 100%;
}


body.dark-mode {
  background-color: #121212;
  color: #f1f1f1;
}


body.dark-mode a {
  color: #8ab4f8;
}

/*    Toggle switch light/dark modes
   W3Schools. (n.d.). How to create a toggle switch. W3Schools.
       Retrieved July 8, 2026, from https://www.w3schools.com/howto/howto_css_switch.asp
 */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

.slider.round {
  border-radius: 34px;
}


.slider-knob {
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider.round .slider-knob {
  border-radius: 50%;
}

input:checked + .slider .slider-knob {
  transform: translateX(20px);
}

/* Sun/moon icons for day/night. swapped places using toggle and opacity */
.switch-icon {
  position: absolute;
  width: 12px;
  height: 12px;
  transition: opacity .4s;
}

.switch-icon-sun {
  color: #f39c12;
  opacity: 1;
}

.switch-icon-moon {
  color: #2c3e50;
  opacity: 0;
}

input:checked + .slider .switch-icon-sun {
  opacity: 0;
}

input:checked + .slider .switch-icon-moon {
  opacity: 1;
}

/* 
  
   W3Schools. (n.d.). How to create a sticky navbar. W3Schools.
       Retrieved July 8, 2026, from https://www.w3schools.com/howto/howto_js_navbar_sticky.asp */
.sticky-top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-navy);
}


.cart-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* GeeksforGeeks. (2025, July 12). How to count number of notification on an
   icon? GeeksforGeeks.
   https://www.geeksforgeeks.org/css/how-to-count-number-of-notification-on-an-icon/
*/
.cart-badge {
  position: relative;
  top: -10px;
  left: -6px;
  background-color: #b00020;
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  padding: 0 3px;
}

/* 
   W3Schools. (n.d.). How to create a side navigation menu. W3Schools.
       Retrieved July 8, 2026, from https://www.w3schools.com/howto/howto_js_sidenav.asp */
.cart-panel {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1100;
  top: 0;
  right: 0;
  background-color: #fefefe;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .cart-panel {
  background-color: #1e1e1e;
  color: #f1f1f1;
}


.cart-panel-close {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
  background: none;
  border: none;
  cursor: pointer;
}


.cart-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1050;
}


.cart-panel h2 {
  padding: 0 25px;
}

.cart-panel-item {
  padding: 10px 25px;
  border-bottom: 1px solid #ddd;
}

.cart-panel-item-name {
  font-weight: bold;
}

.cart-panel-item-form {
  display: inline-block;
  margin-top: 5px;
  margin-right: 10px;
}

.cart-panel-qty {
  width: 50px;
}

.cart-panel-total {
  padding: 10px 25px;
  font-weight: bold;
}

.cart-panel-checkout-link {
  display: block;
  margin: 10px 25px;
  text-align: center;
}

.stripe-card-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
  margin-top: 10px;
}

.stripe-card-form label {
  font-weight: bold;
}

.stripe-payment-error {
  color: #b02a2a;
  font-weight: bold;
  margin-top: 10px;
}


body.dark-mode .stripe-payment-error {
  color: #ff6b6b;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  z-index: 2000;
  background-color: var(--color-navy);
  color: var(--color-cream);
  padding: 10px 16px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}


@media (max-width: 600px) {
    /*
        ensures multi column tables from orders/checkout/admin page dont get too small by swapping
        to scrollable block at full width when at a certain size.
    */
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .stripe-card-form {
    max-width: 100%;
  }
}