/* Basic reset to ensure all elements behave the same */
* {
  box-sizing: border-box;
}

/* Body styles */
body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background: #fff;
  color: #000;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

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

/* Container for login form */
.login-wrapper {
  max-width: 290px;
  width: 100%;
  text-align: center;
}

/* Logo image styles */
.main-logo {
  width: 310px;
  margin-top: 100px;
  margin-bottom: 50px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  transform: translateX(-5px);
}

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

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

/* Wrapper around each input field */
.input-field {
  position: relative;
  margin-bottom: 30px;
}

/* Style inputs */
.input-field input {
  width: 100%;
  padding: 10px 12px 10px 35px;
  font-size: 14px;
  border: 2px solid #ccc;
  border-radius: 4px;
}

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

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

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

/* Submit button styles */
.login-btn {
  background-color: #007cba;
  color: white;
  padding: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid #616060;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

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

/* 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;
}

/* 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;
}

.or-separator::before,
.or-separator::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #ccc;
}

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

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

/* Circle containing "OR" */
.or-circle {
  display: inline-block;
  background: #fff;
  padding: 6px 14px;
  border: 1px solid #ccc;
  border-radius: 50%;
  font-size: 12px;
  color: #666;
  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;
  background-color: #ff6c2c;
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  font-weight: bold;
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
  justify-content: center;
}

/* 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;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 37px;
  font-size: 13px;
  padding: 0;
  margin: 0;
  white-space: nowrap;
}

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

/* Footer at bottom of page */
.footer {
  text-align: center;
  font-size: 12px;
  color: #888;
  margin-top: auto;
  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;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  user-select: none;
  width: 340px;
  max-width: 90vw;
  margin: 20px auto -120px auto;
  z-index: 10;
  position: relative;
}

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

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

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

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

/* ---------------- MOBILE RESPONSIVE FIXES ---------------- */
@media screen and (max-width: 480px) {
  .main-logo {
    width: 80%;
    margin-top: 50px;
    margin-bottom: 30px;
    transform: none;
  }

  .login-wrapper {
    max-width: 90%;
    padding: 0 10px;
  }

  .login-content {
    padding: 20px 10px;
  }

  .external-auth-link {
    flex-direction: column;
    text-align: center;
    padding: 12px 10px;
  }

  .language-list {
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
  }

  .alert-box {
    width: 90%;
    margin: 20px auto;
    font-size: 12px;
  }

  .footer {
    font-size: 11px;
    padding: 10px;
  }

  .footer .cpanel-logo {
    width: 24px;
  }
}
