/**
 * @file
 * CSS for the User Authentication Block.
 */

/* User Authentication Block Styles */
.user-auth-block {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* User Menu Container */
.user-menu-container {
  position: relative;
  display: inline-block;
}

/* User Avatar Circle */
.user-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 10;
}

.user-avatar-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* User Menu Dropdown */
.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.user-menu-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.user-menu-item:last-child {
  border-bottom: none;
}

.user-menu-item:hover {
  background: #f5f5f5;
  color: #667eea;
}

.user-menu-icon {
  font-size: 18px;
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.user-menu-text {
  font-size: 14px;
  font-weight: 500;
}

.user-initial {
  color: white;
  font-weight: bold;
  font-size: 16px;
  text-transform: uppercase;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Authentication Buttons */
.auth-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.auth-buttons .btn {
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 2px solid;
  display: inline-block;
  cursor: pointer;
}

.btn-login {
  background: transparent;
  color: #667eea;
  border-color: #667eea;
}

.btn-login:hover {
  background: #667eea;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-register {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.btn-register:hover {
  background: #5a67d8;
  border-color: #5a67d8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .auth-buttons .btn {
    width: 100%;
    text-align: center;
    padding: 10px 20px;
  }

  .user-avatar-circle {
    width: 35px;
    height: 35px;
  }

  .user-initial {
    font-size: 14px;
  }

  .user-menu-dropdown {
    min-width: 160px;
    right: 0;
  }

  .user-menu-item {
    padding: 10px 14px;
  }
}

/* Hide tabs on user forms */
.tabs {
  display: none;
}

/* User Forms Width - Desktop Only */
@media (min-width: 769px) {
  /* Login Form */
  .user-login-form,
  form[data-drupal-selector="user-login-form"],
  form.user-login-form {
    max-width: 50%;
    width: 50%;
    margin-left: auto;
    margin-right: auto;
    padding: 30px;
    background-color: #f1f1f3;
    border-radius: 9px;
  }

  /* Register Form */
  .user-register-form,
  form[data-drupal-selector="user-register-form"],
  form.user-register-form {
    max-width: 50%;
    width: 50%;
    margin-left: auto;
    margin-right: auto;
    padding: 30px;
    background-color: #f1f1f3;
    border-radius: 9px;
  }

  /* Forgot Password Form */
  .user-pass,
  form[data-drupal-selector="user-pass"],
  form.user-pass-form {
    max-width: 50%;
    width: 50%;
    margin-left: auto;
    margin-right: auto;
    padding: 30px;
    background-color: #f1f1f3;
    border-radius: 9px;
  }

  /* Ensure form elements don't overflow */
  .user-login-form .form-wrapper,
  .user-register-form .form-wrapper,
  .user-pass-form .form-wrapper,
  .user-login-form .form-item,
  .user-register-form .form-item,
  .user-pass .form-item {
    max-width: 100%;
  }
}