/* 
   Fro batouta - Authentication Pages Stylesheet
   Styling for login and registration pages
*/

/* ===== AUTH SECTION ===== */
.auth-section {
  padding: 140px 0 80px;
  min-height: calc(100vh - 300px);
  background-color: var(--light);
}

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background-color: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-form-container {
  padding: 50px;
}

.auth-header {
  margin-bottom: 30px;
  text-align: left;
}

.auth-header h2 {
  font-family: var(--heading-font);
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: var(--dark);
  position: relative;
}

.auth-header h2:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 60px;
  height: 3px;
  background-color: var(--secondary);
}

.auth-header p {
  color: var(--gray-text);
  font-size: 1.1rem;
  margin-top: 20px;
}

.auth-form form {
  width: 100%;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: var(--body-font);
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(42, 157, 143, 0.2);
  outline: none;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 45px;
  cursor: pointer;
  color: #aaa;
}

.password-toggle:hover {
  color: var(--primary);
}

.password-strength {
  margin-top: 10px;
}

.strength-bar {
  height: 5px;
  background-color: #eee;
  border-radius: 5px;
  margin-bottom: 5px;
  overflow: hidden;
}

.strength-progress {
  height: 100%;
  width: 20%;
  background-color: #f44336; /* Red for weak */
  transition: all 0.3s ease;
}

.strength-text {
  font-size: 0.8rem;
  color: #f44336;
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.remember-me {
  display: flex;
  align-items: center;
}

.remember-me input {
  margin-right: 5px;
}

.forgot-password {
  color: var(--primary);
}

.forgot-password:hover {
  text-decoration: underline;
}

.terms {
  display: flex;
  align-items: flex-start;
}

.terms input {
  margin-right: 10px;
  margin-top: 5px;
}

.terms label {
  font-size: 0.9rem;
  line-height: 1.4;
}

.terms a {
  color: var(--primary);
}

.terms a:hover {
  text-decoration: underline;
}

.btn-auth {
  width: 100%;
  padding: 15px;
  font-size: 1rem;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 25px 0;
}

.auth-divider:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #e0e0e0;
}

.auth-divider span {
  position: relative;
  background-color: white;
  padding: 0 15px;
  color: var(--gray-text);
  font-size: 0.9rem;
}

.social-login {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background-color: white;
  font-family: var(--body-font);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-social i {
  margin-right: 10px;
}

.btn-google {
  color: #4285f4;
}

.btn-facebook {
  color: #3b5998;
}

.btn-social:hover {
  background-color: #f9f9f9;
}

.auth-redirect {
  text-align: center;
  margin-top: 30px;
  font-size: 0.95rem;
}

.auth-redirect a {
  color: var(--primary);
  font-weight: 600;
}

.auth-redirect a:hover {
  text-decoration: underline;
}

.auth-image {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.auth-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(38, 70, 83, 0.7),
    rgba(42, 157, 143, 0.8)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.auth-overlay-content {
  text-align: center;
  color: white;
  max-width: 400px;
}

.auth-overlay-content h3 {
  font-family: var(--heading-font);
  font-size: 2rem;
  margin-bottom: 20px;
}

.auth-overlay-content p {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Form validation styles */
.form-group.error input {
  border-color: #f44336;
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

.error-message {
  color: #f44336;
  font-size: 0.85rem;
  margin-top: 5px;
  display: none;
}

.form-group.error .error-message {
  display: block;
}

/* Success message styles */
.auth-success {
  background-color: #e7f9f7;
  border-left: 4px solid var(--primary);
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  display: none;
}

.auth-success.show {
  display: block;
}

.auth-error {
  background-color: #ffeaea;
  border-left: 4px solid #f44336;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  display: none;
}

.auth-error.show {
  display: block;
}

/* RTL Support for Auth Pages */
html[dir="rtl"] .auth-header h2:after {
  right: 0;
  left: auto;
}

html[dir="rtl"] .password-toggle {
  right: auto;
  left: 15px;
}

html[dir="rtl"] .remember-me input {
  margin-right: 0;
  margin-left: 5px;
}

html[dir="rtl"] .btn-social i {
  margin-right: 0;
  margin-left: 10px;
}

html[dir="rtl"] .terms input {
  margin-right: 0;
  margin-left: 10px;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
  .auth-container {
    grid-template-columns: 1fr;
  }

  .auth-image {
    display: none;
  }
}

@media screen and (max-width: 576px) {
  .auth-form-container {
    padding: 30px 20px;
  }

  .auth-header h2 {
    font-size: 1.8rem;
  }
}

/* Animation effects */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.auth-form {
  animation: fadeIn 0.8s ease;
}
