/* ------------------ GLOBAL STYLES ------------------ */

/* Importing the Poppins font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Reset margin and padding, set box sizing and base font */
*{  
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Body background styling with fixed full-page image */
body{
    background: black;
}

/* ------------------ WRAPPER STYLES ------------------ */

/* Centers the entire content with a semi-transparent background overlay */
.wrapper{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 110vh;
    background: rgba(39, 39, 39, 0.4);
}

/* Custom Scroll Bar CSS */
::-webkit-scrollbar{
    width: 10px;
}

::-webkit-scrollbar-track{
    background: white;
}

::-webkit-scrollbar-thumb{
    background: #91908b;
    border-radius: 12px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover{
    background: #91908b;
} 

/* Add scrollbar buttons (up/down arrows) */
::-webkit-scrollbar-button {
    height: 16px;   /* Increased from 16px */
    width: 20px;    /* Increased from 10px */
    background: white;
    border: none;
}

/* Up arrow (top button) */
::-webkit-scrollbar-button:single-button:vertical:decrement {
    background: white url('data:image/svg+xml;utf8,<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><polygon points="12,6 20,18 4,18" fill="%2391908b"/></svg>') no-repeat center;
}

/* Down arrow (bottom button) */
::-webkit-scrollbar-button:single-button:vertical:increment {
    background: white url('data:image/svg+xml;utf8,<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><polygon points="4,6 20,6 12,18" fill="%2391908b"/></svg>') no-repeat center;
}

/* ------------------ NAVIGATION BAR ------------------ */

/* Styles the navigation bar: fixed at top, spaced elements */
.nav{
    position: fixed;
    top: 0;
    display: flex;
    justify-content: space-around;
    width: 100%;
    height: 100px;
    line-height: 100px;
    background: linear-gradient(rgba(39,39,39, 0.6), transparent);
    z-index: 100;
}

/* Logo styling (left side of navbar) */
.nav-logo p{
    color: white;
    font-size: 25px;
    font-weight: 600;
}

/* Navigation menu (ul container) */
.nav-menu ul{
    display: flex;
}

/* Individual nav items */
.nav-menu ul li{
    list-style-type: none;
}

/* Links inside nav items */
.nav-menu ul li .link{
    text-decoration: none;
    font-weight: 500;
    color: #fff;
    padding-bottom: 15px;
    margin: 0 25px;
}

/* Underline effect on hover or active nav item */
.link:hover, .active{
    border-bottom: 2px solid #fff;
}

/* ------------------ NAV BUTTONS ------------------ */

/* Base style for "Sign In" and "Sign Up" buttons */
.nav-button .btn{
    width: 130px;
    height: 40px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: .3s ease;
}

/* Hover effect for nav buttons */
.btn:hover{
    background: rgba(255, 255, 255, 0.3);
}

/* Add spacing between buttons */
#registerBtn{
    margin-left: 15px;
}

/* White background button variant */
.btn.white-btn{
    background: rgba(255, 255, 255, 0.7);
}

/* Hover effect for white button */
.btn.btn.white-btn:hover{
    background: rgba(255, 255, 255, 0.5);
}

/* Menu button (hamburger icon) hidden by default */
.nav-menu-btn{
    display: none;
}

/* ------------------ FORM CONTAINER ------------------ */

/* Holds both login and register forms side-by-side */
.form-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 512px;
  min-height: 575px;
  overflow: hidden;
  z-index: 2;
  flex-direction: column; /* add this */
  border: none;
}

/* ------------------ LOGIN FORM & REGISTER FORM ------------------ */

/* ------------------ LOGIN FORM ------------------ */
.login-container {
  display: none;
  width: 100%;
  flex-direction: column;
  border: none;
}

/* ------------------ REGISTER FORM ------------------ */
.register-container {
  display: none;
  width: 100%;
  flex-direction: column;
  border: none;
}

/* Show the active form */
.login-container.active,
.register-container.active {
  display: flex;
}


/* ------------------ SHARED FORM CONTENT ------------------ */

/* Text link above form prompting switch to login/register */
.top span{
    color: #fff;
    font-size: small;
    padding: 10px 0;
    display: flex;
    justify-content: center;
}

