/* Basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Footer height variable (desktop default) */
:root {
  --dbl-footer-height: 7.5rem;
}

/* Footer height for mobile */
/*@media (max-width: 36rem) {
  :root {
    --dbl-footer-height: 9.375rem;
  }
}*/

/* Make sure html and body take full height */
html,
body {
  height: 100%;
  margin: 0;
}

/* Center the login box in the middle of the page */
body {
  background-image: url(/dblebanking/file-asset/login-background) !important;
  background-position: 50% 50% !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
  background-color: #f4f4f4 !important;
  height: 100vh !important;
  width: 100% !important;
  overflow: hidden;
}

/* Outer container for positioning */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: calc(100vh - var(--dbl-footer-height));
  padding: 1.25rem;
  border-radius: 1.5rem;
  overflow: hidden;
}

/* Style for the Login button */
.login-btn {
  width: 100%;
  padding: 0.75rem;
  margin: 0.625rem 0;
  background-color: var(--lwc-colorBackgroundButtonBrand, rgb(13, 115, 71));
  border: none;
  border-radius: 0.25rem;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  min-height: 3rem;
}

/* Button hover effect */
.login-btn:hover {
  background-color: var(--lwc-colorBackgroundButtonBrand, rgb(13, 115, 71));
}

.login-body {
  background-color: #fafafa;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0.625rem 0.625rem 0.875rem 0 rgba(0, 0, 0, 0.09);
  width: 100%;
  max-width: 30rem;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.header-subtitle {
  font-size: 1rem;
  line-height: 1.4;
}

.margin-spacer {
  margin-bottom: 1.25rem;
}

.cta-links {
  font-size: 0.875rem;
  text-decoration: none;
  color: #0d7347;
  min-height: 1.75rem;
  display: inline-flex;
  align-items: center;
}

.cta-links:hover {
  text-decoration: underline;
  color: #0d7347;
}

.logo-container {
  height: auto;
  min-height: 5rem;
}

.logo-container img {
  max-height: 7.5rem;
  width: auto;
  height: auto;
}

.user-options {
  flex-direction: column;
  gap: 1rem;
  align-items: stretch !important;
}

.user-options > div {
  width: 100%;
}

.user-options .d-flex.flex-column {
  flex-direction: row !important;
  justify-content: space-between;
  gap: 0.75rem;
}

.form-control {
  min-height: 3rem;
  font-size: 1rem;
}

label {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  display: block;
  font-weight: 500;
}

/* Scope fixed positioning to this page's footer only */
@media only screen and (min-width: 48rem){
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: #054237 !important;
  min-height: 2.5rem;
  z-index: 1000;
}
}

.content {
  margin-left: 1rem;
  margin-right: 1rem;
  font-size: 0.75rem;
  color: white;
  font-family: 'Segoe UI';
  padding-top: 0.625rem;
  text-align: center;
}

.dbl-footer {
  width: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Green sections styling */
.footer-green-section {
  background-color: #054237;
  color: white;
}

/* White section styling */
.footer-white-section {
  background-color: white;
  color: #333333;
  border-top: 1px solid #dddbda;
}

/* Contact us highlight color - orange/yellow */
.contact-highlight {
  color: #dfae22;
  text-decoration: none;
}

.contact-highlight:hover,
.contact-highlight:focus {
  color: #dfae22;
  text-decoration: underline;
}

/* Footer links styling */
.footer-link {
  color: white;
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus {
  color: #dfae22;
  text-decoration: underline;
}

/* Ensure proper text colors in green sections */
.footer-green-section h5,
.footer-green-section h6,
.footer-green-section .small,
.footer-green-section nav {
  color: white;
}

/* Ensure proper text colors in white section */
.footer-white-section p {
  color: #333333;
}

/* Tablet optimizations */
@media (min-width: 36rem) {
  .login-container {
    padding: 1.875rem;
  }
  
  .login-body {
    padding: 2rem;
  }
  
  .header-title {
    font-size: 1.75rem;
  }
  
  .margin-spacer {
    margin-bottom: 1.375rem;
  }
  
  .logo-container {
    min-height: 6.25rem;
  }
  
  .logo-container img {
    max-height: 8.75rem;
  }
  
  .content {
    font-size: 0.8125rem;
    text-align: left;
    margin-left: 1.5rem;
  }
  
  .user-options {
    flex-direction: row;
    align-items: center !important;
  }
  
  .user-options > div {
    width: auto;
  }
  
  .user-options .d-flex.flex-column {
    flex-direction: column !important;
    text-align: right;
  }
}

/* Desktop optimizations */
@media (min-width: 62rem) {
  body {
    background-attachment: fixed !important;
  }
  
  .login-container {
    padding: 2.5rem;
    height: auto;
    min-height: calc(100vh - var(--dbl-footer-height));
  }
  
  .login-body {
    padding: 3rem;
  }
  
  .header-title {
    font-size: 2rem;
  }
  
  .margin-spacer {
    margin-bottom: 1.5rem;
  }
  
  .logo-container {
    min-height: 8.75rem;
  }
  
  .logo-container img {
    max-height: 10.1875rem;
  }
  
  .content {
    font-size: 0.875rem;
    margin-left: 4rem;
  }
}

/* Large desktop optimizations */
@media (min-width: 75rem) {
  .login-body {
    max-width: 32.5rem;
  }
  
  .content {
    margin-left: 6rem;
  }
}

/* Optimizations for laptop screens with height constraints */
@media (max-height: 920px) {
  .logo-container {
    min-height: 4rem;
  }
  
  .logo-container img {
    max-height: 6rem;
  }
  
  .header-title {
    font-size: 1.375rem;
  }
  
  .header-subtitle {
    font-size: 0.9375rem;
  }
  
  .margin-spacer {
    margin-bottom: 1rem;
  }
  
  .login-body {
    padding: 1.25rem;
  }
  
  .login-container {
    padding: 1rem;
  }
  
  .form-control {
    min-height: 2.75rem;
  }
  
  .login-btn {
    min-height: 2.75rem;
    padding: 0.625rem;
  }
}

/* When the viewport height is very small, let the footer flow so users can scroll to buttons */
@media (max-height: 700px) {
  .dbl-footer {
    position: static;
  }
  .login-container {
    height: 100vh;
  }
  body {
    overflow-y: auto !important;
  }
}

/* When height is constrained on many laptops/tablets, also allow scrolling past footer */
@media (max-height: 850px) {
  .dbl-footer {
    position: static;
  }
  .login-container {
    height: auto;
    min-height: 100vh;
    align-items: flex-start;
  }
  body {
    height: auto !important;
    overflow-y: auto !important;
  }
}

/* Landscape phones often have very small heights; treat similarly */
@media (orientation: landscape) and (max-height: 450px) {
  .dbl-footer {
    position: static;
    display: none !important;
  }
  .login-container {
    height: 100vh;
    align-items: flex-start;
  }
  body {
    overflow-y: auto !important;
  }
}

@media only screen and (max-width: 48rem) {
  .hide-on-mobile {
    display: none !important; 
  }
}