:root {
  --primary-blue: #041C44;
  --light-blue: #04ECFC;
  --orange: #F4941C;
  --white: #ffffff;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-800: #1f2937;
}

/* Implement global box-sizing for a more predecible box model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--gray-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* Prevent horizontal scroll if the body overflows */
}

button,
input,
select,
textarea,
option {
  font-family: 'Poppins', sans-serif;
}

.header {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-bottom: 3px solid var(--orange);
}

.header > div {
  display: grid;
  grid-template-columns: 1fr 60% 1fr;
  max-width: 1200px;
  width: 100%; 
  margin: 0 auto;
  align-items: center;
}

/* Header logo */
.header .logo-container {
  display: flex;
  align-content: center;
  justify-content: center;
}

.header .logo {
  width: 128px;
}

/* Page title */
.header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
}

.header-title-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.executing-dev {
  font-weight: bold;
  font-style: italic;
  color: orange;
}

/* Logout button */
.logout {
  position: relative;
  width: fit-content;
  cursor: pointer;
  justify-self: end;
  margin-right: 20px;
}

/* Hover underline animation */
.logout:after {
  background: none repeat scroll 0 0 transparent;
  bottom: 0;
  content: "";
  display: block;
  height: 2px;
  left: 50%;
  position: absolute;
  background: #fff;
  transition: width 0.3s ease 0s, left 0.3s ease 0s;
  width: 0;
}

.logout:hover:after {
  width: 100%;
  left: 0;
}

.container {
  position: relative;
  max-width: 1200px;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  margin: 2rem auto;
}

.error-container,
.warning-container,
.success-container {
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.error-container h2,
.error-container p {
  margin: 0.3rem 1.1rem;
}

.error-container {
  background: #ffd3d3;
  border: 1px solid red;
}

.warning-container {
  background: #efd1ab;
  border: 1px solid var(--orange);
}

.success-container {
  background: #9DE09d;
  border: 1px solid #488548;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    padding: 1rem;
  }

  .header > div {
    min-width: 0;
    width: 100%; 
    grid-template-columns: auto 1fr auto;
  }

  .header .logo {
    width: 80px;
  }

  .logout {
    margin-right: 0;
    justify-self: end;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .container {
    min-width: 0;
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

}

/* SweetAlert (Modal plugin) */

.swal2-actions button {
  font-family: 'Poppins', sans-serif !important;
}

.swal2-confirm {
  background: var(--primary-blue);
}

.swal2-cancel {
  background: var(--orange);
}