/**
 * @file
 * NER Databank - Enhanced Header Styles
 * Desktop: Multi-level menu | Mobile: Top-level only
 */

/* ---------------------------
   CSS Variables
   --------------------------- */
:root {
  --primary-blue: #0d6efd;
  --primary-dark-blue: #0a58ca;
  --primary-yellow: #ffc107;
  --yellow-hover: #ffb300;
  --header-bg: #fff;
  --header-light-bg: #f5f5f5;
  --text-dark: #222;
  --text-medium: #666;
  --text-light: #999;
  --border-color: #e0e0e0;
  --hover-bg: #f5f8ff;
  --hover-bg-dark: #e8f0fe;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
  --transition: 0.3s ease;
}
 
/* ---------------------------
   BRANDING - Logo + Site Name
   --------------------------- */
.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 0.5rem 1rem;
  margin-right: 30px;
  transition: opacity var(--transition);
}

.navbar-brand:hover,
.navbar-brand:focus {
  opacity: 0.85;
  text-decoration: none;
}

.navbar-brand img {
  width: 50px;
  height: auto;
  margin-right: 20px;
  object-fit: contain;
}

.navbar-brand .site-name,
.navbar-brand .navbar-text {
  font-size: 1.5rem;
  text-transform: uppercase;
  font-weight: bold;
  color: var(--primary-blue);
  margin: 0;
  line-height: 1.2;
}

/* ---------------------------
   HEADER REGIONS
   --------------------------- */
#navbar-top {
  background-color: var(--primary-blue) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#navbar-main {
  background-color: var(--header-light-bg) !important;
  border-bottom: 3px solid var(--primary-blue);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1030;
}

/* ---------------------------
   DESKTOP NAVIGATION (≥992px)
   Multi-Level Dropdown Menu
   --------------------------- */
