/* Login Page Specific Styles */
:root {
  --dealer-color: #0924bd;
  --alrajhi-color: #0924bd;
  --atmaal-color: #0924bd;
  --tawtheeq-color: #0924bd;
  --vendor-color: #0924bd;
  --admin-color: #0924bd;
  --system-admin-color: #0924bd;
  --default-color: #0924bd;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #757575;
  --text-color: #333333;
  --white: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

.login-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.login-left {
  flex: 1;
  background-color: var(--light-gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.login-logo {
  position: absolute;
  top: 2rem;
  left: 2rem;
  max-width: 150px;
}

.login-logo img {
  width: 100%;
  height: auto;
}

.login-illustration {
  max-width: 80%;
  margin-top: 2rem;
}

.login-image {
  width: 100%;
  height: auto;
}

.login-right {
  flex: 1;
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
}

.login-form-container {
  width: 100%;
  max-width: 450px;
  padding: 2rem;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--default-color);
}

.login-subtitle {
  font-size: 1rem;
  color: var(--dark-gray);
  margin-bottom: 2rem;
}

.user-type-selector {
  display: flex;
  flex-wrap: wrap-reverse;
  gap: 1rem;
  margin-bottom: 2rem;
}

.user-type-option {
  flex: 1;
  min-width: 100px;
  background-color: var(--white);
  border: 2px solid var(--medium-gray);
  border-radius: 8px;
  padding: 1rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.user-type-option:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.user-type-option.active[data-color="orange"] {
  border-color: var(--dealer-color);
  background-color: rgba(9, 36, 189, 0.1);
}

.user-type-option.active[data-color="blue"] {
  border-color: var(--alrajhi-color);
  background-color: rgba(9, 36, 189, 0.1);
}

.user-type-option.active[data-color="teal"] {
  border-color: var(--atmaal-color);
  background-color: rgba(9, 36, 189, 0.1);
}

.user-type-option.active[data-color="purple"] {
  border-color: var(--tawtheeq-color);
  background-color: rgba(9, 36, 189, 0.1);
}

.user-type-option.active[data-color="green"] {
  border-color: var(--vendor-color);
  background-color: rgba(9, 36, 189, 0.1);
}

.user-type-option.active[data-color="green"][data-type="admin"] {
  border-color: var(--admin-color);
  background-color: rgba(9, 36, 189, 0.1);
}

.user-type-option.active[data-color="magenta"] {
  border-color: var(--system-admin-color);
  background-color: rgba(9, 36, 189, 0.1);
}

.user-type-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--medium-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-weight: 700;
  transition: var(--transition);
}

.user-type-option[data-color="orange"].active .user-type-icon {
  background-color: var(--dealer-color);
  color: var(--white);
}

.user-type-option[data-color="blue"].active .user-type-icon {
  background-color: var(--alrajhi-color);
  color: var(--white);
}

.user-type-option[data-color="teal"].active .user-type-icon {
  background-color: var(--atmaal-color);
  color: var(--white);
}

.user-type-option[data-color="purple"].active .user-type-icon {
  background-color: var(--tawtheeq-color);
  color: var(--white);
}

.user-type-option[data-color="green"].active .user-type-icon {
  background-color: var(--vendor-color);
  color: var(--white);
}

.user-type-option[data-color="green"][data-type="admin"].active .user-type-icon {
  background-color: var(--admin-color);
  color: var(--white);
}

.user-type-option[data-color="magenta"].active .user-type-icon {
  background-color: var(--system-admin-color);
  color: var(--white);
}

.user-type-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.login-form {
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark-gray);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--medium-gray);
  border-radius: 4px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--default-color);
  box-shadow: 0 0 0 2px rgba(117, 117, 117, 0.2);
}

.form-group.dealer-field input:focus,
.form-group.dealer-reset-field input:focus {
  border-color: var(--dealer-color);
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.remember-me {
  display: flex;
  align-items: center;
}

.remember-me input {
  margin-right: 0.5rem;
}

.forgot-password {
  color: var(--default-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.forgot-password:hover {
  text-decoration: underline;
}

.login-button, .reset-button {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 4px;
  background-color: var(--default-color);
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.login-button:hover, .reset-button:hover {
  background-color: #071c96;
}

/* Theme specific button styles */
.theme-dealer .login-button, .theme-dealer .reset-button {
  background-color: var(--dealer-color);
}

.theme-dealer .login-button:hover, .theme-dealer .reset-button:hover {
  background-color: #071c96;
}

.theme-alrajhi .login-button, .theme-alrajhi .reset-button {
  background-color: var(--alrajhi-color);
}

.theme-alrajhi .login-button:hover, .theme-alrajhi .reset-button:hover {
  background-color: #071c96;
}

.theme-atmaal .login-button, .theme-atmaal .reset-button {
  background-color: var(--atmaal-color);
}

.theme-atmaal .login-button:hover, .theme-atmaal .reset-button:hover {
  background-color: #071c96;
}

.theme-tawtheeq .login-button, .theme-tawtheeq .reset-button {
  background-color: var(--tawtheeq-color);
}

.theme-tawtheeq .login-button:hover, .theme-tawtheeq .reset-button:hover {
  background-color: #071c96;
}

.theme-vendor .login-button, .theme-vendor .reset-button {
  background-color: var(--vendor-color);
}

.theme-vendor .login-button:hover, .theme-vendor .reset-button:hover {
  background-color: #071c96;
}

.theme-admin .login-button, .theme-admin .reset-button {
  background-color: var(--admin-color);
}

.theme-admin .login-button:hover, .theme-admin .reset-button:hover {
  background-color: #071c96;
}

/* System Admin theme button styles */
.theme-system-admin .login-button, .theme-system-admin .reset-button {
  background-color: var(--system-admin-color);
}

.theme-system-admin .login-button:hover, .theme-system-admin .reset-button:hover {
  background-color: #071c96;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  width: 100%;
  max-width: 450px;
  position: relative;
  box-shadow: var(--shadow);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark-gray);
}

/* Select2 Custom Styles */
.select2-container--bootstrap4 .select2-selection {
  height: calc(1.5em + 1.5rem + 2px) !important;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 4px;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
  padding-left: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
  height: 100%;
}

.select2-user-type {
  display: flex;
  align-items: center;
}

.select2-user-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: white;
  font-weight: bold;
}

.select2-user-text {
  font-weight: 500;
}

.select2-results__option {
  padding: 8px 12px;
}

.select2-results__option--highlighted .select2-user-icon {
  transform: scale(1.1);
}

.hidden {
  display: none !important;
}

/* Responsive styles */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
  }

  .login-left {
    display: none;
  }

  .login-right {
    width: 100%;
    padding: 1rem;
  }

  .login-form-container {
    padding: 1rem;
  }

  .user-type-selector {
    flex-wrap: wrap;
  }

  .user-type-option {
    flex: 1 0 40%;
  }
}

/* Registration link styles */
.register-link a {
  color: var(--default-color);
  text-decoration: none;
  transition: var(--transition);
}

.register-link a:hover {
  text-decoration: underline;
}

.theme-dealer .register-link a {
  color: var(--dealer-color);
}

.theme-vendor .register-link a {
  color: var(--vendor-color);
}
