/* ==========================================================================
   Docebo Registration — registration.css
   ========================================================================== */

/* ---- Custom properties --------------------------------------------------- */
:root {
  --color-bg:           #f7f7f7;
  --color-surface:      #ffffff;
  --color-accent:       #0279A6;
  --color-accent-2:     #0A1845;
  --color-accent-3:     #D1423C;
  --color-text:         #000000;
  --color-text-steps:   #8B0000;
  --color-btn-border:   #0279A6;
  --color-field-border: #0A1845;
  --color-error:        #8B0000;
  --color-error-bg:     #ffffff;
  --color-success:      #38a169;
  --color-btn-help:     #D1423C;

  --font-display: 'Open Sans', Arial, sans-serif;
  --font-body:    'Open Sans', Arial, sans-serif;
  --font-size-body: 16px;

  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;

  --shadow-card: 0 4px 24px rgba(26,26,46,.08);
  --shadow-btn:  0 2px 12px rgba(79,142,247,.35);

  --transition: all 0.3s ease;
}

/* ---- Reset & base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
*{
  transition: var(--transition);
}

html { font-size: var(--font-size-body); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  line-height: 1.6;
}

/* ---- Layout -------------------------------------------------------------- */
.layout {
  display: flex;
  min-height: 100vh;
  height:100vh;
}

/* Left panel — 35% wide on >=900px */
.panel-left {
  position: relative;
  width: 35%;
  overflow: hidden;
}

.panel-left__content {
  position: relative;
  width: 100%;
  height: 100%;
  
}

.panel-left__tagline {
  top: 20%;
  left: 0;
  padding: 2rem 4rem;
  background: rgba(235,235,240, 0.75);
  width: 85%;
  position: absolute;
  z-index: 2;
}
.panel-left__tagline p {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: rgb(0, 0, 0);
}

.waves{
  width: 100%;
  margin-bottom: 150px;
}

/* Logos */
.panel-left__logos {
  position: absolute;
  bottom: 0;
  left: 0;
  background: #F7F7F7;
  padding: 1.5rem 15% 1.5rem 3.5rem;
  width: 100%;
  height: auto;
}
.panel-left__bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

/* Right panel */
.panel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 3.5rem 3rem;
  background: var(--color-bg);
  overflow-y: auto;
}

/* ---- Step indicator ------------------------------------------------------ */
.step-indicator__label {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text-steps);
  white-space: nowrap;
  letter-spacing: .04em;
  font-weight: bold;
  line-height: 1.2;
}

/* ---- Form area ----------------------------------------------------------- */
.step-content { width: 100%; }

/* Step header */
.step-header, .form-instructions{ margin-bottom: 1.25rem; }
.step-header__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  width: 100%;
}

.step-header__sub, .form-instructions{
  line-height: 1.2;
  a{
    color:var(--color-accent);
    &:hover, &:focus, &:active{
      color:var(--color-accent-2);
    }
  }
}

.step-indicator__label{
  margin-top:2rem;
  margin-bottom:1rem;
}

.reqAsterisk{
  color:var(--color-accent-3);
}

/* ---- Two-column form grid ------------------------------------------------ */
.two-col-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.5rem;
  align-items: center;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

/* ---- Field --------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .35rem; }

.field--full { grid-column: 1 / -1; }

.field__label {
  color: var(--color-text);
  padding: 1.25rem 0 0.25rem 0;
}

.field__input,
.field__select {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface);
  border: 2px solid var(--color-field-border);
  border-radius: 0;
  padding: .6rem .8rem;
  width: 100%;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  font-size: var(--font-size-body);
}
.field__input:focus,
.field__select:focus {
  border-color: var(--color-accent);
}
.field--error .field__input,
.field--error .field__select {
  border-color: var(--color-error);
}
.field__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}

/* Input with toggle button */
.field__input-wrap {
  position: relative;
  display: flex;
}
.field__input-wrap .field__input { padding-right: 2.6rem; }

.field__toggle-pw {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  cursor: pointer;
  color: var(--color-accent);
  padding: .5rem;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  font-weight: 600;
  border: 2px solid var(--color-accent);
  background: transparent;
    &:hover, &:focus, &:active{
      background: var(--color-accent);
      color:#ffffff;
    }
}

.field__hint {
  color: var(--color-text-muted);
  line-height: 1.4;
}

.field__error {
  color: var(--color-error);
  font-weight: 500;
}

