/* These styles are generated from main.scss. */
.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* Utility classes */
:root {
  --primary-color: #052f4f;
  --secondary-color: #e9ecef;
  --tertiary-color: #6D7986;
  --accent-color: #99c25b;
  --white: #fff;
  --dark: #333;
  --grey: #6e6e6e;
  --border-grey: #e1dcd3;
  --transparent-border: rgb(135 116 79 / 25%);
  --font--primary: 'Raleway', sans-serif;
  --font--secondary: 'Source Sans Pro', sans-serif;
  --font-sm: 1rem;
  --font-md: 1.125rem;
}

/* Override Bootstrap styles */
.alert-success {
  color: var(--primary-color);
  background-color: unset;
  margin-top: 1rem;
  border-color: var(--primary-color);
}

.alert-danger {
  background-color: unset;
  border-color: unset;
}

.navbar .container-fluid {
  align-items: flex-end;
}

p {
  font-size: 1.25rem;
}

a {
  color: inherit;
  -webkit-text-decoration: solid underline;
  text-decoration: solid underline;
  -webkit-text-decoration-skip: ink;
  text-decoration-skip: ink;
}

a.accent {
  color: var(--accent-color);
}

.btn-primary, .btn-secondary, .btn-success, .btn-warning, .btn-danger{
  padding: 0.625rem 2rem;
  border: none;
  border-radius: 22.5px;
  margin: 2.5px 5px;
}

.btn-primary {
  color: var(--secondary-color);
  background-color: var(--primary-color);
}

.btn-secondary {
  color: var(--primary-color);
  background-color: transparent;
  border: 1px solid var(--primary-color);
}

.btn-success {
  color: var(--primary-color);
  background-color: var(--secondary-color);
}

.btn-primary:hover, .btn-secondary:hover, .btn-success:hover {
  color: var(--secondary-color);
  background-color: var(--primary-color);
  opacity: 0.975;
}

.btn-primary:focus, .btn-primary:active:focus,
.btn-secondary:focus, .btn-secondary:active:focus,
.btn-success:focus, .btn-success:active:focus,
.btn-warning:focus, .btn-warning:active:focus {
  background-color: var(--primary-color);
  box-shadow: unset;
}

.btn-warning:focus, .btn-warning:active:focus {
  background-color: var(--tertiary-color);
}

.btn-sm {
  padding: 0.375rem 1rem;
}

.form-control:focus {
  border: 1px solid var(--primary-color);
  box-shadow: none;
}

input[type]:focus {
  box-shadow: none;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border: unset;
}

/* Override default browser setting for padding and margin */
*, *::before, *::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
  position: relative;
}

body {
  font-family: var(--font--secondary);
  margin-bottom: 235px;
}

nav {
  font-family: var(--font--primary);
  border-bottom: 8px solid var(--primary-color);
}

nav .nav-item {
  padding: 0 10px;
}

.table-scrollable {
  overflow-x: scroll;
}

.sub-header {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--tertiary-color);
}

.list li {
  font-size: 1.25rem;
  padding: 5px;
}

.form-container {
  width: 575px;
  margin: 100px auto;
}

.form-container .sign-in-btn-wrapper {
  display: flex;
  justify-content: space-between;
}

footer {
  text-align: center;
  background-color: var(--secondary-color);
  width: 100%;
  height: 235px;
  position: absolute;
  bottom: 0;
}

footer img {
  width: 150px;
  padding: 35px 0 25px 0;
}

footer ul {
  padding: unset;
  display: flex;
  justify-content: center;
}

footer ul li {
  list-style: none;
  padding: 10px;
}

footer .social-links a i {
  color: var(--primary-color);
}

footer p {
  font-size: 1.075rem;
  text-transform: uppercase;
  color: #aeaeae;
}

@media (max-width: 1024px) {
  .navbar .container-fluid {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-link {
    font-size: 0.875rem;
  }
}

@media (max-width: 767px) {
  .form-container {
    width: 100%;
  }
}

/* Word Exam Generator Instructions Box */
.info-box {
  margin-top: 20px;
  border: 1px solid #ccc;
  padding: 10px;
  background-color: #f9f9f9;
}

/* Django_tables pagination style override */
.page-item.active .page-link {
  background-color: #052f4f;
  border-color: #052f4f;
}

.page-link {
  color: #052f4f;
}

/* Override style introduced in DAL 3.9.5 */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  color: white !important;
}

/* ---- Wagtail ---- */

/* These styles are being gradually adapted from the bakery demo */
/* https://github.com/wagtail/bakerydemo/blob/main/bakerydemo/static/css/main.css */

