/**
 * @file
 * Additional CSS overrides for Gin Login module
 * Theme: NER Databank
 * 
 * This file provides an alternative approach by targeting existing Gin Login elements
 * Works even if template override doesn't apply
 */

/* ============================================
   GIN LOGIN - MAKE LINKS HORIZONTAL
   Target the existing Gin Login footer links
   ============================================ */

/* Target the secondary local tasks block (contains Create account button) */
#block-gin-secondary-local-tasks,
.user-form-page #block-gin-secondary-local-tasks {
  display: inline-block !important;
  margin: 0 !important;
  width: auto !important;
}

/* Target the item list that contains links */
.user-form-page .item-list,
.user-form-page ul.links {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Make the list horizontal */
.user-form-page ul.links.list-inline {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  margin-top: 1.5rem !important;
  padding-top: 1.5rem !important;
  border-top: 1px solid #e0e0e0 !important;
  gap: 1rem !important;
}

/* Individual list items - horizontal layout */
.user-form-page ul.links.list-inline li {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Create account button/link styling */
.user-form-page ul.links.list-inline li:first-child {
  margin-right: auto !important;
}

/* Forgot password link styling */
.user-form-page ul.links.list-inline li:last-child {
  margin-left: auto !important;
}

/* Link/Button styling within the list */
.user-form-page ul.links a,
.user-form-page ul.links button {
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  padding: 0.5rem 0 !important;
  display: inline-block !important;
  transition: all 0.3s ease !important;
  border: none !important;
  background: transparent !important;
}

/* Create new account styling */
.user-form-page ul.links li:first-child a,
.user-form-page ul.links li:first-child button {
  color: #333 !important;
  border-bottom: 2px solid transparent !important;
}

.user-form-page ul.links li:first-child a:hover,
.user-form-page ul.links li:first-child button:hover {
  color: #0066cc !important;
  border-bottom-color: #0066cc !important;
}

/* Forgot password styling */
.user-form-page ul.links li:last-child a,
.user-form-page ul.links li:last-child button {
  color: #0066cc !important;
  border-bottom: 2px solid transparent !important;
}

.user-form-page ul.links li:last-child a:hover,
.user-form-page ul.links li:last-child button:hover {
  color: #0052a3 !important;
  border-bottom-color: #0052a3 !important;
}

/* If Create account appears as a button */
.user-form-page .button--secondary {
  background-color: transparent !important;
  border: none !important;
  padding: 0.5rem 0 !important;
  color: #333 !important;
  box-shadow: none !important;
}

.user-form-page .button--secondary:hover {
  background-color: transparent !important;
  color: #0066cc !important;
  box-shadow: none !important;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
  .user-form-page ul.links.list-inline {
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
  }
  
  .user-form-page ul.links a,
  .user-form-page ul.links button {
    font-size: 0.875rem !important;
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .user-form-page ul.links.list-inline {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
  
  .user-form-page ul.links.list-inline li:first-child,
  .user-form-page ul.links.list-inline li:last-child {
    margin: 0 !important;
  }
}

/* ============================================
   ENSURE LINKS ARE VISIBLE
   ============================================ */
.user-form-page ul.links.list-inline,
.user-form-page .item-list.links,
.user-form-page #block-gin-secondary-local-tasks {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}


/* Step 1: Create horizontal container for footer area */
.user-form-page .page-content {
  position: relative;
}

/* Step 2: Style the "Create new account" button to be inline */
.user-form-page a[href="/user/register"],
.user-form-page a[href*="/user/register"] {
  display: inline-block !important;
  width: auto !important;
  float: left !important;
  margin-top: 1.5rem !important;
  padding: 0.625rem 1.25rem !important;
  background-color: #e5e7eb !important;
  color: #333 !important;
  text-decoration: none !important;
  border-radius: 0.375rem !important;
  font-weight: 600 !important;
  border: none !important;
  transition: all 0.3s ease !important;
}

.user-form-page a[href="/user/register"]:hover {
  background-color: #d1d5db !important;
  color: #0066cc !important;
}

/* Step 3: Style the "Forgot your password?" link to be inline on same line */
.user-form-page a[href="/user/password"],
.user-form-page a[href*="/user/password"] {
  display: inline-block !important;
  float: right !important;
  margin-top: 1.5rem !important;
  padding: 0.625rem 0 !important;
  color: #0066cc !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  border-bottom: 2px solid transparent !important;
  transition: all 0.3s ease !important;
}

.user-form-page a[href="/user/password"]:hover {
  color: #0052a3 !important;
  border-bottom-color: #0052a3 !important;
}

/* Step 4: Add separator line above both links */
.user-form-page a[href*="/user/register"]::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: -0.75rem !important;
  height: 1px !important;
  background-color: #e0e0e0 !important;
}

/* Step 5: Clear floats */
.user-form-page .page-content::after {
  content: "" !important;
  display: table !important;
  clear: both !important;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 576px) {
  .user-form-page a[href*="/user/register"],
  .user-form-page a[href*="/user/password"] {
    font-size: 0.875rem !important;
    padding: 0.5rem 1rem !important;
  }
}

@media (max-width: 380px) {
  /* Stack vertically on very small screens */
  .user-form-page a[href*="/user/register"],
  .user-form-page a[href*="/user/password"] {
    float: none !important;
    display: block !important;
    margin-bottom: 0.75rem !important;
  }
}