@media (min-width: 992px) {
  .navbar-collapse {
    display: flex !important;
    justify-content: flex-end;
  }
  
  /* Level 1 - Top Menu Items */
  .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  .navbar-nav > li {
    position: relative;
    margin: 0;
  }
  
  .navbar-nav > li > a {
    padding: 0.75rem 1.25rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--transition);
    border-bottom: 3px solid transparent;
    display: block;
    white-space: nowrap;
  }
  
  .navbar-nav > li > a:hover,
  .navbar-nav > li > a:focus {
    color: var(--primary-blue);
    background-color: var(--hover-bg);
    border-bottom-color: var(--primary-blue);
  }
  
  .navbar-nav > li.active > a,
  .navbar-nav > li.active-trail > a,
  .navbar-nav > li > a.active,
  .navbar-nav > li > a.is-active {
    color: var(--primary-blue);
    background-color: var(--hover-bg-dark);
    border-bottom-color: var(--primary-blue);
    font-weight: 600;
  }
  
  /* Icons in menu */
  .navbar-nav > li > a i,
  .navbar-nav > li > a .fa {
    margin-right: 0.5rem;
    font-size: 1.1rem;
  }
  
  /* Dropdown Arrow Indicator */
  .navbar-nav > li:has(ul) > a::after,
  .navbar-nav > li.dropdown > a::after {
    content: "\f107";
    font-family: "Font Awesome 6 Free", "FontAwesome";
    font-weight: 900;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    transition: transform var(--transition);
    display: inline-block;
  }
  
  .navbar-nav > li:hover > a::after {
    transform: rotate(180deg);
  }
  
  /* Level 2+ - Dropdown Menus */
  .navbar-nav ul,
  .navbar-nav li ul,
  .navbar-nav .dropdown-menu,
  ul.nav li.dropdown > ul.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 280px;
    padding: 0.5rem 0;
    margin: 0;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    list-style: none;
  }
  
  /* Show dropdown on hover */
  .navbar-nav > li:hover > ul,
  .navbar-nav > li:hover > .dropdown-menu,
  ul.nav li.dropdown:hover > ul.dropdown-menu {
    display: block;
    animation: fadeInDown 0.3s ease;
  }
  
  /* Dropdown Items */
  .navbar-nav ul li,
  .navbar-nav .dropdown-menu li {
    position: relative;
    width: 100%;
  }
  
  .navbar-nav ul li a,
  .navbar-nav .dropdown-menu li a,
  .dropdown-item a,
  .dropdown-item {
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  
  .navbar-nav ul li a:hover,
  .navbar-nav .dropdown-menu li a:hover,
  .dropdown-item:hover,
  .dropdown-item a:hover {
    background-color: var(--hover-bg);
    color: var(--primary-blue);
    border-left-color: var(--primary-blue);
    padding-left: 1.75rem;
  }
  
  /* Level 3+ - Nested Dropdowns */
  .navbar-nav ul li:has(ul) > a::after,
  .navbar-nav .dropdown-menu li:has(ul) > a::after {
    content: "\f105";
    font-family: "Font Awesome 6 Free", "FontAwesome";
    font-weight: 900;
    float: right;
    margin-left: 1rem;
    color: var(--text-medium);
  }
  
  .navbar-nav ul ul,
  .navbar-nav ul li ul {
    position: absolute;
    top: 0;
    left: 100%;
    margin-top: -0.5rem;
    margin-left: -2px;
  }
  
  .navbar-nav ul li:hover > ul {
    display: block;
  }
  
  /* TBM/Bootstrap Barrio specific classes */
  .tbm-link.level-1 {
    color: var(--text-dark);
    padding: 1rem 1.5rem;
    text-decoration: none;
    text-align: center;
  }
  
  .tbm-subnav {
    line-height: 1 !important;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .tbm-subnav a {
    text-decoration: none;
    color: inherit;
  }
  
  /* Login link special styling */
  .navbar-nav > li:last-child > a[href*="login"],
  .navbar-nav > li:last-child > a[href*="user"] {
    background-color: var(--primary-blue);
    color: #fff;
    border-radius: 6px;
    margin-left: 1rem;
    border-bottom: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
  }
  
  .navbar-nav > li:last-child > a[href*="login"]:hover,
  .navbar-nav > li:last-child > a[href*="user"]:hover {
    background-color: var(--primary-dark-blue);
    transform: translateY(-2px);
  }
}

/* ---------------------------
   MOBILE NAVIGATION (<992px)
   Top-Level Only
   --------------------------- */
@media (max-width: 991px) {
  /* Brand adjustments */
  .navbar-brand {
    padding: 0.5rem 0;
    margin-right: 0;
  }
  
  .navbar-brand .site-name,
  .navbar-brand .navbar-text {
    font-size: 1.25rem;
  }
  
  .navbar-brand img {
    width: 42px;
    margin-right: 12px;
  }
  
  /* Toggle button */
  .navbar-toggler {
    border: 2px solid var(--primary-blue);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
  }
  
  .navbar-toggler:hover,
  .navbar-toggler:focus {
    background-color: var(--primary-blue);
  }
  
  .navbar-toggler:hover .navbar-toggler-icon {
    filter: brightness(0) invert(1);
  }
  
  /* Collapse container */
  .navbar-collapse {
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    margin-top: 1rem;
  }
  
  /* Vertical list */
  .navbar-nav {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    margin: 0;
  }
  
  /* Top-level items only */
  .navbar-nav > li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }
  
  .navbar-nav > li:last-child {
    border-bottom: none;
  }
  
  .navbar-nav > li > a {
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.2s ease;
  }
  
  .navbar-nav > li > a:hover,
  .navbar-nav > li > a:focus {
    background-color: var(--hover-bg);
    color: var(--primary-blue);
    padding-left: 2rem;
  }
  
  .navbar-nav > li.active > a,
  .navbar-nav > li.active-trail > a {
    background-color: var(--hover-bg-dark);
    color: var(--primary-blue);
    border-left: 4px solid var(--primary-blue);
    font-weight: 600;
  }
  
  /* Icons */
  .navbar-nav > li > a i,
  .navbar-nav > li > a .fa {
    font-size: 1.3rem;
    width: 1.5rem;
    text-align: center;
  }
  
  /* CRITICAL: Hide ALL submenus on mobile */
  .navbar-nav ul,
  .navbar-nav li ul,
  .navbar-nav .dropdown-menu,
  .navbar-nav > li > ul,
  .navbar-nav > li ul li,
  ul.nav li.dropdown > ul.dropdown-menu,
  .tbm-subnav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
  
  /* Remove dropdown indicators on mobile */
  .navbar-nav li:has(ul) > a::after,
  .navbar-nav li > a::after {
    display: none !important;
  }
  
  /* Mobile login button */
  .navbar-nav > li:last-child > a[href*="login"],
  .navbar-nav > li:last-child > a[href*="user"] {
    background-color: var(--primary-blue);
    color: #fff;
    justify-content: center;
    font-weight: 600;
    margin: 0.5rem 1rem;
    border-radius: 6px;
  }
  
  .navbar-nav > li:last-child > a[href*="login"]:hover {
    background-color: var(--primary-dark-blue);
    padding-left: 1.5rem;
  }
}

