/* ==================[ Global styles ]================= */
@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap");

:root {
  --navy: rgb(8, 44, 108);
  --navy-light: rgba(8, 44, 108, 0.8);
  --navy-lighter: rgba(8, 44, 108, 0.1);
  --navy-subtle: rgba(8, 44, 108, 0.05);
  --red: #e63946;
  --red-light: rgba(230, 57, 70, 0.1);
  --white: #ffffff;
  --off-white: #f8f9fa;
  --light-gray: #e9ecef;
  --medium-gray: #dee2e6;
  --dark-gray: #6c757d;
  --text-dark: #212529;
}

/* Css Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
}

body {
  background-color: var(--off-white);
  color: var(--text-dark);
  line-height: 1.6;
  font-family: "Lexend", sans-serif;
}

/* Container for main content */
.container {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0;
}

/* ============[ Header details: app name & user detail ]============= */
header {
  background-color: var(--navy);
  color: var(--white);
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.header__section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1250px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo__icon {
  width: 40px;
  height: 40px;
  background-color: var(--white);
  color: var(--red);
  border-radius: 10%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;

  .due {
    color: var(--red);
    border-bottom: 3.5px solid var(--white);
  }

  .board {
    border-bottom: 3.5px solid var(--red);
  }
}

.app__detail {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  gap: 12px;
}

.detail__report,
.detail__github,
.detail__demo {
  border-radius: 50%;
  background-color: var(--white);
  height: 30px;
  width: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.detail__report:hover,
.detail__github:hover,
.detail__demo:hover {
  transform: scale(1.07);
}

.ri__icon {
  color: var(--navy);
  font-size: 1.3rem;
  font-weight: var(--text-normal);
  transition: color 0.3s ease;
}

.detail__report:hover .ri__icon,
.detail__github:hover .ri__icon,
.detail__demo:hover .ri__icon {
  color: var(--red);
}

/* Tooltip */
.app__detail div a::before {
  content: attr(data-tooltip);
  position: absolute;
  background-color: var(--red);
  color: var(--white);
  text-decoration: none;
  padding: 0.1em 0.5em;
  border-radius: 100px;
  transform: translateY(-40px);
  font-size: .8rem;
  opacity: 0;
  width: max-content;
  transition: all 0.3s ease;
  pointer-events: none;
}

.app__detail div a::after {
  content: "";
  position: absolute;
  height: 0;
  width: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 8px solid var(--red);
  transform: translateY(-30px);
  opacity: 0;
  transition: all 0.4s ease;
  left: auto;
}

.app__detail div a:hover::before {
  transform: translateY(-28.5px);
  opacity: 1;
  left: -50%;
}

.app__detail div a:hover::after {
  transform: translateY(-7px);
  opacity: 1;
  left: 40%;
}


.main-content {
  padding: 0 30px 30px;
}

/* ===========[ Assignment Controls: Search box & filter buttons ]========= */
.controls {
  background-color: var(--white);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

/* The 3 filter buttons */
.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.btn-outlined {
  background-color: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);

  .ri-alert-fill {
    color: var(--red);
  }
}

/* button hover effect */
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* =================[ Assignment search box ]=============== */
.search__box {
  position: relative;
  flex-grow: 1;
  max-width: 350px;
}

.search__box input {
  width: 100%;
  padding: 12px 18px;
  padding-left: 42px;
  border: 1px solid var(--light-gray);
  border-radius: 6px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.search__box input:focus {
  outline: none;
  border-color: var(--navy);
}

.search__box i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dark-gray);
}

/* ==============[ Assignment Cards: Canvas calendar events ]================ */

.assignments {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.assignment-body {
  padding: 15px 20px;
}

.assignment-description {
  color: var(--text-dark);
  font-size: 0.95rem;
  overflow: hidden;
  max-height: 20px;
  transition: max-height 0.3s ease;
  white-space: pre-wrap;
}

.expanded {
  max-height: 1000px;
}

.toggle-description {
  font-size: 0.85rem;
  color: var(--navy);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.toggle-description:hover {
  text-decoration: underline;
}

.sync-info {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sync-icon {
  font-size: 0.8rem;
}

/* For Empty assignment card */
.empty-state {
  text-align: center;
  padding: 20px;
  color: #666;
}

.empty-state h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 16px;
}

.empty-state-unauthorized .first-p {
  font-size: .9rem;
  text-align: justify;
  justify-content: center;
}

.empty-state-unauthorized .second-p {
  margin: 1rem 0;
}

.empty-state-unauthorized .warning {
  color: var(--red);
}

.empty-state-unauthorized {
  padding: 2rem;
  color: #333;
  background-color: #f5f5f5; /* Light gray background */
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.empty-state-unauthorized h3 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 15px;
  color: #2c3e50; /* Darker color for emphasis */
}

.empty-state-unauthorized p {
  font-size: 18px;
}


.desc-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.assignment-card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border-left: 5px solid var(--navy);
}

.assignment-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-urgent {
  border-left-color: var(--red);
}

.assignment-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--light-gray);
}

.assignment-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 5px;
}

.assignment-course {
  display: inline-block;
  background-color: var(--navy-lighter);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 5px;
}

.due-date-section {
  text-align: right;
  min-width: 120px;
}

.assignment-date {
  font-size: 0.9rem;
  color: var(--dark-gray);
  display: block;
  margin-bottom: 5px;
}

.countdown {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .controls {
    flex-direction: column;
    align-items: flex-start;
  }

  /* =============[ Styling: Search box ]=============== */
  .search-box {
    width: 100%;
    max-width: none;
  }

  .assignment-header {
    flex-direction: column;
  }

  .due-date-section {
    text-align: left;
    margin-top: 10px;
  }
}

/*=========[ colour of notification under dates signifies level of urgency ]===========*/
.urgent {
  background-color: var(--red-light);
  color: var(--red);
}

.warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: #ff9500;
}

.safe {
  background-color: rgba(40, 167, 69, 0.1);
  color: #20c997;
}

.overdue {
  color: darkred;
  font-weight: bold;
  background-color: #f1e6ff;
}


/* ================[ Authentication button Styles ]================= */
#auth-container {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  width: 100%;
}

#auth-container button {
  width: 20%;
  padding: 10px;
  margin: 10px 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--navy);
  transition: all 0.2s ease;
}

#authorize_button {
  color: var(--text-dark);
  cursor: pointer;
  min-width: 10rem;
}

#signout_button {
  color: var(--text-dark);
  min-width: 10rem;
}

#error-content {
  display: none;
  background-color: #ffebee;
  color: #d32f2f;
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
  font-weight: bold;
}

.dueboard-org {

  background-color: #ffebee;
  color: #d32f2f;
}