/* Link inside the switch message */
.top span a{
    font-weight: 500;
    color: #fff;
    margin-left: 5px;
}

/* Main form title */
header{
    color: #fff;
    font-size: 30px;
    text-align: center;
    padding: 10px 0 30px 0;
}

/* Container for first and last name fields (register only) */
.two-forms{
    display: flex;
    gap: 10px;
}

/* General input field styling */
.input-field{
    font-size: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    height: 50px;
    width: 100%;
    padding: 0 10px 0 45px;
    border: none;
    border-radius: 30px;
    outline: none;
    transition: .2s ease;
}

/* Input hover and focus effect */
.input-field:hover, .input-field:focus{
    background: rgba(255, 255, 255, 0.25);
}

/* Placeholder text color */
::-webkit-input-placeholder{
    color: #fff;
}

/* Icons inside input boxes */
.input-box i{
    position: relative;
    top: -35px;
    left: 17px;
    color: #fff;
}

/* ------------------ SELECT DROPDOWN STYLING ------------------ */

/* Dropdown styling for role selection (login form) */
.input-box select.input-field {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 15px;
    height: 50px;
    width: 100%;
    padding: 0 10px 0 45px;
    border: none;
    border-radius: 30px;
    outline: none;
    transition: .2s ease;
    cursor: pointer;
}

/* Hover and focus effect for select box */
.input-box select.input-field:focus,
.input-box select.input-field:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Options inside the select box */
.input-box select.input-field option {
    background-color: rgba(255, 255, 255, 0.2);
    color: #000; /* You can change to #fff if needed */
    font-weight: 500;
}

/* Disabled option style */
.input-box select.input-field option[disabled] {
    color: #ccc;
    border: none;
}

/* ------------------ SUBMIT BUTTON ------------------ */

/* Style for form submit buttons */
.submit{
    font-size: 15px;
    font-weight: 500;
    color: black;
    height: 45px;
    width: 100%;
    border: none;
    border-radius: 30px;
    outline: none;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: .3s ease-in-out;
}

/* Hover effect for submit button */
.submit:hover{
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 1px 5px 7px 1px rgba(0, 0, 0, 0.2);
}

/* ------------------ REMEMBER ME / LINKS ------------------ */

/* Container for remember me and terms links */
.two-col{
    display: flex;
    justify-content: space-between;
    color: #fff;
    font-size: small;
    margin-top: 10px;
}

/* Style for remember me checkbox section */
.two-col .one{
    display: flex;
    gap: 5px;
}

/* Style for "Forgot password" / "Terms & conditions" links */
.two label a{
    text-decoration: none;
    color: #fff;
}

/* Hover effect for links */
.two label a:hover{
    text-decoration: underline;
}

/* ------------------ RESPONSIVE STYLING ------------------ */

/* Profile button styles for Desktop */
.profile-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    margin-left: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.profile-btn i {
    font-size: 25px !important; 
}

.profile-btn:hover {
    background-color: rgba(255, 72, 0);
}

/* Styles for screens smaller than 824px (tablets) */
@media only screen and (max-width: 904px){
    /* .nav-menu.responsive{
        top: 100px;
    } */
    .nav-menu {
        display: none !important;
        position: static !important;
        height: auto !important;
        width: auto !important;
        background: none !important;
        backdrop-filter: none !important;
        top: auto !important;
        left: auto !important;
        transition: none !important;
    }
    .nav-menu ul{
        flex-direction: column;
        text-align: center;
    }
    .nav-menu-btn{
        display: block;
    }
    .nav-menu-btn i{
        font-size: 25px;
        color: #fff;
        padding: 10px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        cursor: pointer;
        transition: .3s;
    }
    .nav-menu-btn i:hover{
        background: rgba(255, 255, 255, 0.15);
    }
    
}