/* ---------------------------
   SEARCH FORM
   --------------------------- */
#edit-submit {
  background-color: var(--primary-yellow) !important;
  border: none;
  display: inline-block;
  border-radius: 50px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

#edit-submit:hover {
  background-color: var(--yellow-hover) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Search block in top header */
#navbar-top .search-block-form,
#navbar-top .block-search {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

#navbar-top .search-block-form form {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ============================================
   OVERRIDE BOOTSTRAP BARRIO SEARCH SPACING
   ============================================ */

/* Target the region row class */
.region.region-top-header-form {
  padding: 0 !important;
  margin: 0 !important;
}

/* Target the search block */
#block-ner-databank-search-form-wide {
  padding: 0 !important;
  margin: 0 !important;
}

/* Target content containers */
.search-block-form .content.container-inline {
  padding: 0 !important;
  margin: 0 !important;
}

/* Target the form itself */
#search-block-form.search-form {
  padding: 0 !important;
  margin: 0 !important;
}

/* Target form items with mb-3 class (Bootstrap margin) */
.search-block-form .mb-3 {
  margin-bottom: 0 !important;
}

.search-block-form .form-item-keys {
  margin-bottom: 0 !important;
}

.search-block-form .form-actions {
  margin-bottom: 0 !important;
}

/* Ensure row class has no padding */
.row.region-top-header-form {
  padding-top: 0 !important;
  padding-bottom: 0.5rem !important;
}

/* Override any Bootstrap form-row spacing */
.form-row.search-block-form {
  margin: 0 !important;
}





#navbar-top #edit-keys,
#navbar-top input[type="search"] {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 50px 0 0 50px;
  font-size: 1rem;
  max-width: 600px;
}

#navbar-top #edit-submit {
  border-radius: 0 50px 50px 0;
}

/* ---------------------------
   MOBILE SEARCH
   --------------------------- */
@media (max-width: 991px) {
  #navbar-top {
    text-align: center;
  }
  
  #navbar-top .search-block-form {
    padding: 0.5rem 1rem;
  }
  
  #navbar-top #edit-keys {
    font-size: 0.9rem;
    padding: 0.625rem 1rem;
  }
  
  #navbar-top #edit-submit {
    font-size: 0.9rem;
    padding: 0.625rem 1.5rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand .site-name {
    font-size: 1.1rem;
  }
  
  .navbar-brand img {
    width: 38px;
  }
  
  #navbar-top #edit-keys {
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem;
  }
  
  #navbar-top #edit-submit {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
}

