/* ==========================================================================
   Login Page Stylesheet - Eazy Communications
   Faithfully designed matching Figma node 87:190
   ========================================================================== */

/* Page Wrapper */
.login-page {
  min-height: 100vh;
  background-color: var(--color-white, #ffffff);
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   Top Hero Banner (Spans 100% Full Screen Width)
   Figma Node 87:191: 1440px x 375px with vertical offset -104.73%
   -------------------------------------------------------------------------- */
.login-banner {
  width: 100%;
  height: 375px;
  position: relative;
  overflow: hidden;
  background-color: #241814;
}

.login-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 67%;
  display: block;
}

/* --------------------------------------------------------------------------
   Main Content Layout (Full Width with Strict 100px Left & 104px Right Padding)
   -------------------------------------------------------------------------- */
.login-main {
  width: 100%;
  position: relative;
  flex: 1 0 auto;
}

.login-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-left: 100px;
  padding-right: 104px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

/* Left Column: Brand & Information (Figma Node 153:83, Top: 416px, Left: 100px) */
.login-left {
  width: 628px;
  max-width: calc(100% - 560px);
  /* 375px banner + 41px padding = 416px top offset */
  padding-top: 41px;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 540px;
  box-sizing: border-box;
}

.login-left-top {
  display: flex;
  flex-direction: column;
}

.login-logo-link {
  display: inline-block;
  margin-bottom: 23px;
  width: 136px;
  height: 64px;
}

.login-logo-img {
  width: 136px;
  height: 64px;
  object-fit: contain;
  display: block;
}

.login-hero-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.login-heading {
  font-family: var(--font-heading, 'Questrial', sans-serif);
  font-size: 44px;
  line-height: 1.2;
  color: var(--color-gray-dark, #373737);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.login-description {
  font-family: var(--font-body, 'Poppins', sans-serif);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-gray-dark, #373737);
}

/* Left Column: Footer & Legal (Figma Node 153:84, Top: 787px) */
.login-legal-footer {
  margin-top: 72px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.login-legal-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.login-legal-link {
  font-family: var(--font-heading, 'Questrial', sans-serif);
  font-size: 16px;
  color: var(--primary-cyan, #00aeef);
  text-decoration: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.login-legal-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.login-copyright {
  font-family: var(--font-heading, 'Questrial', sans-serif);
  font-size: 16px;
  color: var(--color-gray-dark, #373737);
  line-height: normal;
}

/* --------------------------------------------------------------------------
   Right Column: Login Card ("Welcome back!" - Figma Node 87:216)
   Top: 82px (375px banner - 293px = 82px)
   Right Gap: 104px
   Border Radius: 0 (No border radius in design!)
   Box Shadow: None (Flat white surface in design!)
   -------------------------------------------------------------------------- */
.login-right {
  width: 519px;
  flex-shrink: 0;
  position: relative;
  /* Lift card into banner by 293px (375px - 293px = 82px top) */
  margin-top: -293px;
  z-index: 10;
  padding-bottom: 60px;
}

.login-card {
  width: 519px;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--color-white, #ffffff);
  border-radius: 0; /* Strict no border radius as per Figma design */
  box-shadow: none; /* Flat white container as per Figma design */
  border: none;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.login-card-title {
  font-family: var(--font-heading, 'Questrial', sans-serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--color-gray-dark, #373737);
  text-align: center;
  line-height: 1.2;
}

.login-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Social Login Row */
.login-social-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.btn-social-google {
  flex: 1;
  height: 56px;
  background: var(--primary-gradient);
  border-radius: var(--radius-sm, 10px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  cursor: pointer;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 16px;
  text-decoration: none;
  transition: transform var(--transition-fast), filter var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 4px 12px rgba(40, 104, 178, 0.2);
}

.btn-social-google:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(40, 104, 178, 0.3);
}

.btn-social-google:active {
  transform: translateY(0);
}

.btn-social-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border: 2px solid #eeeeee;
  border-radius: var(--radius-sm, 10px);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.btn-social-icon:hover {
  border-color: #d0d0d0;
  background: #fcfcfc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-social-icon:active {
  transform: translateY(0);
}

.social-icon-img {
  width: 56px;
  height: 56px;
  display: block;
}

.google-icon-img {
  width: 24px;
  height: 24px;
  display: block;
}

/* Divider "Or" */
.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.login-divider-line {
  flex: 1;
  height: 1px;
  background-color: #eeeeee;
}

.login-divider-text {
  font-family: var(--font-heading, 'Questrial', sans-serif);
  font-size: 16px;
  color: #b9b9b9;
  line-height: 1;
  user-select: none;
}

/* Form Fields */
.login-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.form-label {
  font-family: var(--font-heading, 'Questrial', sans-serif);
  font-size: 16px;
  color: var(--color-gray-dark, #373737);
  font-weight: 400;
  line-height: 1.2;
}

.input-control {
  width: 100%;
  height: 64px;
  border: 2px solid #eeeeee;
  border-radius: var(--radius-sm, 10px);
  padding: 0 16px;
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--color-gray-dark);
  background: var(--color-white);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}

.input-control::placeholder {
  color: #b9b9b9;
  font-family: var(--font-heading, 'Questrial', sans-serif);
  font-size: 16px;
}

.input-control:focus {
  border-color: var(--primary-bright, #0094d1);
  box-shadow: 0 0 0 3px rgba(0, 148, 209, 0.12);
}

.input-control.error {
  border-color: #e53935;
}

/* Password Input Group with Visibility Toggle */
.password-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-group .input-control {
  padding-right: 56px;
}

.btn-toggle-visibility {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.btn-toggle-visibility:hover {
  opacity: 1;
}

.visibility-icon {
  width: 32px;
  height: 32px;
  display: block;
}

/* Checkbox Remember Me */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.checkbox-group input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-checkbox {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border: 2px solid #eeeeee;
  border-radius: 4px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.checkbox-group:hover .custom-checkbox {
  border-color: #d0d0d0;
}

.checkbox-group input[type="checkbox"]:focus-visible + .custom-checkbox {
  border-color: var(--primary-bright, #0094d1);
  box-shadow: 0 0 0 2px rgba(0, 148, 209, 0.2);
}

.checkbox-group input[type="checkbox"]:checked + .custom-checkbox {
  background: var(--primary-deep, #2868b2);
  border-color: var(--primary-deep, #2868b2);
}

.checkbox-group input[type="checkbox"]:checked + .custom-checkbox::after {
  content: '';
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.checkbox-label {
  font-family: var(--font-heading, 'Questrial', sans-serif);
  font-size: 16px;
  color: var(--color-gray-dark, #373737);
  line-height: 1.4;
  cursor: pointer;
}

/* Submit Button */
.btn-signin-submit {
  width: 100%;
  height: 56px;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 5px 10px rgba(49, 49, 49, 0.05);
  transition: filter var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  margin-top: 8px;
}

.btn-signin-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(40, 104, 178, 0.25);
}

.btn-signin-submit:active {
  transform: translateY(0);
}

/* Forgot Password Link (Figma Node 87:251) */
.login-forgot-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.login-forgot-link {
  font-family: var(--font-heading, 'Questrial', sans-serif);
  font-size: 16px;
  color: var(--primary-cyan, #00aeef);
  text-decoration: underline;
  transition: opacity var(--transition-fast);
}

.login-forgot-link:hover {
  opacity: 0.8;
}

/* Footer "Don't have an account? Sign Up" (Figma Node 87:254) */
.login-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading, 'Questrial', sans-serif);
  font-size: 16px;
  color: var(--color-charcoal, #343434);
  line-height: normal;
}

.login-signup-link {
  color: var(--primary-cyan, #00aeef);
  text-decoration: underline;
  transition: opacity var(--transition-fast);
}

.login-signup-link:hover {
  opacity: 0.8;
}

/* Form Message Feedback */
.form-feedback {
  display: none;
  font-family: var(--font-heading, 'Questrial', sans-serif);
  font-size: 14px;
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
}

.form-feedback.success {
  display: block;
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.form-feedback.error {
  display: block;
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

/* Intermediate Laptops (1025px - 1300px) */
@media (max-width: 1300px) and (min-width: 1025px) {
  .login-grid {
    padding-left: 40px;
    padding-right: 40px;
    column-gap: 32px;
  }

  .login-left {
    width: auto;
    max-width: none;
    flex: 1;
  }

  .login-right {
    width: 480px;
    flex-shrink: 0;
  }

  .login-card {
    width: 100%;
    padding: 32px;
    gap: 32px;
  }

  .login-heading {
    font-size: 36px;
  }

  .login-description {
    font-size: 18px;
  }
}

/* Tablet & Smaller Screens (<= 1024px) - Clean Centered Responsive Flow */
@media (max-width: 1024px) {
  .login-banner {
    height: 300px;
  }

  .login-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 67%;
    display: block;
  }

  .login-grid {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center children horizontally */
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
    gap: 0;
  }

  .login-right {
    width: 100%;
    max-width: 519px;
    margin: -100px auto 40px; /* Centered card with negative top overlap */
    display: flex;
    justify-content: center;
    order: 1; /* Card appears first below banner */
    padding-bottom: 0;
    flex-shrink: 1;
  }

  .login-card {
    width: 100%;
    max-width: 519px;
    border-radius: 0; /* Keep strict sharp corners */
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    padding: 36px 32px;
  }

  .login-left {
    width: 100%;
    max-width: 628px;
    margin: 0 auto;
    order: 2;
    padding-top: 10px;
    padding-bottom: 60px;
    align-items: center;
    text-align: center;
    min-height: auto;
    box-sizing: border-box;
  }

  .login-logo-link {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 18px;
  }

  .login-hero-content {
    align-items: center;
    gap: 20px;
  }

  .login-heading {
    font-size: 32px;
    text-align: center;
  }

  .login-description {
    font-size: 17px;
    text-align: center;
  }

  .login-legal-footer {
    margin-top: 36px;
    align-items: center;
    gap: 24px;
  }

  .login-legal-nav {
    justify-content: center;
  }

  .login-copyright {
    text-align: center;
  }
}

/* Mobile Devices (<= 600px) */
@media (max-width: 600px) {
  .login-banner {
    height: 220px;
  }

  .login-grid {
    padding: 0 16px;
  }

  .login-right {
    margin-top: -60px;
    margin-bottom: 30px;
    max-width: 100%;
  }

  .login-card {
    padding: 24px 18px;
    gap: 24px;
    border-radius: 0;
  }

  .login-card-title {
    font-size: 26px;
  }

  .login-social-row {
    gap: 10px;
  }

  .btn-social-google {
    font-size: 14px;
    padding: 0 10px;
    gap: 6px;
  }

  .btn-social-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }

  .social-icon-img {
    width: 48px;
    height: 48px;
  }

  .input-control {
    height: 56px;
  }

  .login-heading {
    font-size: 26px;
  }

  .login-description {
    font-size: 15px;
  }

  .login-legal-footer {
    margin-top: 28px;
    gap: 20px;
  }
}
