/*
 * MyCaly auth pages (login, sign-up, forgot / reset password).
 * Loaded after the app CSS by layouts/auth.blade.php and layouts/auth-signup.blade.php,
 * only when the child view opts in with @section('auth_split', ...).
 *
 *  .mc-auth         form card styling (all domains, custom-domain colours still win via #submit-btn rules)
 *  .mc-auth--split  two-column layout with the MyCaly brand panel (main domain only)
 *  .mc-auth-body    MyCaly page background / footer colours (main domain only)
 */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit/static/Outfit-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit/static/Outfit-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit/static/Outfit-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit/static/Outfit-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.mc-auth,
.mc-auth-body {
  --mc-primary: #4B6790;
  --mc-green: #1ACC8D;
  --mc-green-600: #3D5577;
  --mc-green-700: #3D5577;
  --mc-green-50: #EEF2F8;
  --mc-navy: #4B6790;
  --mc-navy-700: #3D5577;
  --mc-navy-900: #2A3A52;
  --mc-ink: #202020;
  --mc-body: #5F6470;
  --mc-muted: #8A90A0;
  --mc-line: #E6E9F0;
  --mc-surface: #F3F5F7;
  --mc-red: #E5484D;
  --mc-radius-sm: 10px;
  --mc-radius: 16px;
  --mc-radius-lg: 24px;
  --mc-shadow: 0 12px 32px -12px rgba(10, 21, 48, .18);
  --mc-shadow-lg: 0 30px 60px -20px rgba(0, 40, 121, .28);
  --mc-font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Page shell (main domain) ---------- */

body.mc-auth-body {
  background-color: var(--mc-surface) !important;
  font-family: var(--mc-font);
  color: var(--mc-body);
  display:block!important;
}

.mc-auth {
  font-family: var(--mc-font);
  overflow-x: clip;
  max-width: 100%;
}

.mc-auth__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  width: 100%;
}

.mc-auth__main > .authImage {
  flex: 1 0 auto;
  justify-content: center;
  margin: 0 !important;
}

/* ---------- Two-column split ---------- */

.flex-root.mc-auth.mc-auth--split {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
}

.mc-auth__brand {
  display: none;
}

@media (min-width: 992px) {
  .flex-root.mc-auth.mc-auth--split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .mc-auth__brand {
    display: block;
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    background:
      radial-gradient(120% 70% at 100% 100%, rgba(26, 203, 140, .45) 0%, rgba(26, 203, 140, 0) 60%),
      radial-gradient(80% 60% at 0% 0%, rgba(75, 103, 144, .18) 0%, rgba(26, 203, 140, 0) 55%),
      linear-gradient(160deg, var(--mc-navy) 0%, var(--mc-navy-700) 55%, var(--mc-navy-900) 100%);
  }

  /* Hide the duplicate logo above the card when the brand panel shows it. */
  .mc-auth--split .mc-auth-logo {
    display: none !important;
  }
}

.mc-auth__brand-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 40px clamp(32px, 4vw, 64px) 32px;
  overflow-y: auto;
}

.mc-auth__brand-logo {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 10px 16px;  
}

.mc-auth__brand-logo:hover { 
}

.mc-auth__brand-logo img {
  display: block;
  width: auto;
  height: 40px;
}

.mc-auth__brand-copy {
  margin-top: clamp(32px, 6vh, 64px);
  max-width: 480px;
}

.mc-auth__eyebrow {
  display: inline-block;
  padding: 6px 12px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--mc-green);
  background: rgba(26, 203, 140, .12);
  border: 1px solid rgba(26, 203, 140, .35);
  border-radius: 999px;
}

.mc-auth__title {
  margin: 0 0 12px;
  font-family: var(--mc-font);
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.mc-auth__subtitle {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .78);
}

.mc-auth__benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.mc-auth__benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .92);
}

.mc-auth__check {
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--mc-green);
  color: #fff;
}

