/*!*
 * This file is part of the SplendidBear Websites' projects.
 *
 * Copyright (c) 2026 @ www.splendidbear.org
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 80px;
}

.auth-flash {
    width: 100%;
    max-width: 420px;
    padding: 12px 18px;
    border-radius: 5px;
    font: 600 14px 'Rajdhani', sans-serif;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;

    &--success {
        background: rgba(26, 104, 68, 0.25);
        border: 1px solid rgba(42, 158, 96, 0.4);
        color: #a0f0c0;
    }

    &--error {
        background: rgba(173, 10, 5, 0.18);
        border: 1px solid rgba(173, 10, 5, 0.4);
        color: #f6a090;
    }
}

// "Check your inbox" confirmation card
.auth-card--sent {
    text-align: center;
    padding: 48px 40px;
}

.auth-sent-icon {
    font-size: 52px;
    color: rgba(149, 207, 245, 0.6);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 16px rgba(35, 111, 135, 0.4));
}

.auth-sent-email {
    font: 700 16px 'Rajdhani', sans-serif;
    color: #95cff5;
    letter-spacing: 0.5px;
    margin: 0 0 20px;
    word-break: break-all;
}

.auth-sent-note {
    font: 400 14px 'Rajdhani', sans-serif;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    margin-bottom: 0;

    strong { color: rgba(255, 255, 255, 0.75); }
}

.auth-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(35, 111, 135, 0.2);
    border-radius: 10px;
    padding: 44px 48px 40px;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
}

.auth-title {
    font: 800 30px 'Rajdhani', sans-serif;
    color: #ffffff;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.auth-sub {
    font: 400 14px 'Rajdhani', sans-serif;
    color: rgba(149, 207, 245, 0.6);
    letter-spacing: 0.5px;
    margin-bottom: 32px;
}

.auth-error {
    background: rgba(173, 10, 5, 0.18);
    border: 1px solid rgba(173, 10, 5, 0.4);
    border-radius: 5px;
    padding: 10px 14px;
    font: 600 13px 'Rajdhani', sans-serif;
    color: #f6a090;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-label {
    font: 700 11px 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.45);
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 11px;
    color: rgba(149, 207, 245, 0.4);
    font-size: 13px;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(35, 111, 135, 0.3);
    border-radius: 5px;
    padding: 11px 14px 11px 34px;
    font: 500 15px 'Rajdhani', sans-serif;
    color: #ffffff;
    letter-spacing: 0.5px;
    transition: border-color 200ms ease, background 200ms ease;

    &::placeholder { color: rgba(255, 255, 255, 0.2); }

    &:focus {
        outline: none;
        background: rgba(35, 111, 135, 0.1);
        border-color: rgba(149, 207, 245, 0.5);
    }

    &--error {
        border-color: rgba(173, 10, 5, 0.6) !important;
    }
}

.auth-field-error {
    font: 500 12px 'Rajdhani', sans-serif;
    color: #f6a090;
    letter-spacing: 0.3px;
}

.auth-below-password {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font: 500 13px 'Rajdhani', sans-serif;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    user-select: none;
    margin-top: -4px;

    input[type="checkbox"] { accent-color: #236f87; }
}

.auth-checkbox {
    accent-color: #236f87;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    font: 400 14px 'Rajdhani', sans-serif;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;

    a {
        color: #95cff5;
        text-decoration: none;
        font-weight: 600;
        transition: color 180ms;

        &:hover { color: #c5e8ff; }
    }
}

textarea.auth-input {
    padding: 11px 14px;
    min-height: 120px;
    resize: vertical;
    font-family: 'Rajdhani', sans-serif;
    line-height: 1.5;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(to bottom, #ad0a05 0%, #d4401a 55%, #f67d52 100%);
    border: 1px solid rgba(246, 125, 82, 0.3);
    border-radius: 5px;
    color: #ffffff;
    font: 700 16px 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 14px;
    cursor: pointer;
    margin-top: 6px;
    box-shadow: 0 4px 20px rgba(173, 10, 5, 0.35);
    transition: all 220ms ease;

    &:hover {
        background: linear-gradient(to bottom, #c91008 0%, #e5521e 55%, #ff8c61 100%);
        box-shadow: 0 6px 28px rgba(173, 10, 5, 0.6);
        transform: translateY(-2px);
    }

    &:active { transform: translateY(0); }
}

.auth-cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(to bottom, #1a1a1a 0%, #2d2d2d 55%, #404040 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #ffffff;
    font: 700 16px 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 14px;
    cursor: pointer;
    margin-top: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: all 220ms ease;

    &:hover {
        background: linear-gradient(to bottom, #2d2d2d 0%, #3d3d3d 55%, #505050 100%);
        box-shadow: 0 6px 28px rgba(0, 0, 0, 0.6);
        transform: translateY(-2px);
    }

    &:active { transform: translateY(0); }
}

.auth-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    align-items: flex-start;

    form {
        flex: 1;
        display: flex;

        &.auth-form {
            flex-direction: column;
            gap: 20px;
        }
    }

    button {
        flex: 1;
    }
}

.auth-cancel-form {
    display: flex;
    flex: 1;

    .auth-cancel {
        flex: 1;
        margin-top: 0;
    }
}

.auth-cancel-standalone {
    margin-top: 12px;
    width: 100%;
}

.auth-cancel--block {
    width: 100%;
    margin-top: 0;
}

.auth-switch {
    font: 400 13px 'Rajdhani', sans-serif;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    margin-top: 24px;
    letter-spacing: 0.3px;

    a {
        color: #95cff5;
        text-decoration: none;
        font-weight: 600;
        transition: color 180ms;

        &:hover { color: #c5e8ff; }
    }
}

.auth-forgot-password {
  font: 400 13px 'Rajdhani', sans-serif;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  letter-spacing: 0.3px;

  a {
    color: #95cff5;
    text-decoration: none;
    font-weight: 600;
    transition: color 180ms;

    &:hover { color: #c5e8ff; }
  }
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #999;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #ddd;
}

.auth-divider span {
  margin: 0 10px;
  font-size: 14px;
}

.auth-passkey-btn {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-passkey-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.auth-passkey-btn:active {
  transform: translateY(0);
}

.auth-input--code {
  font: 700 22px 'Courier New', monospace;
  letter-spacing: 6px;
  text-align: center;
}

.auth-field-hint {
  font: 400 12px 'Rajdhani', sans-serif;
  color: rgba(149, 207, 245, 0.45);
  letter-spacing: 0.3px;
  margin: 6px 0 0;
}

.auth-card--wide {
  max-width: 520px;
}

.auth-back {
  margin-top: 20px;
  text-align: center;

  a {
    font: 500 13px 'Rajdhani', sans-serif;
    color: rgba(149, 207, 245, 0.5);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 180ms;

    &:hover { color: rgba(149, 207, 245, 0.9); }
  }
}

.twofa-setup {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;

  &__qr {
    display: flex;
    justify-content: center;

    img {
      border-radius: 8px;
      border: 2px solid rgba(35, 111, 135, 0.3);
      background: #fff;
      padding: 4px;
    }
  }

  &__manual {
    text-align: center;
  }

  &__manual-label {
    font: 400 12px 'Rajdhani', sans-serif;
    color: rgba(149, 207, 245, 0.45);
    letter-spacing: 0.5px;
    margin: 0 0 8px;
  }

  &__secret {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(35, 111, 135, 0.3);
    border-radius: 4px;
    font: 700 14px 'Courier New', monospace;
    letter-spacing: 3px;
    color: #95cff5;
    word-break: break-all;
    user-select: all;
  }
}
