/*!
|--------------------------------------------------------------------------
| Restaurant ERP
|--------------------------------------------------------------------------
| Customer Registration
|--------------------------------------------------------------------------
| Mobile App Style
|--------------------------------------------------------------------------
*/

:root {
  --register-primary: #dc3545;
  --register-primary-dark: #bb2d3b;

  --register-success: #198754;

  --register-bg: #f8f9fa;

  --register-card: #ffffff;

  --register-border: #dee2e6;

  --register-text: #212529;

  --register-text-light: #6c757d;

  --register-radius: 18px;

  --register-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* ===========================================================
   Page
=========================================================== */

html,
body {
  min-height: 100%;

  background: var(--register-bg);
}

#customer-register-page {
  min-height: 100vh;

  display: flex;

  justify-content: center;

  align-items: center;

  padding: 20px;
}

/* ===========================================================
   Container
=========================================================== */

.register-container {
  width: 100%;

  max-width: 460px;
}

.register-card {
  background: var(--register-card);

  border-radius: var(--register-radius);

  box-shadow: var(--register-shadow);

  padding: 28px;
}

/* ===========================================================
   Logo
=========================================================== */

.register-logo {
  text-align: center;

  margin-bottom: 18px;
}

.register-logo img {
  width: 70px;

  height: auto;
}

/* ===========================================================
   Heading
=========================================================== */

.register-title {
  font-size: 1.65rem;

  font-weight: 700;

  color: var(--register-text);

  margin-bottom: 0;
}

/* ===========================================================
   Labels
=========================================================== */

.form-label {
  font-size: 0.9rem;

  font-weight: 600;

  color: var(--register-text);
}

/* ===========================================================
   Inputs
=========================================================== */

.form-control {
  min-height: 48px;

  border-radius: 12px;

  border: 1px solid var(--register-border);

  box-shadow: none;

  font-size: 0.95rem;
}

.form-control:focus {
  border-color: var(--register-primary);

  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* ===========================================================
   Input Group
=========================================================== */

.input-group .btn {
  border-radius: 0 12px 12px 0;
}

#toggle-password {
  min-width: 54px;
}
/* ===========================================================
   Checkbox
=========================================================== */

.form-check {
  margin-bottom: 0;
}

.form-check-input {
  width: 1.15rem;

  height: 1.15rem;

  cursor: pointer;

  margin-top: 0.2rem;
}

.form-check-label {
  color: var(--register-text);

  font-size: 0.85rem;

  line-height: 1.45;

  cursor: pointer;
}

/* ===========================================================
   Links
=========================================================== */

.form-check-label a {
  color: var(--register-primary);

  text-decoration: none;

  font-weight: 600;
}

.form-check-label a:hover {
  text-decoration: underline;
}

.register-login-link {
  color: var(--register-primary);

  text-decoration: none;

  font-weight: 600;
}

.register-login-link:hover {
  text-decoration: underline;
}

/* ===========================================================
   Buttons
=========================================================== */

.btn {
  border-radius: 14px;

  transition:
    background-color 0.25s,
    border-color 0.25s,
    transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-danger {
  background: var(--register-primary);

  border-color: var(--register-primary);
}

.btn-danger:hover {
  background: var(--register-primary-dark);

  border-color: var(--register-primary-dark);
}

#register-button {
  min-height: 54px;

  font-size: 1rem;

  font-weight: 600;
}

/* ===========================================================
   Messages
=========================================================== */

.alert {
  border: none;

  border-radius: 14px;

  margin-bottom: 18px;
}

/* ===========================================================
   Already Registered
=========================================================== */

.register-footer {
  margin-top: 12px;

  text-align: center;
}

.register-footer small {
  color: var(--register-text-light);
}

/* ===========================================================
   Loading Overlay
=========================================================== */

.register-loading,
.login-loading {
  position: fixed;

  inset: 0;

  background: rgba(255, 255, 255, 0.75);

  display: flex;

  justify-content: center;

  align-items: center;

  z-index: 99999;
}

.register-loading.d-none,
.login-loading.d-none {
  display: none !important;
}
/* ===========================================================
   Password Toggle
=========================================================== */

#toggle-password {
  border-left: 0;
}

#toggle-password:focus {
  box-shadow: none;
}

#password-toggle-icon {
  font-size: 1.1rem;
}

/* ===========================================================
   Validation
=========================================================== */

.form-control.is-valid {
  border-color: #198754;
}

.form-control.is-invalid {
  border-color: #dc3545;
}

.invalid-feedback,
.valid-feedback {
  font-size: 0.85rem;
}

/* ===========================================================
   Card Animation
=========================================================== */

.register-card {
  animation: registerFade 0.35s ease;
}

@keyframes registerFade {
  from {
    opacity: 0;

    transform: translateY(18px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

/* ===========================================================
   Mobile
=========================================================== */

@media (max-width: 575.98px) {
  #customer-register-page {
    padding: 14px;

    align-items: flex-start;

    padding-top: 18px;
  }

  .register-container {
    max-width: 100%;
  }

  .register-card {
    padding: 20px;

    border-radius: 16px;

    box-shadow: none;
  }

  .register-logo img {
    width: 58px;
  }

  .register-title {
    font-size: 1.45rem;
  }

  .form-control {
    min-height: 46px;

    font-size: 0.95rem;
  }

  .btn {
    min-height: 50px;
  }

  .form-check-label {
    font-size: 0.8rem;
  }
}

/* ===========================================================
   Tablet
=========================================================== */

@media (min-width: 576px) and (max-width: 991.98px) {
  .register-container {
    max-width: 480px;
  }
}

/* ===========================================================
   Desktop
=========================================================== */

@media (min-width: 992px) {
  .register-container {
    max-width: 460px;
  }
}

/* ===========================================================
   Large Desktop
=========================================================== */

@media (min-width: 1400px) {
  .register-container {
    max-width: 480px;
  }
}

/* ===========================================================
   Accessibility
=========================================================== */

.form-control:focus,
.btn:focus,
.form-check-input:focus {
  outline: none;
}

/* ===========================================================
   Reduced Motion
=========================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;

    transition: none !important;

    scroll-behavior: auto !important;
  }
}

/* ===========================================================
   Print
=========================================================== */

@media print {
  .register-loading,
  .login-loading {
    display: none !important;
  }
}
