/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* Login Page Styles */
:root {
  --dealer-color: #0924bd;
  --alrajhi-color: #0924bd;
  --atmaal-color: #0924bd;
  --tawtheeq-color: #0924bd;
  --vendor-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;
}

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  background-color: var(--light-gray);
  color: var(--text-color);
}

.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;
  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(255, 152, 0, 0.1);
}

.user-type-option.active[data-color="blue"] {
  border-color: var(--alrajhi-color);
  background-color: rgba(33, 150, 243, 0.1);
}

.user-type-option.active[data-color="teal"] {
  border-color: var(--atmaal-color);
  background-color: rgba(0, 150, 136, 0.1);
}

.user-type-option.active[data-color="purple"] {
  border-color: var(--tawtheeq-color);
  background-color: rgba(156, 39, 176, 0.1);
}

.user-type-option.active[data-color="green"] {
  border-color: var(--vendor-color);
  background-color: rgba(0, 100, 0, 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-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: #616161;
}

/* 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: #f57c00;
}

.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: #1976d2;
}

.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: #00796b;
}

.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: #7b1fa2;
}

.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: #004d00;
}

/* 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);
}

.hidden {
  display: none;
}

/* 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%;
  }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 1.25dppx),
(min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