.mc-auth__visual {
  margin: auto 0 0;
  padding-top: 32px;
}

.mc-auth__visual img {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  border-radius: var(--mc-radius);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .55);
}

.mc-auth__slogan {
  margin: 20px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
}

@media (min-width: 992px) and (max-height: 760px) {
  .mc-auth__visual { display: none; }
  .mc-auth__brand-copy { margin-top: 40px; }
}

/* Thin brand strip on small screens, where the panel is hidden. */
@media (max-width: 991.98px) {
  .mc-auth--split .mc-auth__main {
     background:radial-gradient(120% 70% at 100% 100%, rgba(26, 203, 140, .45) 0%, rgba(26, 203, 140, 0) 60%),
      radial-gradient(80% 60% at 0% 0%, rgba(75, 103, 144, .18) 0%, rgba(26, 203, 140, 0) 55%),
      linear-gradient(160deg, var(--mc-navy) 0%, var(--mc-navy-700) 55%, var(--mc-navy-900) 100%);
  }
  .mc-auth-lead {color:#ffffff!important;}
}

/* Embedded in an iframe: no brand panel, transparent shell (matches the layout's iframe rules). */
html.is-embedded-iframe .mc-auth__brand { display: none !important; }
html.is-embedded-iframe .flex-root.mc-auth.mc-auth--split { grid-template-columns: minmax(0, 1fr); }
html.is-embedded-iframe .mc-auth .mc-auth__main { min-height: 0; border-top: 0; }

/* ---------- Logo above the card (mobile / custom domains) ---------- */

.mc-auth .mc-auth-logo .image {
  display: inline-block;
}

.mc-auth-body .mc-auth-logo .logo {
  height: 44px !important;
  min-width: 0 !important;
  max-width: 100%;
}

.mc-auth-body .mc-auth-logo .image {
  margin-bottom: 24px !important;
}

/* ---------- Copy around the card (sign-up) ---------- */

.mc-auth-body .mc-auth-lead {
  color: var(--mc-body);
  font-size: 16px;
  margin-bottom: 20px;
}

.mc-auth-body .mc-auth-legal {
  color: var(--mc-muted) !important;
  text-align: center;
  max-width: 540px;
}

.mc-auth-body .mc-auth-legal a {
  color: var(--mc-green-700);
  font-weight: 500;
}

/* ---------- Form card ---------- */

.mc-auth .mc-auth-card {
  width: 100%;
  border-radius: var(--mc-radius-lg) !important;
  border: 1px solid var(--mc-line);
  box-shadow: var(--mc-shadow) !important;
}

@media (max-width: 575.98px) {
  .mc-auth .mc-auth-card {
    padding: 28px 20px !important;
    border-radius: var(--mc-radius) !important;
  }

  .mc-auth .authImage > .p-4,
  .mc-auth .authImage > .p-10 {
    padding: 24px 16px !important;
  }

  .mc-auth .authImage > .mt-12 {
    margin-top: 0 !important;
  }
}

.mc-auth .mc-auth-card h1 {
  font-family: var(--mc-font);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--mc-ink);
}

@media (max-width: 575.98px) {
  .mc-auth .mc-auth-card h1 { font-size: 24px; }
}

.mc-auth .mc-auth-card,
.mc-auth .mc-auth-card .fs-4 {
  color: var(--mc-body);
}

.mc-auth .mc-auth-card .fs-4 {
  font-size: 15px !important;
  line-height: 1.6;
}

.mc-auth .form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--mc-ink) !important;
  margin-bottom: 6px;
}

.mc-auth .form-control {
  height: 48px;
  padding: 12px 16px;
  font-family: var(--mc-font);
  font-size: 15px;
  color: var(--mc-ink);
  background-color: #fff;
  border: 1.5px solid var(--mc-line);
  border-radius: var(--mc-radius-sm) !important;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.mc-auth .form-control::placeholder {
  color: var(--mc-muted);
}

.mc-auth .form-control:focus {
  border-color: var(--mc-primary);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(75, 103, 144, .18);
  outline: 0;
}

.mc-auth .form-control.is-invalid {
  border-color: var(--mc-red);
}

.mc-auth .form-control.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(229, 72, 77, .15);
}

