/* Book colors */
:root {
  --green: rgb(28,132,95);
  --blue: rgb(22,87,154);
  --red: rgb(138,35,35);
  --darkgrey: rgb(80,80,80);
  --orange: rgb(242,108,46);
  --lightgrey: rgb(240,240,240);
  --lightyellow: rgb(255,253,232);
  --lightlightgrey: rgb(250,250,250);
  --pink: rgb(243, 81, 129);
}

/* Color: lightyellow background */
body {
  background-color: var(--lightyellow);
  color: var(--darkgrey); /* default text color */
}
#content-wrapper,
#content,
.container-fluid,
.bg-white {
  background-color: var(--lightyellow) !important;
}

/* Color: blue links */
a {
  color: var(--blue);
  text-decoration: none;
}

/* Color: orange active links */
a:hover,
a:active {
  color: var(--orange);
}

/* Color: green buttons */
.btn-primary {
  background-color: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* Color: orange active buttons */
.btn-primary:hover,
.btn-primary:active {
  background-color: var(--orange);
  border-color: var(--orange);
}

/* Color: orange accents */
.accent {
  color: var(--orange);
}

/* Color: lightgrey cards */
.card {
  background-color: var(--lightgrey) !important;
}

/* Divider below the header */
.pink-divider {
  height: 2px;
  background-color: var(--pink);
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Definition box */
.definition {
  background-color: var(--lightlightgrey);
  border: 2px solid var(--green);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.definition .def-content {
  margin-top: 15px;
}

/* Theorem box */
.theorem {
  background-color: var(--lightlightgrey);
  border: 2px solid var(--orange);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.theorem .th-content {
  margin-top: 15px;
}

/* Copyright text */
.copyright span {
  font-size: 1.1rem;
}

.toplist-icon {
  display: inline-block;
  padding: 6px 12px;
  font-size: 1.1rem;
  color: white;
  background-color: var(--orange);
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.toplist-icon:hover {
  background-color: var(--red);
  text-decoration: none;
  color: white;
}

/* Styling for mobile */
@media (max-width: 576px) {
  .navbar-toggler {
    height: 30px;
    padding: 0rem 0rem;
    margin-right: 10px;
  }

  .navbar-toggler-icon {
    background-size: 20px 20px;
  }

  .navbar .container.d-flex {
    flex-wrap: nowrap;
  }

  .copyright span {
    font-size: 0.7rem;
  }
}

/* --------------- */
/* Figures gallery */
/* --------------- */

/* Card caption styling remains small */
.card-text.small {
  font-size: 0.85rem;
}

/* Make the modal dialog slightly smaller on large screens */
.modal-dialog {
  max-width: 50%;
}

/* Ensure the modal image scales properly */
.modal-body img {
  width: 100%;
  height: auto;
}

/* Larger font for modal caption and left-align the text */
.modal-caption {
  font-size: 1.2rem;
  text-align: left;
}

/* On mobile screens, use full width for the modal */
@media (max-width: 576px) {
  .modal-dialog {
    max-width: 100%;
    margin: 0 auto;
  }
}

/* -------------------- */
/* Presentation gallery */
/* -------------------- */

/* Remove default background images */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-image: none;
}

/* Use FontAwesome icons (make sure FontAwesome is loaded) */
.carousel-control-prev::before {
  content: "\f053"; /* fa-chevron-left */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 2rem;
  color: #aaa;
}
.carousel-control-next::before {
  content: "\f054"; /* fa-chevron-right */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 2rem;
  color: #aaa;
}

/* Increase clickable area and position them further out */
.carousel-control-prev,
.carousel-control-next {
  width: 50px;  /* Increase as desired */
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
}

.carousel-control-prev {
  left: 0px;
}

.carousel-control-next {
  right: 0px;
}

/* Optional: change opacity on hover */
.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

/*---------------*/
/* Toplist table */
/*---------------*/

.toplist-table {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  background-color: var(--lightlightgrey);
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  border-radius: 8px;
  overflow: hidden;
}

.toplist-table th {
  background-color: var(--orange);
  color: white;
  padding: 10px 15px;
  text-align: left;
}

.toplist-table td {
  padding: 8px 15px;
  border-bottom: 1px solid var(--lightgrey);
}

.toplist-table tr:nth-child(even) {
  background-color: var(--lightyellow);
}

.toplist-table tr.current-user {
  background-color: var(--blue);
  color: white;
  font-weight: bold;
}

.toplist-table tr.current-user td {
  border-bottom-color: rgba(255, 255, 255, 0.3);
}
