/* auth.css - Authentication styles for MediConnect Telemedicine Platform */

/* ==================== AUTH LAYOUT ==================== */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--background-light);
  padding: 2rem;
}

.auth-wrapper {
  display: flex;
  width: 100%;
  max-width: 120rem;
  min-height: 60rem;
  background-color: var(--background-white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1rem 3rem var(--shadow-color);
}

/* ==================== AUTH IMAGE SECTION ==================== */
.auth-image {
  flex: 1;
  background-image: url('../assets/images/doctor-consultation.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  display: none;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(26, 115, 232, 0.8); /* Primary color with opacity */
  z-index: 1;
}

.auth-image-content {
  position: relative;
  z-index: 2;
  color: white;
  padding: 4rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-image-content h2 {
  color: white;
  font-size: 3.6rem;
  margin-bottom: 2rem;
}

.auth-image-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.8rem;
}

/* ==================== AUTH FORM SECTION ==================== */
.auth-form {
  flex: 1;
  padding: 4rem;
  display: flex;
  flex-direction: column;
}

.auth-header {
  text-align: center;
  margin-bottom: 3rem;
}

.auth-header .logo {
  display: block;
  margin-bottom: 2rem;
}

.auth-header .logo h1 {
  color: var(--primary-color);
  margin-bottom: 0;
}

.auth-header h2 {
  margin-bottom: 1rem;
}

.auth-header p {
  color: var(--text-light);
}

/* ==================== AUTH TABS ==================== */
.auth-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  background: none;
  border: none;
  padding: 1.2rem 2.4rem;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-medium);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ==================== FORM ELEMENTS ==================== */
.auth-form-fields {
  max-width: 40rem;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.8rem;
  color: var(--text-dark);
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 1.5rem;
  color: var(--text-light);
}

.input-wrapper .toggle-password {
  left: auto;
  right: 1.5rem;
  cursor: pointer;
}

.input-wrapper input {
  width: 100%;
  padding: 1.2rem 1.5rem 1.2rem 4.5rem;
  font-size: 1.6rem;
  border: 1px solid var(--border-color);
  border-radius: 0.4rem;
  transition: border-color 0.3s ease;
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.input-wrapper input::placeholder {
  color: var(--text-light);
}

/* Password input specific */
.input-wrapper input[type="password"] {
  padding-right: 4.5rem;
}

.input-wrapper select {
  width: 100%;
  padding: 1.2rem 1.5rem 1.2rem 4.5rem;
  font-size: 1.6rem;
  border: 1px solid var(--border-color);
  border-radius: 0.4rem;
  transition: border-color 0.3s ease;
  appearance: none; /* Removes default browser styling */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5 1.5-1.5L8 8.5 11.5 5 13 6.5l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.5rem center;
  background-size: 12px;
}

.input-wrapper select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.input-wrapper select:required:invalid {
  color: var(--text-light);
}

.input-wrapper select option {
  color: var(--text-dark);
}

.input-wrapper select option:first-child {
  color: var(--text-light);
}

/* ==================== CHECKBOX AND FORGOT PASSWORD ==================== */
.form-group-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 1.8rem;
  height: 1.8rem;
  margin-right: 0.8rem;
  accent-color: var(--primary-color);
}

.checkbox-wrapper label {
  margin-bottom: 0;
  font-weight: normal;
  color: var(--text-medium);
  font-size: 1.4rem;
}

.forgot-link {
  font-size: 1.4rem;
  color: var(--primary-color);
}

.forgot-link:hover {
  text-decoration: underline;
}

/* ==================== BUTTONS ==================== */
.btn-block {
  width: 100%;
  margin-bottom: 2rem;
}

/* ==================== OR DIVIDER ==================== */
.or-divider {
  position: relative;
  text-align: center;
  margin: 2rem 0;
}

.or-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--border-color);
}

.or-divider span {
  position: relative;
  background-color: var(--background-white);
  padding: 0 1.5rem;
  color: var(--text-light);
  font-size: 1.4rem;
}

/* ==================== SOCIAL LOGIN ==================== */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background-color: var(--background-white);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
}

.btn-social:hover {
  background-color: var(--background-light);
}

.btn-google:hover {
  color: #DB4437;
  border-color: #DB4437;
}

.btn-facebook:hover {
  color: #4267B2;
  border-color: #4267B2;
}

/* ==================== AUTH FOOTER ==================== */
.auth-footer {
  margin-top: auto;
  text-align: center;
  padding-top: 2rem;
}

.auth-footer p {
  font-size: 1.4rem;
  color: var(--text-medium);
  margin-bottom: 0;
}

.auth-footer a {
  font-weight: 500;
}

/* ==================== RESPONSIVE STYLES ==================== */
@media (min-width: 768px) {
  .auth-image {
    display: block;
  }
}

@media (max-width: 992px) {
  .auth-wrapper {
    min-height: auto;
  }
  
  .auth-form {
    padding: 3rem;
  }
}

@media (max-width: 576px) {
  .auth-form {
    padding: 2rem;
  }
  
  .social-login {
    flex-direction: column;
  }
  
  .form-group-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .forgot-link {
    align-self: flex-end;
  }
}