/* ---- Password requirements ----------------------------------------------- */
.password-note {
  grid-column: 1 / -1;
  margin-top:2.5rem;
  margin-bottom: 1.25rem;
}

.password-requirements{
  column-count: 2;
  column-gap: 3rem;
  li{
    margin-bottom: 4px;
  }
}

/* ---- Alert --------------------------------------------------------------- */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  grid-column: 1 / -1;
}
.alert--error {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid rgba(229,62,62,.2);
}

/* ---- reCAPTCHA ----------------------------------------------------------- */
.recaptcha-wrap { 
  justify-content: flex-start; 
  padding: 2rem 0 1rem;
}

/* ---- Form actions -------------------------------------------------------- */
.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  padding: 0.75rem 2.5rem;
  border: 2px solid var(--color-btn-border);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  background: transparent;
  font-size: var(--font-size-body);
  font-family: inherit;
}

.btn--primary {
  color: var(--color-accent);
  margin-left: auto;
}
.btn--primary:hover,
.btn--primary:focus {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white !important;
  outline: none !important;
}

.btn--back {
  color: var(--color-accent);
  margin-right: auto;
  margin-left: unset;
}

/* ---- Confirmation page --------------------------------------------------- */
.step-content--confirm {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.confirm-icon {
  margin-bottom: 1.5rem;
  align-self: center;
}
.confirm-icon svg { width: 80px; height: 80px; }
.confirm-circle {
  animation: dash-circle .7s ease forwards .1s;
}
.confirm-check {
  animation: dash-check .4s ease forwards .75s;
}
@keyframes dash-circle {
  to { stroke-dashoffset: 0; }
}
@keyframes dash-check {
  to { stroke-dashoffset: 0; }
}

.confirm-text{
  text-align:left;
  p{
    margin-bottom: 0.35rem;
  }
}

/* ---- Help FAB ------------------------------------------------------------ */
.help-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 1000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-btn-help);
  color: #fff;
  border: none;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px;;
}
.help-fab svg { width: 22px; height: 22px; }
.help-fab:hover, .help-fab:active, .help-fab:focus {
  background: var(--color-accent);
}

/* ---- Terms and Conditons ------------------------------------------------------------ */
.terms-link {
  cursor: pointer;
  color: var(--color-accent);
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  appearance: initial;
  &:hover, &:focus, &:active{
    text-decoration: underline;
  }
}

/* ---- Responsive: 600-899px — same split, 1-col form --------------------- */
@media (max-width: 899px) {
  .layout { flex-direction: column; }

  .panel-left {
    width: 100%;
    min-height: 160px;
    flex-shrink: 0;
  }
  .panel-left__content { padding: 1.5rem 1.5rem; flex-direction: row; align-items: center; }
  .panel-left__tagline { display: none; }
  .panel-left__bottom{
    top: 0;
    height: 100%;
    width: 50%;
  }
  .panel-left__logos    {
    top: 0;
    padding: 1rem;
    height: 100%;
    object-fit: scale-down;
    background: rgba(255, 255, 255, 0.8);
  }

  .waves{
    display:none;
  }

  .panel-right {
    padding: 2rem 3rem;
  }

  .two-col-form {
    grid-template-columns: 1fr;
  }
  .field--full { grid-column: 1; }
  .panel-right {
    padding: 2rem 2rem 2.5rem;
  }
  .step-header__title { font-size: 2rem; }

  .password-requirements{
    column-count: 1;
  }

}

/* ---- Responsive: <600px — stacked --------------------------------------- */
@media (max-width: 599px) {
  .panel-left {
    min-height: 120px;
  }

  .panel-left__bottom{
    width: 100%;
  }

  .form-actions { flex-direction: column-reverse; }
  .btn--primary { width: 100%; justify-content: center; margin-left: 0; }

  .help-fab { bottom: 1rem; right: 1rem; }

  .waves{
      display: none;
    }
}

/* ---- Responsive: <400px — reduce padding -------------------------------- */
@media (max-width: 399px) {
    .panel-right {
        padding: 2rem;
    }
}
/* ---- Focus visible global ----------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
*:focus:not(:focus-visible) { outline: none; }

/* ---- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ==========================================================================
   ADDITIONS: Terms & Conditions, custom fields, checkbox, btn-link
   ========================================================================== */

/* ---- Checkbox field ------------------------------------------------------ */
.field__checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}

