/* Basic reset to ensure all elements behave the same */
* {
  box-sizing: border-box; /* Makes width and height include padding and border */
}

/* Body styles */
body {
  margin: 0; /* Remove default margin */
  font-family: 'Open Sans', sans-serif; /* Set font */
  background: #fff; /* White background */
  color: #000; /* Black text */
  display: flex; /* Use flexbox for layout */
  flex-direction: column; /* Stack children vertically */
  min-height: 100vh; /* Full viewport height */
}

/* Main page wrapper */
.login-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Ensure full height */
}

/* Content area that grows to fill vertical space */
.login-content {
  flex: 1; /* Take up remaining vertical space */
  display: flex;
  flex-direction: column;
  align-items: center; /* Center items horizontally */
  padding: 40px 20px; /* Space around content */
}

/* Container for login form */
.login-wrapper {
  max-width: 290px; /* Max width */
  width: 100%; /* Full width within parent */
  text-align: center; /* Center text inside */
}

/* Logo image styles */
.main-logo {
  width: 310px; /* Fixed width */
  margin-top: 100px; /* Space above logo */
  margin-bottom: 50px; /* Space below logo */
  display: block; /* Makes margin auto work */
  margin-left: auto; /* Center horizontally */
  margin-right: auto;
  transform: translateX(-5px); /* Shift logo slightly left */
}

/* Form styling */
form {
  text-align: left;
  display: flex;
  flex-direction: column; /* Stack inputs vertically */
}

/* Labels for inputs */
label {
  font-weight: 500; /* Medium weight font */
  font-size: 14px;
  color: #090909; /* Dark text */
  margin-bottom: 8px; /* Space below label */
}

/* Wrapper around each input field */
.input-field {
  position: relative; /* Needed for icon positioning */
  margin-bottom: 30px; /* Space between fields */
}

/* Style inputs */
.input-field input {
  width: 100%; /* Full width */
  padding: 10px 12px 10px 35px; /* Padding with space for icon */
  font-size: 14px;
  border: 2px solid #ccc; /* Gray border */
  border-radius: 4px; /* Rounded corners */
}

/* Icons inside inputs (before pseudo element) */
.icon-input::before {
  content: '';
  position: absolute;
  left: 10px; /* Position left inside input */
  top: 50%; /* Center vertically */
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.6; /* Slightly transparent */
}

/* User icon background */
.user-icon::before {
  background-image: url('/orangeweb/icons/icons8-user-100.png');
}

/* Lock icon background */
.lock-icon::before {
  background-image: url('/orangeweb/icons/lockmajor-svgrepo-com.svg');
}

/* Submit button styles */
.login-btn {
  background-color: #007cba; /* Blue background */
  color: white;
  padding: 10px;
  font-weight: 600; /* Semi-bold */
  font-size: 14px;
  border: 1px solid #616060; /* Dark gray border */
  border-radius: 4px; /* Rounded corners */
  cursor: pointer; /* Pointer cursor on hover */
  transition: background-color 0.3s; /* Smooth hover effect */
}

/* Hover effect on button */
.login-btn:hover {
  background-color: #005f8d; /* Darker blue */
}

/* Reset password link container */
.reset-link {
  text-align: center;
  margin-top: 30px;
  font-size: 13px;
}

/* Reset password link styling */
.reset-link a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease; /* Smooth color transition */
}

/* Hover on reset link */
.reset-link a:hover {
  color: red;
}

/* Separator line with "OR" text */
.or-separator {
  margin: 35px 0 20px;
  position: relative;
  text-align: center;
}

/* Lines on left and right of "OR" */
.or-separator::before,
.or-separator::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #ccc; /* Light gray line */
}

.or-separator::before {
  left: 0;
}

.or-separator::after {
  right: 0;
}

/* Circle containing "OR" */
.or-circle {
  display: inline-block;
  background: #fff; /* White background */
  padding: 6px 14px;
  border: 1px solid #ccc; /* Gray border */
  border-radius: 50%; /* Round circle */
  font-size: 12px;
  color: #666; /* Gray text */
  font-weight: 600;
}

/* External cPanel login button wrapper */
.external-auth {
  margin-top: 35px;
  margin-bottom: 30px;
}

/* External cPanel link styling */
.external-auth-link {
  display: inline-flex;
  align-items: center;
  gap: 10px; /* Space between icon and text */
  background-color: #ff6c2c; /* Orange background */
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  font-weight: bold;
  border-radius: 4px;
  font-size: 14px;
  width: 100%; /* Full width */
  justify-content: center; /* Center content */
}

/* Placeholder icon for cPanel */
.cpanel-icon-placeholder {
  width: 20px;
  height: 20px;
  background: url('https://i.ibb.co/PGQ2cw89/cp-W-removebg-preview.png') no-repeat center center;
  background-size: 200%;
}

/* Language selector bar container */
.language-bar {
  margin-top: 25px;
  margin-bottom: 20px;
}

/* Language list styling */
.language-list {
  list-style: none; /* Remove bullets */
  display: flex;
  flex-wrap: nowrap; /* No wrapping */
  justify-content: center; /* Center horizontally */
  gap: 37px; /* Space between items */
  font-size: 13px;
  padding: 0;
  margin: 0;
  white-space: nowrap; /* Prevent line breaks */
}

/* Language list links */
.language-list li a {
  color: #333; /* Dark gray */
  text-decoration: none;
  font-weight: 500;
}

/* Footer at bottom of page */
.footer {
  text-align: center;
  font-size: 12px;
  color: #888; /* Gray text */
  margin-top: auto; /* Push footer down */
  margin-bottom: 10px;
}

/* Footer logo */
.footer .cpanel-logo {
  width: 30px;
  margin-bottom: 5px;
}

/* Footer links */
.footer a {
  color: #888;
  text-decoration: none;
}

/* Footer link hover */
.footer a:hover {
  color: red;
}

/* Alert box styles for messages shown by JS */
.alert-box {
  color: #fff !important; /* White text forced */
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25); /* Shadow for depth */
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  user-select: none; /* Prevent text selection */

  width: 340px; /* Slightly wider than logo */
  max-width: 90vw; /* Responsive max width on small screens */
  
  margin: 20px auto -120px auto; /* Center horizontally, spacing above and negative below */
  
  z-index: 10;
  position: relative;
}

/* Background color for error alerts */
.alert-box.error {
  background-color: #d9534f; /* Red */
}

/* Background color for info alerts */
.alert-box.info {
  background-color: #5bc0de; /* Blue */
}

/* Icon container inside alert box */
.alert-box span:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; /* Set icon width */
  height: 30px; /* Set icon height */
  margin-right: 10px; /* Space between icon and text */
  flex-shrink: 0; /* Prevent shrinking */
}

/* Make SVG icon fill the container */
.alert-box span:first-child svg {
  width: 100%;
  height: 100%;
}
