/*------------------------------------*\
 * #IMPORTS
 * Import external stylesheets here.
\*------------------------------------*/
@import url(/css/all.css);

/*------------------------------------*\
 * #BASE STYLES & UTILITIES
 * General, non-layout specific styles.
\*------------------------------------*/
/* Common form input styling */
.custom-input {
  background-color: #e0e0e0;
  height: 40px;
  border: none;
  border-radius: 0;
  padding: 5px 10px;
  color: #000;
  width: 100%;
  box-sizing: border-box;
}

.custom-input:focus {
  background-color: #e0e0e0;
  outline: none;
  box-shadow: none;
}

/* General form text */
.form-text {
  color: var(--bg_sec);
  font-weight: lighter;
  font-size: 15px;
}

/* Common link styling for login/signup */
.link-text,
.log-in,
.signup-link {
  color: black;
  text-decoration: underline;
  font-weight: bold;
}

.link-text:hover,
.log-in:hover,
.signup-link:hover {
  color: #000;
  text-decoration: none;
}

/* Specific adjustment for signup link to override parent bold */
.signup-link {
  font-weight: normal;
}

/* Common button styling */

/* Authentication section general container */
.auth-section {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 25px;
  padding-bottom: 25px;
  /* margin-top: 100px; */
  box-sizing: border-box;
  padding-left: 15px;
  padding-right: 15px;
}

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/*------------------------------------*\
 * #AUTH FORM WRAPPER (MAIN BOX)
 * Styles for the main container holding the flip card.
\*------------------------------------*/
.auth-form-wrapper {
  width: 100%; /* Default for smaller screens */
  height: fit-content;
  background-color: transparent;
  border-radius: 5px;
  /* border-bottom-left-radius: 100px; */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-height: 500px;
}

/*------------------------------------*\
 * #FLIP CARD ANIMATION
 * Styles for the 3D flip effect.
\*------------------------------------*/
.flip-card-wrapper {
  perspective: 1000px;
  width: 100%;
  height: 100%;
  position: relative;
}

.flip-card-inner {
  transition: 0.6s;
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  height: 100%;
}

.flip-card-wrapper.flip .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  backface-visibility: hidden;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  box-sizing: border-box;
}

.flip-card-front {
  z-index: 2;
}

.flip-card-back {
  transform: rotateY(180deg);
  z-index: 1;
}

/*------------------------------------*\
 * #AUTH PANELS (INFO & FORM)
 * Styles for the left (info) and right (form) panels within the flip card.
\*------------------------------------*/
.auth-panel-row {
  display: flex;
  flex-direction: column; /* Default to column for smaller screens */
  justify-content: space-around;
  width: 100%;
  height: 100%;
}