/* ---------------------------
   ANIMATIONS
   --------------------------- */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------
   ACCESSIBILITY
   --------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary-blue);
  color: #fff;
  padding: 1rem 1.5rem;
  text-decoration: none;
  z-index: 99999;
}

.skip-link:focus {
  left: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--primary-yellow);
  outline-offset: 2px;
}

/* ---------------------------
   PRINT
   --------------------------- */
@media print {
  #navbar-main,
  #navbar-top {
    position: static;
    box-shadow: none;
  }
  
  .navbar-nav ul,
  .navbar-collapse,
  #edit-submit {
    display: none !important;
  }
}

 

/* ============================================
   TOP BAR - Above Logo/Navigation
   ============================================ */

.region-top-bar {
  background-color: #ffffff;
  border-bottom: 2px solid #c41e3a; /* Red border like in image */
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.region-top-bar .block {
  margin: 0;
  padding: 0;
}

/* Top bar container layout */
.top-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Left side - Language/Info buttons */
.top-bar-left {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Right side - Social media icons */
.top-bar-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Language button styling */
.top-bar-language-btn {
  background-color: #0066cc;
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.top-bar-language-btn:hover {
  background-color: #0052a3;
  color: #ffffff;
}

/* Helpline styling */
.top-bar-helpline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #1074B2;
  font-weight: 600;
}

.top-bar-helpline i {
  font-size: 1rem;
}

/* Branch Network link */
.top-bar-link {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.top-bar-link:hover {
  color: #0066cc;
}

/* Social media icons */
.top-bar-social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.top-bar-social a {
  color: #333;
  font-size: 1.25rem;
  transition: color 0.3s ease;
}

.top-bar-social a:hover {
  color: #0066cc;
}

/* Facebook */
.top-bar-social a.facebook:hover {
  color: #1877f2;
}

/* Twitter */
.top-bar-social a.twitter:hover {
  color: #1da1f2;
}

/* LinkedIn */
.top-bar-social a.linkedin:hover {
  color: #0a66c2;
}

/* YouTube */
.top-bar-social a.youtube:hover {
  color: #ff0000;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .top-bar-container {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .top-bar-left,
  .top-bar-right {
    justify-content: center;
  }
}

/* ============================================
   BOOK PAYWALL STYLING
   NER Databank Content Protection
   ============================================ */

/* ========================================
   Summary/Preview Section
   ======================================== */

.book-summary {
  padding: 2rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-left: 5px solid #0d6efd;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.book-summary .summary-title {
  color: #0d6efd;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 2px solid #0d6efd;
  padding-bottom: 0.5rem;
}

.book-preview {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
  position: relative;
}

.preview-fade {
  font-weight: bold;
  color: #666;
}

/* ========================================
   Paywall Container
   ======================================== */

.book-paywall {
  max-width: 700px;
  margin: 3rem auto;
  padding: 0;
 
  
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);



  border: 2px solid #e0e0e0;
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

/* ========================================
   Paywall Message Section
   ======================================== */

.paywall-message {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  position: relative;
}

.paywall-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.paywall-message > * {
  position: relative;
  z-index: 1;
}

.paywall-icon {
  display: inline-block;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.paywall-icon i {
  font-size: 2.5rem;
  color: #ffffff;
}

.paywall-message h4 {
  color: #ffffff;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.paywall-lead {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.paywall-description {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Paywall Benefits List */
.paywall-benefits {
  margin-top: 2rem;
  text-align: left;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.paywall-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.paywall-benefits li {
  padding: 0.75rem 0;
  color: #ffffff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.paywall-benefits li i {
  color: #4ade80;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ========================================
   Login Form Section
   ======================================== */

.paywall-login-form {
  padding: 2.5rem 2rem;
  background-color: #ffffff;
}

.login-title {
  text-align: center;
  margin-bottom: 2rem;
  color: #333;
  font-weight: 700;
  font-size: 1.5rem;
}

.login-form-wrapper {
  margin-bottom: 2rem;
}

/* Style Drupal login form elements */
.paywall-login-form .form-item {
  margin-bottom: 1.5rem;
}

.paywall-login-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 600;
  font-size: 0.95rem;
}

.paywall-login-form input[type="text"],
.paywall-login-form input[type="password"],
.paywall-login-form input.form-text,
.paywall-login-form input.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
}

.paywall-login-form input[type="text"]:focus,
.paywall-login-form input[type="password"]:focus,
.paywall-login-form input.form-text:focus,
.paywall-login-form input.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
  background-color: #ffffff;
}

.paywall-login-form input[type="submit"],
.paywall-login-form button[type="submit"],
.paywall-login-form .form-submit {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.paywall-login-form input[type="submit"]:hover,
.paywall-login-form button[type="submit"]:hover,
.paywall-login-form .form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

/* Hide description text */
.paywall-login-form .description {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
}

/* ========================================
   Registration Link Section
   ======================================== */

.register-link {
  text-align: center;
  padding-top: 2rem;
  border-top: 2px solid #f0f0f0;
  margin-top: 2rem;
}

.register-link p {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: #666;
}

.register-link .btn {
  margin: 0.5rem 0;
  padding: 0.625rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.register-link .btn-outline-primary {
  border: 2px solid #667eea;
  color: #667eea;
  background-color: transparent;
}

.register-link .btn-outline-primary:hover {
  background-color: #667eea;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.register-note {
  font-size: 0.875rem;
  color: #888;
  font-style: italic;
  margin-top: 1rem !important;
}

/* ========================================
   Full Content (Logged-in Users)
   ======================================== */

.book-full-content {
  padding: 2rem 0;
}

.book-full-content h2,
.book-full-content h3,
.book-full-content h4 {
  color: #333;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.book-full-content p {
  line-height: 1.8;
  margin-bottom: 1rem;
}

.book-full-content ul,
.book-full-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.book-full-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* ========================================
   Mobile Responsive Design
   ======================================== */

@media (max-width: 768px) {
  .book-paywall {
    margin: 2rem 1rem;
    border-radius: 0.5rem;
  }
  
  .paywall-message {
    padding: 2rem 1.5rem;
  }
  
  .paywall-message h4 {
    font-size: 1.5rem;
  }
  
  .paywall-icon {
    width: 60px;
    height: 60px;
  }
  
  .paywall-icon i {
    font-size: 2rem;
  }
  
  .paywall-login-form {
    padding: 2rem 1.5rem;
  }
  
  .login-title {
    font-size: 1.25rem;
  }
  
  .book-summary {
    padding: 1.5rem;
  }
  
  .paywall-benefits li {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .paywall-message {
    padding: 1.5rem 1rem;
  }
  
  .paywall-login-form {
    padding: 1.5rem 1rem;
  }
  
  .book-summary {
    padding: 1rem;
  }
  
  .book-summary .summary-title {
    font-size: 1.25rem;
  }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  .book-paywall {
    display: none !important;
  }
  
  .book-summary::after {
    content: '\A\A[Full content available at databank.nedfi.com - Login required]';
    white-space: pre;
    font-style: italic;
    color: #666;
    display: block;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ccc;
  }
}


/* Chrome Table Header Color Fix */
table thead tr:first-child th,
table thead tr:first-child td,
table tr:first-child th,
table tr:first-child td {
  background-color: #C9E2ED !important;
  background: #C9E2ED !important;
  color: #000 !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* ====================================
   TABLE STYLING FIX - Force borders and bgcolor
   Added: 2026-01-14
   Purpose: Override Bootstrap 5.3 table defaults
   ==================================== */

/* Apply table styling to ALL tables in content */
body table,
.region-content table,
article table,
.node__content table {
  border-collapse: collapse !important;
  border: 1px solid #dee2e6 !important;
  width: 100%;
  margin-bottom: 1rem;
}

/* Force cell borders on all table cells */
body table th,
body table td,
.region-content table th,
.region-content table td,
article table th,
article table td,
.node__content table th,
.node__content table td {
  border: 1px solid #000 !important;
  padding: 0.5rem !important;
  vertical-align: top;
}

/* Force background colors from HTML bgcolor attribute */
body table th[bgcolor],
body table td[bgcolor],
.region-content table th[bgcolor],
.region-content table td[bgcolor] {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* Specific fix for #C9E2ED background color (case insensitive) */
body table th[bgcolor="#C9E2ED"],
body table td[bgcolor="#C9E2ED"],
body table th[bgcolor="#c9e2ed"],
body table td[bgcolor="#c9e2ed"],
.region-content table th[bgcolor="#C9E2ED"],
.region-content table td[bgcolor="#C9E2ED"],
.region-content table th[bgcolor="#c9e2ed"],
.region-content table td[bgcolor="#c9e2ed"] {
  background-color: #C9E2ED !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* Support for other common bgcolor values */
table th[style*="background-color"],
table td[style*="background-color"] {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* Ensure table headers are properly styled */
body table thead tr th,
body table thead tr td,
body table tr:first-child th,
body table tr:first-child td[bgcolor] {
  font-weight: bold;
  text-align: center;
}

/* Responsive tables */
@media (max-width: 768px) {
  body table,
  .region-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Print styles for tables */
@media print {
  body table,
  .region-content table {
    border: 1px solid #000 !important;
  }
  
  body table th,
  body table td {
    border: 1px solid #000 !important;
  }
  
  body table th[bgcolor],
  body table td[bgcolor] {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* Gin Login page logo size */
.gin-login .content-header img {
  width: 164px !important;
  height: 169px !important;
  object-fit: contain;
}

/**
 * @file
 * QUICK FIX - Login Button White Text
 * Theme: NER Databank
 * 
 * IMMEDIATE FIX for dark text on blue button
 * Add this CSS with highest priority
 */

/* ============================================
   EMERGENCY FIX - FORCE WHITE TEXT ON BUTTON
   ============================================ */

/* Target all possible button selectors with maximum specificity */
body.path-user .user-login-form input[type="submit"],
body.path-user .user-login-form button[type="submit"],
body.path-user .user-login-form .form-actions input[type="submit"],
body.path-user .user-login-form .form-actions button[type="submit"],
body.path-user form input[type="submit"],
body.path-user form button[type="submit"],
.page-node-type-user-login input[type="submit"],
.user-login-form input#edit-submit,
input#edit-submit {
  color: #ffffff !important;
  background: #0d6efd !important;
  font-weight: 700 !important;
  border: none !important;
  padding: 1rem 2rem !important;
  
  border-radius: 0.5rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  text-transform: uppercase !important;
  width: 100% !important;
  font-size: 1rem !important;
}

/* Hover state - keep white text */
body.path-user .user-login-form input[type="submit"]:hover,
body.path-user .user-login-form button[type="submit"]:hover,
input#edit-submit:hover {
  color: #ffffff !important;
  background: #0a58ca !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.5) !important;
}

/* Focus state - keep white text */
body.path-user .user-login-form input[type="submit"]:focus,
body.path-user .user-login-form button[type="submit"]:focus,
input#edit-submit:focus {
  color: #ffffff !important;
  outline: 3px solid #ffc107 !important;
  outline-offset: 2px !important;
}

/* Active state - keep white text */
body.path-user .user-login-form input[type="submit"]:active,
input#edit-submit:active {
  color: #ffffff !important;
  transform: translateY(0) !important;
}

/* ============================================
   ADDITIONAL FIXES FOR ALL STATES
   ============================================ */

/* Remove any conflicting text color */
.path-user input[type="submit"] *,
.user-login-form input[type="submit"] * {
  color: inherit !important;
}

/* Ensure no text-decoration */
.path-user input[type="submit"],
.user-login-form input[type="submit"] {
  text-decoration: none !important;
}

/* ============================================
   FIX FOR REGISTER AND PASSWORD RESET
   ============================================ */

/* Register page button - green with white text */
body.path-user-register input[type="submit"],
.user-register-form input#edit-submit {
  background: #10b981 !important;
  color: #ffffff !important;
}

body.path-user-register input[type="submit"]:hover {
  background: #059669 !important;
  color: #ffffff !important;
}

/* Password reset page button - orange with white text */
body.path-user-password input[type="submit"],
.user-pass input#edit-submit {
  background: #f59e0b !important;
  color: #ffffff !important;
}

body.path-user-password input[type="submit"]:hover {
  background: #d97706 !important;
  color: #ffffff !important;
}

/* ============================================
   LOGIN FORM WIDTH CONSTRAINT
   Make login form narrower on desktop (~500px)
   Keep full width on mobile (Drupal default)
   ============================================ */

/* Desktop - Constrain login form width to 500px */
@media (min-width: 768px) {
  /* Target the login form container */
  .path-user .layout-container,
  .path-user .region-content {
    max-width: 500px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Center the entire user page content */
  .path-user .main-container {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  /* Login form block styling */
  .path-user #block-ner-databank-page-title,
  .path-user .block-system-main-block {
    max-width: 500px !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  
  /* Form itself */
  .path-user .user-login-form,
  .path-user-register .user-register-form,
  .path-user-password .user-pass {
    max-width: 500px !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  
  /* Add visual card effect on desktop */
  .path-user .block-system-main-block {
    background: #ffffff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* Center the page title */
  .path-user .page-title {
    text-align: center !important;
  }
  
  /* Center tabs */
  .path-user .tabs {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Mobile - Full width (Drupal default behavior) */
@media (max-width: 767px) {
  .path-user .layout-container,
  .path-user .region-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .path-user .main-container {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
  
  /* Remove box shadow on mobile */
  .path-user .block-system-main-block {
    background: transparent;
    padding: 0;
    box-shadow: none;
  }
}

/* ============================================
   CENTER TABS AND ENTIRE LOGIN PAGE
   Fix for tabs alignment
   ============================================ */

/* Center the tabs (Log in | Create new account | Reset password) */
.path-user .tabs,
.path-user .tabs ul,
.path-user .tabs__wrapper {
  text-align: center !important;
  justify-content: center !important;
  display: flex !important;
  flex-wrap: wrap !important;
}

.path-user .tabs ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.path-user .tabs li {
  margin: 0 !important;
  float: none !important;
}

/* Center align all tab items */
.path-user .tabs a {
  text-align: center !important;
}

/* Center the page title "Log in" */
.path-user .page-title,
.path-user h1 {
  text-align: center !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Center the breadcrumb if exists */
.path-user .breadcrumb {
  text-align: center !important;
  justify-content: center !important;
}

/* Ensure the entire content block is centered */
.path-user .block-system-main-block {
  text-align: left !important; /* Keep form fields left-aligned */
}

/* But center the form container itself */
.path-user .user-login-form,
.path-user .user-register-form,
.path-user .user-pass {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ============================================
   RESPONSIVE: Keep centered on all screen sizes
   ============================================ */

@media (max-width: 767px) {
  .path-user .tabs ul {
    flex-direction: row !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
  }
  
  .path-user .tabs li {
    display: inline-block !important;
  }
} 

/* Add top padding to login button */
body.path-user .user-login-form input[type="submit"],
body.path-user .user-login-form button[type="submit"],
input#edit-submit {
  padding-top: 1.5rem !important; /* Increased from 1rem to add more space */
  margin-top: 10px !important; /* Alternative: adds space above button */
}
