/* =========================================================
   CRIS AUTH
   Login / Registration / Password Reset
   Version 0.1.9
========================================================= */

.cris-auth-page {
  --cris-blue: #268dc7;
  --cris-blue-dark: #0c6196;
  --cris-green: #0c9a52;
  --cris-red: #dc3545;
  --cris-orange: #f39c12;
  --cris-text: #173044;
  --cris-muted: #647789;
  --cris-border: #d5e1e7;

  width: 100%;
}

.cris-auth-page *,
.cris-auth-page *::before,
.cris-auth-page *::after {
  box-sizing: border-box;
}

/* =========================================================
   FORM LABELS
========================================================= */

.cris-auth-form label > span {
  display: block;

  margin-bottom: 7px;

  color: var(--cris-text);

  font-size: 14px;
  font-weight: 700;
}

/* =========================================================
   BUTTONS
========================================================= */

.cris-auth-page .cris-primary-button {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 50px;

  margin-top: 4px;

  padding: 12px 18px;

  border: 0 !important;
  border-radius: 10px !important;

  background: var(--cris-blue) !important;

  color: #ffffff !important;

  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 700 !important;

  line-height: 1.2 !important;

  text-align: center;
  text-decoration: none !important;

  cursor: pointer;

  box-shadow: 0 10px 24px rgba(38, 141, 199, 0.15);

  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.cris-auth-page .cris-primary-button:hover {
  background: var(--cris-blue-dark) !important;

  color: #ffffff !important;

  transform: translateY(-1px);

  box-shadow: 0 12px 28px rgba(12, 97, 150, 0.2);
}

/* =========================================================
   PASSWORD FIELD
========================================================= */

.cris-password-field {
  position: relative;

  width: 100%;
}

.cris-password-field input {
  width: 100%;

  padding-right: 52px !important;
}

/* =========================================================
   SHOW / HIDE PASSWORD
========================================================= */

.cris-password-toggle {
  position: absolute;

  top: 50%;
  right: 11px;

  display: flex;

  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  padding: 0;

  border: 0 !important;
  border-radius: 8px;

  background: transparent !important;

  color: #708794;

  cursor: pointer;

  transform: translateY(-50%);

  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.cris-password-toggle:hover {
  background: rgba(38, 141, 199, 0.08) !important;

  color: var(--cris-blue-dark);
}

.cris-password-toggle:focus {
  outline: 2px solid rgba(38, 141, 199, 0.22);
  outline-offset: 1px;
}

.cris-password-toggle svg {
  width: 21px;
  height: 21px;

  fill: none;

  stroke: currentColor;
  stroke-width: 1.8;

  stroke-linecap: round;
  stroke-linejoin: round;
}

/* PASSWORD SKRIVEN */

.cris-password-toggle .cris-eye-open {
  display: none;
}

.cris-password-toggle .cris-eye-closed {
  display: block;
}

/* PASSWORD VIDLJIV */

.cris-password-toggle.is-visible .cris-eye-open {
  display: block;
}

.cris-password-toggle.is-visible .cris-eye-closed {
  display: none;
}

/* =========================================================
   PASSWORD STRENGTH
========================================================= */

.cris-password-strength {
  margin-top: -2px;
  margin-bottom: 8px;
}

/* TRACK */

.cris-password-strength-track {
  width: 100%;
  height: 6px;

  overflow: hidden;

  border-radius: 999px;

  background: #e5ebee;
}

.cris-password-strength-track span {
  display: block;

  width: 0;
  height: 100%;

  border-radius: inherit;

  background: var(--cris-red);

  transition:
    width 0.28s ease,
    background-color 0.28s ease;
}

/* CRVENO */

.cris-password-strength.is-weak .cris-password-strength-track span {
  background: var(--cris-red);
}

/* NARANDŽASTO */

.cris-password-strength.is-medium .cris-password-strength-track span {
  background: var(--cris-orange);
}

/* ZELENO */

.cris-password-strength.is-strong .cris-password-strength-track span {
  background: var(--cris-green);
}

/* =========================================================
   PASSWORD HINT
========================================================= */

.cris-password-hint {
  min-height: 19px;

  margin-top: 7px;

  color: var(--cris-muted);

  font-size: 12px;
  font-weight: 600;

  line-height: 1.4;
}

.cris-password-strength.is-weak .cris-password-hint {
  color: #b52d3c;
}

.cris-password-strength.is-medium .cris-password-hint {
  color: #a66800;
}

.cris-password-strength.is-strong .cris-password-hint {
  color: #087b40;
}

/* =========================================================
   PASSWORD RULES
========================================================= */

.cris-password-rules {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 7px 14px;

  margin: 10px 0 0;

  padding: 0;

  list-style: none;
}

.cris-password-rules li {
  position: relative;

  display: flex;

  align-items: center;

  gap: 7px;

  margin: 0;
  padding: 0;

  color: #788a94;

  font-size: 12px;
  line-height: 1.3;

  transition: color 0.2s ease;
}

.cris-password-rules li::before {
  content: "";

  flex: 0 0 8px;

  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #b9c5cb;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

/* ISPUNJENO PRAVILO */

.cris-password-rules li.is-valid {
  color: #087b40;
}

.cris-password-rules li.is-valid::before {
  background: var(--cris-green);

  transform: scale(1.08);
}

/* =========================================================
   PASSWORD CONFIRMATION
========================================================= */

.cris-password-confirm {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* LOZINKE SE POKLAPAJU */

.cris-password-confirm.is-match {
  border-color: var(--cris-green) !important;

  box-shadow: 0 0 0 2px rgba(12, 154, 82, 0.09) !important;
}

/* LOZINKE SE NE POKLAPAJU */

.cris-password-confirm.is-mismatch {
  border-color: var(--cris-red) !important;

  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.08) !important;
}

/* KVAČICA / X */

.cris-password-match {
  position: absolute;

  top: 50%;
  right: 48px;

  display: none;

  align-items: center;
  justify-content: center;

  width: 23px;
  height: 23px;

  border-radius: 50%;

  background: #dcf5e6;

  color: #087b40;

  font-size: 14px;
  font-weight: 900;

  line-height: 1;

  transform: translateY(-50%);
}

.cris-password-match.is-visible {
  display: flex;
}

.cris-password-match.is-error {
  background: #fde5e7;

  color: var(--cris-red);
}

/* =========================================================
   CHECKBOX
========================================================= */

.cris-auth-page .cris-checkbox {
  display: flex;

  align-items: center;

  gap: 8px;

  cursor: pointer;
}

.cris-auth-page .cris-checkbox input {
  width: 16px;
  height: 16px;

  margin: 0;

  accent-color: var(--cris-blue);
}

.cris-auth-page .cris-checkbox > span {
  margin: 0;

  font-size: 13px;
  font-weight: 500;

  color: var(--cris-muted);
}

/* =========================================================
   AUTH LINKS
========================================================= */

.cris-auth-links {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 15px;

  margin-top: 4px;
}

.cris-auth-links a,
.cris-auth-switch a {
  color: var(--cris-blue-dark) !important;

  font-weight: 700;

  text-decoration: none !important;
}

.cris-auth-links a:hover,
.cris-auth-switch a:hover {
  text-decoration: underline !important;
}

/* =========================================================
   ALERTS
========================================================= */

.cris-alert {
  margin-bottom: 20px;

  padding: 13px 15px;

  border-radius: 10px;

  font-size: 13px;
  line-height: 1.5;
}

.cris-alert-success {
  border: 1px solid #bde6cc;

  background: #e9f8ef;

  color: #087b40;
}

.cris-alert-error {
  border: 1px solid #efc5c9;

  background: #fff0f1;

  color: #a92d3b;
}

/* =========================================================
   RESET CODE
========================================================= */

.cris-reset-code-input {
  width: 100% !important;

  text-align: center;

  font-size: 26px !important;
  font-weight: 800 !important;

  letter-spacing: 0.28em;

  font-variant-numeric: tabular-nums;
}

/* =========================================================
   AUTH SWITCH
========================================================= */

.cris-auth-switch {
  margin: 4px 0 0;

  color: var(--cris-muted);

  font-size: 13px;

  text-align: center;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {
  .cris-password-rules {
    grid-template-columns: 1fr;

    gap: 6px;
  }

  .cris-password-toggle {
    right: 8px;
  }

  .cris-password-match {
    right: 44px;
  }

  .cris-auth-links {
    align-items: flex-start;
    flex-direction: column;

    gap: 8px;
  }

  .cris-reset-code-input {
    font-size: 22px !important;

    letter-spacing: 0.22em;
  }
}