.field__checkbox {
  width: 24px;
  height: 24px;
  min-width: 24px;
  margin-top: .15rem;
  accent-color: var(--color-accent);
  cursor: pointer;
  border-radius: 3px;
}

.field__checkbox-label {
  color: var(--color-text);
  line-height: 1.5;
  cursor: pointer;
  font-weight: 500;
}

/* ---- Inline link-style button (T&C trigger) ------------------------------ */
.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-accent);
  font: inherit;
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
  display: inline;
}
.btn-link:hover  { color: var(--color-accent-h); }
.btn-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Terms row ----------------------------------------------------------- */
.terms-row {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

/* ---- SweetAlert2 terms modal content ------------------------------------ */
.swal2-terms-container .terms-modal-body {
  text-align: left;
  max-height: 55vh;
  overflow-y: auto;
  padding: .25rem .5rem;
  line-height: 1.7;
  color: var(--color-text);
}
.swal2-terms-container .terms-modal-body h2,
.swal2-terms-container .terms-modal-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 1rem 0 .35rem;
}
.swal2-terms-container .terms-modal-body p,
.swal2-terms-container .terms-modal-body li {
  margin-bottom: .5rem;
}

.swal-terms-popup, .swal-help-popup, .swal-camh-popup{
  border-radius: 0;
  color:var(--color-text);

  .swal2-close{
    color: var(--color-accent);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
    padding: 1rem;
    border: 2px solid var(--color-accent);
    border-radius: 0;
    margin: 1rem;
    &:hover, &:focus, &:active{
      color: white;
      background: var(--color-accent);
    }
    &:focus-visible{
      box-shadow:none;
    }
  }
}

.swal-terms-popup, .swal-camh-popup{
  width: 80%;
}

.swal-camh-popup{
  .swal2-cancel{
    --swal2-action-button-focus-box-shadow: none!important;
    background: var(--color-accent-3);
    border: 2px solid var(--color-accent-3);
    color: #ffffff;
    border-radius: 0;
    font-weight: 600;
    &:hover, &:focus, &:active{
      background: transparent;
      color:var(--color-accent)
    }
  }
}

/* ---- Multi-select checkbox group ---------------------------------------- */
.field__checkgroup {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.field__checkgroup:focus-within {
  border-color: var(--color-accent);
}
.field--error .field__checkgroup {
  border-color: var(--color-error);
}
.field__checkgroup legend {
  color: var(--color-text);
  width: 100%;
  margin-bottom: .35rem;
}
.field__checkgroup-options {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  gap: .3rem .75rem;
  clear: both;
  background: var(--color-surface);
  border: 2px solid var(--color-field-border);
  padding: .6rem .85rem .75rem;
}
.field__checkgroup-item {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--color-text);
  cursor: pointer;
  padding: .2rem .1rem;
  border-radius: var(--radius-sm);
}
.field__checkgroup-item:hover { color: var(--color-accent); }
.field__checkgroup-item input { flex-shrink: 0; cursor: pointer; }

@media (max-width: 599px) {
  .field__checkgroup-options { grid-template-columns: 1fr; }
}

/* ---- Specify field (hidden until triggered) ------------------------------ */
[data-specify-child] {
  /* Smooth reveal; hidden attr is toggled by JS */
  animation: fadeInField .8s ease;
}
@keyframes fadeInField {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Loading overlay
   ========================================================================== */
 
/*
 * The overlay is rendered visible in HTML (no `hidden` attribute) so it
 * covers the initial page load before any JavaScript runs.
 * overlay.js adds `hidden` on DOMContentLoaded and removes it on submit.
 *
 * [hidden] uses `display:none !important` in the HTML spec, so we only
 * need to define the visible state here.
 */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
 
.loading-overlay__spinner {
  width: 52px;
  height: 52px;
  color: #fff;
  animation: overlay-spin 0.9s linear infinite;
  /* Prevent the spinner from affecting layout flow if backdrop is ever
     changed to a non-fixed context. */
  flex-shrink: 0;
}
 
.loading-overlay__message {
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.925rem;
  font-weight: 400;
  letter-spacing: 0.015em;
  text-align: center;
  /* Constrain width so long French phrases don't span the full viewport. */
  max-width: 24ch;
  margin: 0;
}
 
@keyframes overlay-spin {
  to { transform: rotate(360deg); }
}

/* Hide Password Reveal/Hide on Edge */
input::-ms-reveal, input::-ms-clear { display: none; }