/* Page header */
.header {
  padding: 0;
  width: 100%;
  background: var(--white);
  z-index: 10;
}

.index-header__title {
  color: var(--dark);
  font-weight: 400;
  font-size: 2.875rem;
  line-height: 1.09;
  margin-top: 30px;
}

.index-header__introduction {
  color: var(--dark);
  font-family: var(--font--primary);
  font-weight: 400;
  font-size: 1.625rem;
  line-height: 1.15;
  margin-top: 20px;
  margin-bottom: 60px;
}

.index-header__introduction.index-header__introduction--blog {
  margin-bottom: 20px;
}

.index-header__body-introduction p:first-child {
  color: var(--dark);
  font-family: var(--font--primary);
  font-weight: 400;
  font-size: 1.625rem;
  line-height: 30px;
  margin-top: 20px;
  margin-bottom: 30px;
}

.index-header__body-introduction {
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .index-header__title {
    font-size: 6.25rem;
    line-height: 0.64;
    margin-top: 70px;
  }

  .index-header__introduction {
    font-size: 2rem;
    line-height: 1.31;
    margin-top: 40px;
    margin-bottom: 40px;
  }

  .index-header__body-introduction p:first-child {
    font-size: 2rem;
    line-height: 42px;
    margin-top: 40px;
    margin-bottom: 40px;
  }

  .index-header__body-introduction {
    margin-bottom: 30px;
  }

  .index-header__title.index-header__title--blog {
    font-size: 4rem;
    line-height: 1.1;
  }
}

/* ---- Blog Index Page ---- */

.blog-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  row-gap: 25px;
  column-gap: 15px;
  margin-bottom: 70px;
}

.blog-tags.blog-tags--condensed {
  column-gap: 0;
}

.blog-tags__pill {
  padding: 10px 18px;
  font-size: var(--font-md);
  line-height: 1.55;
  border: 1px solid var(--primary-color);
  border-radius: 60px;
  margin-left: 20px;
}

.blog-tags__pill--selected {
  background-color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
  color: var(--white);
}

.blog-tags__pill:hover.blog-tags__pill--selected {
  background-color: var(--secondary-color);
}

.blog-tags__pill:first-child {
  margin-left: 0;
  color: var(--primary-color);
}

.blog-tags__pill:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.blog-tags__tag {
  color: var(--accent-color);
}

.blog-list {
  padding: 0;
}

.blog-list-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.blog-list-item a {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
}

.blog-list-item:hover img {
  opacity: 0.3;
}

.blog-list-item .image {
  overflow: hidden;
  background-color: #eb7400;
  flex: 1 0 auto;
}

.blog-list-item .image img {
  min-height: 510px;
  width: auto;
  min-width: 100%;
}

.blog-list-item .text {
  background: linear-gradient(
    to bottom,
    rgb(0 0 0 / 0%) 0%,
    rgb(0 0 0 / 60%) 23%,
    rgb(0 0 0 / 100%) 50%
  );
  margin-top: -150px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.blog-list-item .text h2 {
  color: #fff;
  font-weight: 200;
  margin-top: 0;
}

.blog-list-item .text p {
  color: #e3e3e3;
  font-size: 0.875rem;
  margin-bottom: 0;
}

.blog-list-item .footer {
  background-color: #333;
  color: #fff;
  margin-top: 0;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* ---- Blog Page ---- */

.blog__meta {
  margin-bottom: 20px;
}

.blog__published {
  color: var(--grey);
  margin-bottom: 30px;
}

.blog__tag-introduction {
  font-size: var(--font-md);
  color: var(--grey);
  margin-bottom: 20px;
  margin-top: 60px;
}

@media (min-width: 768px) {
  .blog__published {
    margin-bottom: 40px;
  }

  .blog__avatars {
    margin-bottom: 40px;
  }

  .blog__tag-introduction {
    margin-top: 100px;
  }
}

/* #region ---- Listing Card ---- */
.listing-card {
  margin-bottom: 40px;
}

.listing-card__meta {
  border-collapse: separate;
  border-spacing: 5px;
}

.listing-card__link {
  display: flex;
  flex-direction: row;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-grey);
}

.listing-card__contents {
  padding-top: 10px;
  padding-left: 25px;
}

.listing-card__title {
  color: var(--orange);
  margin-top: 0;
}

.listing-card__meta-category {
  color: var(--grey);
  font-size: 0.875rem;
  line-height: 1.57;
  padding-right: 10px;
  vertical-align: top;
}

.listing-card__meta-content {
  color: var(--dark);
  font-size: 0.875rem;
  line-height: 1.57;
  vertical-align: top;
}

.listing-card__meta-row:last-child {
  margin-bottom: 0;
}

.listing-card__image {
  width: 100%;
  overflow: hidden;
  margin: 0;
  max-width: 100px;
  max-height: 110px;
}

.listing-card__image img {
  transition: transform ease 0.2s;
}

.listing-card:hover .listing-card__image img {
  transform: scale(1.05);
}

.listing-card:hover .listing-card__title {
  color: var(--dark-orange);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .listing-card__contents {
    padding-left: 45px;
    padding-top: 30px;
  }

  .listing-card__image {
    width: 100%;
    overflow: hidden;
    margin: 0;
    max-width: 180px;
    max-height: 180px;
  }

  .listing-card__meta-category,
  .listing-card__meta-content {
    font-size: var(--font-sm);
    line-height: 1.5;
  }
}

/* ---- Blog Listing Card ---- */
.blog-listing-card {
  padding-bottom: 40px;
  width: 100%;
}

.blog-listing-card:last-child {
  padding-bottom: 100px;
}

.blog-listing-card__link {
  display: flex;
  flex-direction: column;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--transparent-border);
}

