/* style/login.css */

/* Custom properties for colors */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-button-color: #EA7C07;
  --background-color: #FFFFFF; /* Assuming light background for body */
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
}

/* Base styles for the login page */
.page-login {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Default text color for light background */
  background-color: var(--background-color);
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-color-light); /* Text on gradient background */
}

.page-login__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%; /* Ensure container takes full width up to max-width */
}

.page-login__hero-section img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 30px;
  filter: none; /* Ensure no CSS filter changes image color */
  min-width: 200px;
  min-height: 200px;
}

.page-login__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-login__hero-content h1 {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: var(--text-color-light); /* Explicitly white for contrast */
}

.page-login__intro-text {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  color: var(--text-color-light); /* Explicitly white for contrast */
}

.page-login__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 600px; /* Limit button group width */
  margin: 0 auto;
}

.page-login__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box; /* Include padding in element's total width and height */
  max-width: 100%; /* Ensure button doesn't exceed container width */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-login__btn-primary {
  background: var(--login-button-color); /* #EA7C07 */
  color: var(--text-color-light);
  border: 2px solid transparent;
}

.page-login__btn-primary:hover {
  background: #C46706; /* Darker version of #EA7C07 */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-login__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-login__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-color-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General Section Styling */
.page-login__form-section,
.page-login__security-info,
.page-login__benefits-section,
.page-login__faq-section,
.page-login__cta-section {
  padding: 60px 20px;
  text-align: center;
}

.page-login__light-bg {
  background-color: var(--background-color); /* White */
  color: var(--text-color-dark); /* Dark text */
}

.page-login__dark-bg {
  background-color: var(--primary-color); /* #26A9E0 */
  color: var(--text-color-light); /* White text */
}

.page-login h2 {
  font-size: 2.2em;
  margin-bottom: 25px;
  color: inherit; /* Inherit from section for contrast */
}

.page-login h3 {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: inherit;
}

.page-login p {
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Login Form Section */
.page-login__form-container {
  max-width: 500px;
  margin: 40px auto;
  padding: 40px;
  background: var(--secondary-color); /* White background */
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: left;
  color: var(--text-color-dark);
}

.page-login__login-form .page-login__form-group {
  margin-bottom: 20px;
}

.page-login__login-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.page-login__login-form input[type="text"],
.page-login__login-form input[type="password"] {
  width: calc(100% - 20px);
  padding: 12px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box;
}

.page-login__form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.page-login__remember-me input {
  margin-right: 8px;
}

.page-login__forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-login__forgot-password:hover {
  text-decoration: underline;
}

.page-login__submit-button {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 5px;
  background: var(--login-button-color); /* #EA7C07 */
  color: var(--text-color-light);
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__submit-button:hover {
  background: #C46706; /* Darker version of #EA7C07 */
}

.page-login__registration-prompt {
  margin-top: 25px;
  text-align: center;
}

.page-login__registration-prompt a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-login__registration-prompt a:hover {
  text-decoration: underline;
}

/* Security Info Section */
.page-login__security-info .page-login__container {
  color: var(--text-color-light); /* Text on primary color background */
}
.page-login__security-info h2, .page-login__security-info p {
  color: var(--text-color-light);
}

.page-login__security-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-login__feature-item {
  background: rgba(255, 255, 255, 0.15); /* Slightly transparent white for contrast */
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  color: var(--text-color-light); /* White text on transparent background */
}

.page-login__feature-item img {
  width: 200px; /* Adjusting to meet min size requirement */
  height: 200px; /* Adjusting to meet min size requirement */
  object-fit: contain;
  margin: 0 auto 20px auto;
  display: block;
  filter: none; /* Ensure no CSS filter changes image color */
  min-width: 200px;
  min-height: 200px;
}

/* Benefits Section */
.page-login__benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-login__benefit-card {
  background: var(--secondary-color); /* White background */
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  color: var(--text-color-dark); /* Dark text on white background */
}

.page-login__benefit-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  filter: none; /* Ensure no CSS filter changes image color */
  min-width: 200px;
  min-height: 200px;
}

.page-login__cta-bottom {
  margin-top: 50px;
}

/* FAQ Section */
.page-login__faq-section {
  padding: 60px 20px;
  background-color: #f9f9f9; /* Light grey background for FAQ */
  color: var(--text-color-dark);
}

.page-login__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
}

/* FAQ container styles */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ default state - answer hidden */
.page-login__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* 🚨 Use!important ensure priority, value large enough to accommodate any content */
  padding: 20px 15px !important;
  opacity: 1;
  background: var(--secondary-color); /* White background for answers */
  border-radius: 0 0 5px 5px;
}