/* Left Panel - Information/Login Message */
.auth-info-panel {
  display: flex;
  flex-direction: column;
  width: 100%; /* Default for smaller screens */
  height: 250px; /* Base height for mobile */
  margin-left: auto;
  margin-right: auto;
  background-color: var(--bg);
  /* border-top-right-radius: 100px; */
  /* border-bottom-left-radius: 100px; */
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.login-message-large {
  display: none; /* Hidden by default, shown on large screens */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-grow: 1;
  color: var(--white);
}

.login-logo {
  width: 50px;
  height: auto;
  margin-top: 10px;
  margin-bottom: 10px;
}

.login-message-large h2 {
  font-weight: bolder;
  color: var(--white);
  margin: 0;
  font-size: 1.5rem;
}

.login-message-large p {
  color: var(--white);
  margin: 5px 0 0;
  line-height: 1.5;
}

.sign-text-small {
  display: block; /* Shown by default, hidden on large screens */
  font-weight: bolder;
  color: var(--white);
  text-align: center;
  padding: 20px;
}

/* Right Panel - Forms */
.auth-form-panel {
  width: 100%; /* Default for smaller screens */
  height: 250px; /* Base height for mobile */
  margin-top: 50px;
  box-sizing: border-box;
  padding-left: 15px;
  padding-right: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-title-large {
  display: none; /* Hidden by default, shown on large screens */
  font-weight: bolder;
  color: var(--bg);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Form fields common styling */
.login-form,
.reset-password-form {
  width: 100%;
}

.form-group label {
  font-weight: bolder;
  color: black;
  display: block;
}

/* Specific field group adjustments */
.password-group {
  margin-top: 1.5rem;
}


/*------------------------------------*\
 * #MEDIA QUERIES
 * Responsive adjustments for various screen sizes.
\*------------------------------------*/

/* Small screens and up (min-width: 576px) */
@media (min-width: 576px) {
  .auth-info-panel {
    /* width: 50%; */
  }
  .auth-form-panel {
    width: 100%; /* Remains full width on small screens within wrapper */
  }
}

/* Large screens and up (min-width: 992px) */
@media (min-width: 992px) {
  .auth-section {
    padding-top: 50px;
    padding-bottom: 50px;
  }
  .auth-form-wrapper {
    width: 66.666667%; /* 8/12 of 100% */
  }
  .auth-panel-row {
    flex-direction: row; /* Layout panels in a row */
  }
  .auth-info-panel {
    width: 50%;
    height: 500px; /* Match height of form panel */
    padding-top: 50px;
    padding-bottom: 50px;
    margin-left: 0; /* Override mx-auto */
    margin-right: 0; /* Override mx-auto */
  }
  .login-message-large {
    display: flex; /* Show large login message */
  }
  .sign-text-small {
    display: none; /* Hide small login message */
  }
  .auth-form-panel {
    width: 50%;
    padding-top: 40px;
    padding-bottom: 40px;
    height: 500px; /* Match height of info panel */
    margin-top: 0; /* Remove top margin */
  }
  .login-title-large {
    display: block; /* Show large login title */
  }
  .password-group {
    margin-top: 1.5rem; /* Ensure consistent spacing */
  }
}

/* Max-width media queries (for specific adjustments on smaller screens) */
@media (max-width: 767.98px) {
  /* Applies below 768px (effectively for mobile/small tablets) */
  .auth-form-wrapper {
    border-radius: 0;
    border-bottom-left-radius: 0;
  }
}

/* Profile Navbar here */
.mobile-header {
      display: none;
      background: var(--bg);
      padding: 15px;
      width: 100%;
      z-index: 1000;
}
.navbar-brand-mobile img {
      height: 40px;
      width: auto;
}
#mobile-menu-toggle {
      background: var(--bg_sec);
      border: none;
      border-radius: 2px;
      cursor: pointer;
      transition: all 0.3s ease;
      color: var(--white);
      display: flex;
      align-items: center;
      justify-content: center;
}
#mobile-menu-toggle:hover {
      background: var(--dark_green);
      color: var(--bg_sec);
}

/* --- Sidebar Styles --- */
#sidebar {
      width: 250px;
      position: fixed;
      top: 0;
      left: 0;
      height: 100vh;
      z-index: 1002;
      background: var(--bg);
      color: var(--white);
      transform: translateX(0);
      transition: transform 0.3s ease-in-out;
      display: flex;
      flex-flow: column;
      gap: 10px;
}
@media (max-width: 800px) {
      #sidebar {
            transform: translateX(-100%);
            box-shadow: 0 0 15px var(--black);
      }
      #sidebar.active {
            transform: translateX(0);
      }
}
#sidebar .sidebar-header {
      padding: 10px;
      border-bottom: 1px solid var(--dark_green);
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      position: relative;
}
#sidebar .sidebar-header .navbar-brand {
      margin: 0;
      flex-grow: 1;
      display: flex;
      align-items: center;
}
#sidebar .sidebar-header .navbar-brand img {
      max-width: 150px;
      height: auto;
      display: block;
}
#sidebar .sidebar-content-wrapper {
      display: flex;
      flex-flow: column;
      justify-content: space-between;
      flex-grow: 1;
      padding-bottom: 20px;
}
#sidebar ul.components {
      padding: 20px 0;
      list-style: none;
      margin: 0;
}
#sidebar ul li a {
      padding: 15px 20px;
      display: flex;
      align-items: center;
      color: var(--text-light);
      border-left: 3px solid transparent;
      transition: all 0.2s ease;
      text-decoration: none;
}
#sidebar ul li a:hover {
      color: var(--bg);
      background-color: var(--light_bg);
      width: 100%;
}
#sidebar ul li.active > a {
      color: var(--bg_sec);
      font-weight: 600;
      border-left: 3px solid var(--bg_sec);
      width: 100%;
}
#sidebar ul li a i {
      margin-right: 10px;
      width: 20px;
      text-align: center;
}
#sidebar ul li.settings-item {
      border-top: 1px solid var(--white);
}
#content {
      display: flex;
      flex-grow: 1;
      padding: 30px 10px 100px 10px;
      transition: margin-left 0.3s ease-in-out;
      flex-flow: column;
      gap: 20px !important;
}
@media (min-width: 800px) {
      #content {
            margin-left: 250px;
            padding: 30px 10px 100px 30px;
      }
}


/* MODIFIED: Media query for mobile layout */
@media (max-width: 800px) {
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* MODIFIED: Adjust content padding for the new fixed header */
  /* #content {
    margin-left: 20px;
    width: 100%;
  } */

  /* Show the close button only when sidebar is active on mobile */
  #sidebar.active #sidebar-close-button {
    display: block;
    border: 1px solid white;
  }
}
@media screen and (min-width : 800px) {
      #sidebar.active #sidebar-close-button {
            display: none !important;
      }
}

/* --- Sidebar Close Button (inside sidebar, mobile only) --- */
#sidebar-close-button {
  display: none !important;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5em;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
  transition: transform 0.2s ease;
  position: absolute;
  top: 15px;
  right: 15px;
}

#sidebar-close-button:hover {
  transform: scale(1.1);
}

/* --- Overlay for Mobile Sidebar --- */
.overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: var(--shadow-color);
      z-index: 1001;
      opacity: 0;
      transition: opacity 0.3s ease-in-out;
}
.overlay.active {
      display: block;
      opacity: 1;
}

/* --- Logout Modal Styles --- */
.modal {
      display: none;
      position: fixed;
      z-index: 1200;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0, 0, 0, 0.4);
      justify-content: center;
      align-items: center;
}
.modal.active {
      display: flex;
}
.modal-content {
      background-color: var(--bg);
      padding: 30px;
      border-radius: 10px !important;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
      width: 400px;
      text-align: center;
      animation: fadeIn 0.3s ease-out;
}
.modal-title {
      color: var(--white);
}
.modal-content p {
      margin-bottom: 25px;
      color: var(--white);
      line-height: 1.5;
}
.modal-footer {
      display: flex;
      flex-flow: row;
      gap: 10px;
      padding: 15px 0 0 0 !important;
}
.modal-footer button{
      width: calc(50% - 10px) !important;
}


/* Keyframe animation for modal */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Fade-in feedback message */
.feedback-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.3s ease-in-out;
}

.feedback-message.success {
  background-color: #d1f7d6;
  color: #166534;
}

.feedback-message.error {
  background-color: #ffe0e0;
  color: #991b1b;
}

/* Input focus animation */
.custom-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
  transition: box-shadow 0.2s, border-color 0.2s;
}


@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Shake animation on error */
.shake {
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(6px);
  }
  75% {
    transform: translateX(-4px);
  }
}