.blog-listing-card__contents {
  padding-top: 10px;
}

.blog-listing-card__title {
  font-size: 1.625rem;
  line-height: 1.15;
  color: var(--orange);
  margin-top: 0;
  margin-bottom: 8px;
}

.blog-listing-card__introduction {
  font-size: var(--font-sm);
  line-height: 1.5;
  color: var(--dark);
  margin-bottom: 8px;
  max-width: 530px;
}

.blog-listing-card__metadata {
  font-size: 0.875rem;
  line-height: 1.43;
  color: var(--grey);
  margin-bottom: 0;
}

.blog-listing-card__image {
  width: 100%;
  overflow: hidden;
  margin: 0;
}

.blog-listing-card__image img {
  transition: transform ease 0.2s;
}

.blog-listing-card:hover .blog-listing-card__image img {
  transform: scale(1.05);
}

.blog-listing-card:hover .blog-listing-card__title {
  color: var(--dark-orange);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .blog-listing-card:last-child {
    padding-bottom: 200px;
  }

  .blog-listing-card__link {
    flex-direction: row;
  }

  .blog-listing-card__contents {
    padding-top: 30px;
    padding-left: 45px;
  }

  .blog-listing-card__title {
    font-size: 2rem;
    line-height: 1.31;
  }

  .blog-listing-card__introduction {
    font-size: var(--font-md);
    line-height: 1.55;
  }

  .blog-listing-card__image {
    flex-shrink: 0;
    overflow: hidden;
    margin: 0;
    width: 325px;
    height: 250px;
  }
}

/* #endregion */

/* Style for the error list container */
.errorlist {
  list-style: none;
  margin: 0;
  padding: 0;
  color: #ff3333; /* Red */
  font-size: 14px;
  font-weight: bold;
}

/* Style for individual error messages within the list */
.errorlist li {
  margin: 5px 0;
}

/* Style for the error message text */
.errorlist li::before {
  content: '\2022'; /* Bullet point symbol (•) before each error message */
  margin-right: 5px;
  color: #ff3333; /* Red */
}
/*

/* ---- Fullscreen Button ---- */
/* toggle fullscreen button */
.toggle-button {
  position: fixed;
  right: 32px;
  z-index: 9999; /* Ensure the button is above other elements */
  align-items: center;
  background-color: white;
  border: 2px solid #0000;
  border-radius: 50%;
  box-shadow: 0 0 1px 0 #6bd6e6, 0 1px 10px 0 #6bd6e6b3;
  cursor: pointer;
  display: flex;
  font-size: 1rem;
  height: 3.5em;
  justify-content: center;
  margin: 0;
  padding: 0;
  text-decoration: none;
  transition: all .2s ease-in-out;
  width: 3.5em;
}

/* toggle fullscreen button for Wagtail editors */
.toggle-button.editor {
  bottom: 104px;
}

/* toggle fullscreen button for non-Wagtail editors */
.toggle-button:not(.editor) {
  bottom: 32px;
}

/* Add more shadow on hover */
.toggle-button:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* ---- Fixes the date label font size in fields using RangeWidget by adding the class to the Crispy Layout---- */
.custom-date-label legend.form-label {
  font-size: var(--bs-body-font-size) !important; /* Ensure consistent font size for legend */
}

/* Order details table in orders/order_detail.html */
.order-btn {
  display: inline-block;
}