/* Styles for very small screens (phones) */
@media only screen and (max-width: 904px) {
    .wrapper{
        min-height: 100vh;
    }
    .form-box{
        width: 100%;
        min-height: 500px;
        height: auto;
        overflow-y: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .register-container, .login-container{
        width: 450px; 
        max-width: 95vw;
        padding: 0 20px;
    }
    .register-container .two-forms{
        flex-direction: column;
        gap: 0;
    }
}

/* New media query for screens smaller than 924px */
@media (max-width: 904px) {
  .nav {
    justify-content: center;
    align-items: center;
    position: fixed;
    width: 100%;
    height: 100px;
    line-height: 100px;
    background: linear-gradient(rgba(39,39,39, 0.6), transparent);
    z-index: 100;
  }
  .nav-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: auto;
    z-index: 2;
  }
  .nav-menu-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    height: 100px;
    z-index: 3;
  }
  .nav-button {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex !important;
    align-items: center;
    z-index: 3;
  }
  .nav-profile-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    height: 100px;
    z-index: 3;
  }
  #profileSidebar.sidebar {
    width: 80vw;
    min-width: 260px;
    max-width: 275px;
    right: 0;
    left: auto;
    display: none; /* default, JS will set to block */
    z-index: 9999;
  }
  .profile-btn {
      background: rgba(255, 255, 255, 0.2);
      color: white;
      border: none;
      cursor: pointer;
      padding: 10px;
      margin-left: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      transition: 0.3s;
      width: 44px;
      height: 44px;
   }

   .profile-btn i {
      font-size: 25px;
      color: white;
      pointer-events: none;
    }

    .profile-btn:hover {
      background: rgba(255, 255, 255, 0.15);
    }

   /* Always allow JS to show the sidebar on any screen size */
    #profileSidebar[style*="display: block"], .sidebar[style*="display: block"] {
      display: block !important;
      z-index: 9999 !important;
    }

}

.sidebar-separator {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #343a40 0%, #ff4800 100%);
    border-radius: 2px;
    margin: 12px auto 18px auto;
    opacity: 0.5;
}


.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 275px;
    height: 100%;
    background-color: #343a40;
    box-shadow: -10px 0 20px #24282c;
    padding-top: 1rem;
    display: none;
    z-index: 999;
    transition: all 0.3s ease-in-out;
}

.sidebar a {
    padding: 10px 20px;
    color: white;
    display: block;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.sidebar a:hover {
    background-color: rgba(255, 60, 0, 0.574);
    color: white;
    /* background-color: #ff4800;  */
    
}

.sidebar-link-margin {
    margin-top: 0.6rem !important;
}

.sidebar a:first-child {
    margin-top: 0.6rem !important;
}

.close-btn {
    background-color: #ff4800;
    color: white;
    position: absolute;
    top: 1rem;
    right: 10px;
    padding: 2.5px 5px;
    border-radius: 50px;
    border: none;
}

 #userRole {
    color: white;
    padding-left: 20px;
    padding-bottom: 10px;
    padding-top: 5px;
}

.user-name {
    color: #ff4800;
    font-weight: bold;
    font-size: 18px;
}

.close-btn:hover {
    background-color: #e03e00;
}

#menuSidebar {
  left: 0;
  right: auto;
  box-shadow: 10px 0 20px #24282c;
}
#profileSidebar {
  right: 0;
  left: auto;
  box-shadow: -10px 0 20px #24282c;
}

.nav-logo {
  display: flex;
  align-items: center;
  margin-top: 12px;
}

.nav-logo a {
    display: flex;
    align-items: center;
    height: 100px; /* match .nav-logo img height */
}

.nav-logo img {
    height: 100px;
    width: 100px;
    filter: drop-shadow(2px 2px .25px rgba(0,0,0,1));
    transition: height 0.3s, width 0.3s, margin-top 0.3s;
}

/* Mobile view: shrink logo and add more top margin */
@media (max-width: 600px) {
    .nav-logo {
    margin-top: 4px; /* bring logo further down on mobile */
    }
    .nav-logo img {
    height: 75px;
    width: 75px;
    margin-top: 0;
    }
}

.sidebar-separator {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #343a40 0%, #ff4800 100%);
    border-radius: 2px;
    margin: 12px auto 18px auto;
    opacity: 0.5;
}