/* Question style */
.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color); /* White background for questions */
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-login__faq-item.active .page-login__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.page-login__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-login__faq-question:active {
  background: #eeeeee;
}

/* Question title style */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click events */
  color: var(--text-color-dark);
}

/* Toggle icon */
.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color); /* Use primary color for toggle */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-login__faq-item.active .page-login__faq-toggle {
  transform: rotate(180deg); /* Rotate for minus sign effect */
  color: var(--login-button-color);
}

/* CTA Section at bottom */
.page-login__cta-section {
  background-color: var(--primary-color); /* Primary color background */
  color: var(--text-color-light); /* White text */
  padding: 80px 20px;
}

.page-login__cta-section h2, .page-login__cta-section p {
  color: var(--text-color-light);
}

.page-login__cta-section .page-login__btn-secondary {
  margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__hero-content h1 {
    font-size: 2.5em;
  }
  .page-login h2 {
    font-size: 2em;
  }
  .page-login h3 {
    font-size: 1.3em;
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile specific offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-login__hero-content h1 {
    font-size: 2em;
  }
  .page-login__intro-text {
    font-size: 1em;
  }
  
  .page-login__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }
  
  .page-login__cta-button,
  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login a[class*="button"],
  .page-login a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-login__cta-buttons,
  .page-login__button-group,
  .page-login__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-login__form-section,
  .page-login__security-info,
  .page-login__benefits-section,
  .page-login__faq-section,
  .page-login__cta-section {
    padding: 40px 15px;
  }

  .page-login h2 {
    font-size: 1.8em;
  }
  .page-login h3 {
    font-size: 1.2em;
  }

  .page-login__form-container {
    padding: 25px;
  }
  
  .page-login__feature-item,
  .page-login__benefit-card {
    padding: 20px;
  }

  .page-login__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-login__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-login__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-login__faq-answer {
    padding: 0 15px;
  }
  
  .page-login__faq-item.active .page-login__faq-answer {
    padding: 15px !important;
  }

  /* Image responsive rules */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-login__section,
  .page-login__card,
  .page-login__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Ensure content area images are not too small */
  .page-login__security-info .page-login__feature-item img,
  .page-login__benefits-section .page-login__benefit-card img {
    min-width: 200px;
    min-height: 200px;
  }
}

/* Ensure content area images are not displayed smaller than 200px */
.page-login img:not(.shared-header__logo):not(.shared-footer__payment-icon):not(.shared-footer__social-icon):not(.shared-footer__game-provider-icon) {
  min-width: 200px;
  min-height: 200px;
  object-fit: cover;
}

/* Color contrast fixes/defaults */
.page-login__light-bg {
  color: var(--text-color-dark);
}
.page-login__dark-bg {
  color: var(--text-color-light);
}
.page-login__form-container, .page-login__faq-item, .page-login__faq-question, .page-login__benefit-card {
  color: var(--text-color-dark);
}
.page-login__submit-button, .page-login__btn-primary {
  color: var(--text-color-light);
}
.page-login__btn-secondary {
  color: var(--primary-color);
}
.page-login__cta-section .page-login__btn-secondary {
  color: var(--primary-color); /* Override for light button on dark background */
}
.page-login__cta-section .page-login__btn-secondary:hover {
  color: var(--text-color-light);
}