/* Room for the show / hide password icon. */
.mc-auth input[type="password"].form-control,
.mc-auth .position-relative > input.form-control,
.mc-auth .fv-row > input.form-control {
  padding-right: 48px;
}

/* Password eye toggle: pin it to the input, which is the last field in each wrapper. */
.mc-auth .change-type {
  top: auto !important;
  bottom: 0 !important;
  right: 0 !important;
  height: 48px;
  width: 48px;
  margin: 0 !important;
  transform: none !important;
  justify-content: center;
  color: var(--mc-muted) !important;
}

.mc-auth .col-md-6 > .change-type {
  right: calc(var(--bs-gutter-x, 1.5rem) * .5) !important;
}

.mc-auth .change-type:hover {
  color: var(--mc-green-700) !important;
}

/* ---------- Buttons & links ---------- */

.mc-auth .btn {
  font-family: var(--mc-font);
  border-radius: var(--mc-radius-sm) !important;
}

.mc-auth .btn.btn-primary {
  min-height: 48px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background-color: var(--mc-primary);
  border: 1px solid var(--mc-primary);
  box-shadow: 0 10px 20px -10px rgba(26, 203, 140, .7);
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.mc-auth .btn.btn-primary:hover,
.mc-auth .btn.btn-primary:focus {
  color: #fff;
  background-color: var(--mc-green-600);
  border-color: var(--mc-green-600);
}

.mc-auth .btn.btn-primary:focus-visible {
  box-shadow: 0 0 0 4px rgba(26, 203, 140, .3);
}

.mc-auth .btn.btn-primary:disabled,
.mc-auth .btn.btn-primary.disabled {
  opacity: .55;
  box-shadow: none;
}

.mc-auth .btn.btn-secondary {
  min-height: 48px;
  padding: 12px 24px;
  font-weight: 600;
  color: var(--mc-ink);
  background-color: #fff;
  border: 1.5px solid var(--mc-line);
}

.mc-auth .btn.btn-secondary:hover {
  color: var(--mc-green-700);
  background-color: #fff;
  border-color: var(--mc-primary);
}

.mc-auth .mc-auth-card a.link-info,
.mc-auth .mc-auth-card a.link-primary,
.mc-auth .mc-auth-card a.sign-in {
  color: var(--mc-green-700);
  font-weight: 500;
}

.mc-auth .mc-auth-card a.link-info:hover,
.mc-auth .mc-auth-card a.link-primary:hover,
.mc-auth .mc-auth-card a.sign-in:hover {
  color: var(--mc-navy);
}

.mc-auth .form-check-label {
  font-size: 14px;
}

/* Altcha / slider puzzle sit in the same visual family as the inputs. */
.mc-auth altcha-widget {
  --altcha-border-radius: var(--mc-radius-sm);
}

.mc-auth .altcha {
  border-radius: var(--mc-radius-sm) !important;
}

/* Flash / validation alerts. */
.mc-auth .alert {
  border-radius: var(--mc-radius-sm);
  font-size: 14px;
}

/* ---------- Footer ---------- */

.mc-auth-body .mc-auth footer {
  padding: 0 16px;
}

.mc-auth-body .mc-auth footer .copyright,
.mc-auth-body .mc-auth footer .text-white {
  color: var(--mc-muted) !important;
  font-size: 13px;
}

.mc-auth-body .mc-auth footer a {
  color: var(--mc-navy);
  font-weight: 500;
}

.mc-auth-body .mc-auth footer a:hover {
  color: var(--mc-green-700);
}

.mc-auth footer .row {
  margin-left: 0;
  margin-right: 0;
}