.menu-separator {
    margin-top: 24px !important; /* moves separator further down */
    background: linear-gradient(to right, #ff4800 0%, #343a40 100%);
}

.hidden-separator {
    display: none !important;
}

.profile-separator {
    margin-top: 5px !important;
    display: block !important;
}

.welcome-text {
    margin-top: -34px;
    padding: 20px 20px;
    font-size: 18px;
    color: white;
    font-weight: bold;
    margin-left: 5px;
}

.popup-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #343a40;
  color: white;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
  z-index: 9999;
  font-size: 18px;
  text-align: center;
  max-width: 400px;
}
.popup-modal .icon {
  font-size: 2rem;
  margin-right: 8px;
  color: #ffa162;
  vertical-align: middle;
}
.popup-modal button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #ff4800;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}
@media (max-width: 600px) {
  .popup-modal {
    width: 95vw;
    max-width: 700px;
    min-width: 0;
    height: auto;
    padding: 40px 16px;
    border-radius: 8px;
    box-shadow: 0 5px 15px black;
    background: #343a40;
    color: white;
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0 auto;
  }
  .popup-modal .icon {
    font-size: 2rem;
    margin-bottom: 18px;
    display: block;
  }
}

/* Footer base styles */
.site-footer {
  padding: 40px 20px;
  color: #fff; /* or whatever your text color is */
  font-size: 0.95rem;
  background: #343a40;
  border-top: 1px solid rgba(255,255,255,0.3);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/* Center links */
.footer-links a {
  color: inherit;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease; 
}
.footer-links a:hover {
  color: #ff4800; /* use your accent/hover color */
}

/* Social icons styling */
.footer-social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 50%;
  color: inherit;
  font-size: 1.2rem;
  transition: border-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
}

.footer-social a:hover {
  border-color: #ff4800;
  color: #ff4800;
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    margin: 15px 0;
  }
}

/* Override ONLY for the eye icon */
.input-box .toggle-password {
    position: relative !important;
    top: -36px;
    padding-right: 466px; 
    transform: translateX(90%);
    cursor: pointer !important;
    font-size: 1.4rem !important;
    color: #fff !important; /* blue */
    transition: color 0.2s ease, opacity 0.2s ease;
    z-index: 8 !important;
    visibility: hidden;  
    opacity: 0;          
}

/* Highlight when password is visible */
.input-box .toggle-password:hover {
    color: #ff4800 !important;
}

.input-box .toggle-password,
.input-box .toggle-password:active,
.input-box .toggle-password:focus,
.input-box .toggle-password:hover {
    text-decoration: none !important;
    outline: none !important;
    border: none !important;
}

@media (max-width: 904px) {
  .input-box .toggle-password {
    /* Adjust these values for mobile layout */
    padding-right: 580px;     /* less padding for narrower input */
    top: -60px;               /* tweak vertical alignment */
    transform: translateX(60%); /* less horizontal shift */
    font-size: 1.2rem !important;
    visibility: visible;      /* show for demo, JS can control */
    opacity: 1;
  }
}

@media (max-width: 500px) {
  .input-box .toggle-password {
    /* Padding decreases as viewport shrinks, but never below 200px */
    padding-right: 110rem;
    transform: translateX(20%);
  }
}

@media (max-width: 450px) {
  .input-box .toggle-password {
    /* Padding decreases as viewport shrinks, but never below 200px */
    padding-right: 95rem;
  }
}
@media (max-width: 400px) {
  .input-box .toggle-password {
    /* Padding decreases as viewport shrinks, but never below 200px */
    padding-right: 85rem;
  }
}

@media (max-width: 375px) {
  .input-box .toggle-password {
    /* Padding decreases as viewport shrinks, but never below 200px */
    padding-right: 75rem;
  }
}

@media (max-width: 300px) {
  .input-box .toggle-password {
    /* Padding decreases as viewport shrinks, but never below 200px */
    padding-right: 60rem;
  }
}

@media (max-width: 200px) {
  .input-box .toggle-password {
    /* Padding decreases as viewport shrinks, but never below 200px */
    padding-right: 40rem;
  }
}
