
.login-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: auto;
  position: relative;
  z-index: 1;
}

/* Ensure background image never overlays content */
.login-wrapper > img {
  z-index: 0;
}

.subb {
  color: black;
  text-align: center;
}

.inputt{
     ::ng-deep .mdc-text-field {
    width: 328px;
    max-width: none;
  }

  ::ng-deep .mdc-text-field__input {
    width: 328px;
  }
}

.div-container {
  flex: 1;
  overflow-y: visible;
  max-width: 360px;
  max-height: 600px;
  margin: 0 auto;
  padding: 1rem;
}

.login-content-box {
  width: 100%;
}

.form-container {
  color: var(--text-primary, #111111);
  display: flex;
  width: 360px;
  flex-direction: column;
  gap: 1.7px;
  padding: 32px 16px 27px 16px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: visible;
}

.password-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

.password-wrapper gb-input {
  flex: 1;
}

// .password-wrapper mat-icon {
//   position: absolute;
//   top: 50%;
//   right: 12px;
//   transform: translateY(-50%);
//   font-size: 20px;
//   color: var(--mat-sys-inverse-surface, rgba(26, 26, 26, 0.87));
//   cursor: pointer;
//   z-index: 2;
// }

.toggle-password-icon{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10;
}

::ng-deep gb-input input {
  padding-right: 36px !important;
}

.error-message {
  color: #dc3545;
  font-size: 0.875rem;
  text-align: center;
  padding: 0.5rem;
  border-radius: 4px;
  background-color: rgba(220, 53, 69, 0.1);
}

.success-message {
  color: #28a745;
  font-size: 0.875rem;
  text-align: center;
  padding: 0.5rem;
  border-radius: 4px;
  background-color: rgba(40, 167, 69, 0.1);
}

.btn {
  width: 150px;
  height: 52px;
  padding: 0;
  border-radius: 8px;
}

.signin-button {
  background-color: #834DD0;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}


.signin-button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.signin-button:hover:not(:disabled) {
  background-color: #F4E7FF;
  color: black;
}

.forgot-password {
  text-align: center;
  margin-top: 10px;
}

.forgot-link {
  color: #834DD0;
  text-decoration: none;
  cursor: pointer;
}

.forgot-link:hover {
  text-decoration: underline;
}

.social-signin {
  text-align: center;
  margin-top: 16px;
}

.social-signin p {
  width: 68px;
  height: 18px;
  margin: 0 auto 8px;
  line-height: 18px;
  white-space: nowrap;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.social-icons img {
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.social-icons img:hover {
  transform: scale(1.1);
}

.divider-line {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 10px 0;
  color: #888;
}

.divider-line hr {
  flex: 1;
  border: none;
  border-top: 1px solid #ccc;
}

.divider-line span {
  font-size: 12px;
}

.signup-section {
  text-align: center;
}

.signup-section p {
  margin-bottom: 4px;
  color: #555;
}

.signup-button {
  width: 328px;
  height: 52px;
  border: 1px solid #834DD0;
  background-color: #ffffff;
  color: #834DD0;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.signup-button:hover {
  background-color: #834DD0;
  color: #fff;
}

.gbtranslate {
  margin: 10px;
  right: 92px;
  position: absolute;
}

::ng-deep .mat-mdc-text-field-wrapper {
  border: 1.5px solid rgba(26, 26, 26, 0.15);
  border-radius: 14px;
  transition: border-color 0.3s ease;
}

::ng-deep .mat-mdc-text-field-wrapper.mdc-text-field--focused {
  border-color: #834DD0 !important;
  box-shadow: 0 0 0 2px rgba(164, 112, 255, 0.2); // optional glow
}

::ng-deep .mat-mdc-text-field-wrapper:hover {
  border-color: #834DD0 !important;
}

::ng-deep .mat-mdc-form-field-focus-overlay {
  background-color: transparent !important;
}

::ng-deep .mat-mdc-form-field.mat-focused .mdc-text-field {
  border-color: #834DD0 !important;
}

.google-auth-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  max-width: 400px;
  width: 100%;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.google-auth-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.google-logo {
  width: 32px;
  height: 32px;
}

.google-auth-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.security-info {
  text-align: center;
}

.auth-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-number {
  background: #4285f4;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.google-signin-button {
  background: #4285f4;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 0;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  transition: background 0.2s;
}

.google-signin-button:disabled {
  background: #bcdffb;
  cursor: not-allowed;
}

.button-content {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.button-google-icon {
  width: 24px;
  height: 24px;
}

.loading-spinner {
  margin-left: 8px;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #4285f4;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.security-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  background: #f5f5f5;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 12px;
}

.button-group {
  display: flex;
  justify-content: space-between;
}

.back-button-text {
  background: transparent;
  border: 1px solid #834DD0;
  cursor: pointer;
  color: #834DD0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-button-text:hover {
  background-color: #f5f5f5;
}

/* Make server input readonly when showing credentials */
gb-input[readonly] {
  opacity: 0.7;
  pointer-events: none;
}

.form-field {
  width: 328px;
  margin-bottom: 16px;
}

.form-note{
  color: #834DD0;
  display: flex;
  justify-content: center;
  padding-bottom: 4px;
}

.wide-input{
  width: 328px;

   ::ng-deep .mdc-text-field {
    width: 328px;
    max-width: none;
  }

  ::ng-deep .mdc-text-field__input {
    width: 328px;
  }
}

.btn-submit {
  width: 328px;
  height: 52px;
  gap: 2px;
  border-radius: 8px;
  background-color: #834DD0;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-submit:disabled{
  background-color: #6c757d;
  cursor: not-allowed;
}

.remembered-connections {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 12px;
}

.remembered-connection-item {
  width: 328px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background-color: #fff;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s;
}

.remembered-connection-item:hover {
  background-color: #f5f0fb;
}

.remember-device-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  cursor: pointer;
}

.remember-device-warning {
  color: #92670A;
  background: rgba(234, 179, 8, .12);
  border: 1px solid #EAB308;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 6px;
  margin-bottom: 0;
}

// ==================== FORGOT PASSWORD STYLES ====================

.forgot-password-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  max-width: 420px;
  width: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.forgot-password-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.fp-back-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
  color: #834DD0;

  mat-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
  }

  &:hover {
    background-color: rgba(164, 112, 255, 0.1);
  }
}

.forgot-password-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fp-step-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  
  p {
    color: #555;
    line-height: 1.5;
  }
}

.fp-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--action-primary-default) 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;

  mat-icon {
    color: white;
    font-size: 32px;
    width: 32px;
    height: 32px;
  }
}

.fp-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fp-input {
  width: 100%;

  ::ng-deep .mdc-text-field {
    width: 100%;
    max-width: none;
  }

  ::ng-deep .mdc-text-field__input {
    width: 100%;
  }
}

.fp-submit-button {
  width: 100%;
  height: 52px;
  border-radius: 8px;
  background-color: #834DD0;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-top: 8px;

  &:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
  }

  &:hover:not(:disabled) {
    background-color: #8b5cf6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(164, 112, 255, 0.3);
  }

  &:active:not(:disabled) {
    transform: translateY(0);
  }
}

// Password visibility toggle in forgot password flow
.forgot-password-content .password-wrapper {
  position: relative;
  
  .toggle-password-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 10;
    color: #834DD0;
    
    &:hover {
      color: #8b5cf6;
    }
  }
}
// Override the focused border color ONLY for gb-input elements with the 'login-input' class in this component
::ng-deep .login-input .mat-mdc-form-field.mat-focused .mat-mdc-text-field-wrapper {
  border: 1px solid #834DD0 !important;
}
// Override the focused label color ONLY for gb-input elements with the 'login-input' class in this component
::ng-deep .login-input .mat-mdc-form-field.mat-focused .mdc-floating-label {
  color: #834DD0 !important;
}
.button-group.single-button {
  justify-content: center;
}
.button-group {
  display: flex;
  gap: 20px;
}