/*
 * Glass skin — signed-out pages that use _LayoutLanding: sign-in, patient portal, document verification.
 * Screen only; printing keeps the classic sheets.
 *
 * Composition: a calm colour field (emerald and graphite) with a whisper of eight-point-star
 * tilework, one glass panel floating on it, and one prominent control. Nothing else competes.
 */

/* ── Backdrop ─────────────────────────────────────────────────────────── */
body.landing-body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink-900);
  background-color: #f3f5f6;
  /* vmax keeps the light fields in proportion on any screen, from a phone to a wide desktop */
  background-image:
    radial-gradient(62vmax 62vmax at 10% 6%, rgba(var(--emerald-rgb), .26), transparent 62%),
    radial-gradient(58vmax 58vmax at 94% 98%, rgba(var(--lapis-rgb), .24), transparent 62%),
    radial-gradient(40vmax 40vmax at 86% 8%, rgba(120, 200, 190, .20), transparent 64%),
    radial-gradient(38vmax 38vmax at 6% 96%, rgba(150, 180, 230, .18), transparent 64%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}
/* Eight-point star lattice, faint, fading out towards the centre where the panel sits. */
body.landing-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%2325569e' stroke-opacity='.08' stroke-width='1'%3E%3Cpath d='M31 31h34v34H31z'/%3E%3Cpath d='M48 23.96 72.04 48 48 72.04 23.96 48z'/%3E%3Cpath d='M-17 -17h34v34h-34z'/%3E%3Cpath d='M0 -24.04 24.04 0 0 24.04 -24.04 0z'/%3E%3Cpath d='M79 -17h34v34H79z'/%3E%3Cpath d='M96 -24.04 120.04 0 96 24.04 71.96 0z'/%3E%3Cpath d='M-17 79h34v34h-34z'/%3E%3Cpath d='M0 71.96 24.04 96 0 120.04 -24.04 96z'/%3E%3Cpath d='M79 79h34v34H79z'/%3E%3Cpath d='M96 71.96 120.04 96 96 120.04 71.96 96z'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, transparent 0 30%, #000 100%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, transparent 0 30%, #000 100%);
}
.landing-header, .landing-main, .landing-footer { position: relative; z-index: 1; }

/* ── Header ───────────────────────────────────────────────────────────── */
.landing-header { flex-shrink: 0; }
.landing-header-inner { max-width: 1120px; margin: 0 auto; padding: 1.125rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.landing-brand {
  display: inline-flex; align-items: center; gap: .625rem;
  color: var(--ink-900); text-decoration: none;
  font-family: var(--meva-font-display); font-size: 1.0625rem; font-weight: 700; letter-spacing: -.012em;
}
.landing-brand:hover { color: var(--ink-900); text-decoration: none; }
/* Uploaded logos are opaque images on white; multiply lets the backdrop show through instead of a white box. */
.landing-brand-logo { max-height: 34px; max-width: 110px; object-fit: contain; mix-blend-mode: multiply; }
/* Glass brand (Partials/_GlassClinicBrand): logo or monogram tile + the clinic's name. */
.landing-brand.glass-brand { gap: .75rem; }
.glass-brand-logo {
  width: 40px; height: 40px; flex-shrink: 0; padding: 4px;
  object-fit: contain; border-radius: 12px; background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, .06), 0 4px 12px -4px rgba(16, 24, 40, .18);
}
.glass-brand-monogram {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--meva-font-display); font-size: .9375rem; font-weight: 700; letter-spacing: .01em; color: #fff;
  background: linear-gradient(160deg, var(--emerald-500) 0%, var(--emerald-700) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 1px 2px rgba(8, 102, 75, .3), 0 8px 18px -10px rgba(8, 102, 75, .6);
}
.glass-brand-name:empty { display: none; }
.landing-brand:focus-visible { outline: 2px solid var(--emerald-600); outline-offset: 4px; border-radius: 12px; }

/* ── The panel ────────────────────────────────────────────────────────── */
.landing-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem 1rem 3.5rem; }

.landing-card {
  position: relative;
  width: 100%;
  max-width: clamp(400px, 25vw, 452px);
  border-radius: 30px;
  background: rgba(255, 255, 255, .93);
  box-shadow:
    0 0 0 1px rgba(16, 24, 40, .05),
    0 2px 4px rgba(16, 24, 40, .04),
    0 18px 36px -18px rgba(16, 24, 40, .22),
    0 44px 90px -30px rgba(16, 40, 60, .30);
}
/* Rim light: a hairline that is bright where light would catch the glass edge. */
.landing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, .35) 38%, rgba(255, 255, 255, .15) 62%, rgba(255, 255, 255, .75) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.landing-card-header { padding: 2.5rem 2.25rem 0; text-align: center; color: var(--ink-900); }
.landing-card-title { margin: .625rem 0 0; font-family: var(--meva-font-family); font-size: .9375rem; font-weight: 500; letter-spacing: 0; color: var(--ink-500); }
.landing-card-body { padding: 1.625rem 2.25rem 2.125rem; }

/* Classic PNG wordmark, if a page still renders it: crop its wide empty margins. */
.mevamed-logo { object-fit: contain; flex-shrink: 0; display: block; }
.mevamed-logo--login-card { width: 216px; height: 64px; max-width: 100%; margin: 0 auto; object-fit: cover; object-position: center; mix-blend-mode: multiply; }
.mevamed-logo--landing-header { width: 132px; height: 38px; object-fit: cover; object-position: center; mix-blend-mode: multiply; }

/* ── Fields ───────────────────────────────────────────────────────────── */
.landing-card-body .form-label { margin-bottom: .4375rem; font-size: .8125rem; font-weight: 500; color: var(--ink-700); }
.landing-card-body .form-control,
.landing-card-body .input-group {
  border-radius: 14px;
  background-color: rgba(118, 118, 128, .12);
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .04);
  transition: background-color .15s ease, box-shadow .15s ease;
}
.landing-card-body .form-control {
  min-height: 48px;
  padding: .625rem .9375rem;
  border: 0;
  font-size: .9375rem;
  color: var(--ink-900);
}
.landing-card-body .form-control::placeholder { color: var(--ink-400); }
.landing-card-body .form-control:hover,
.landing-card-body .input-group:hover { background-color: rgba(118, 118, 128, .16); }
.landing-card-body .form-control:focus,
.landing-card-body .input-group:focus-within {
  background-color: #fff;
  box-shadow: 0 0 0 1.5px var(--emerald-600), 0 0 0 5px var(--meva-focus-ring);
  outline: 0;
}
.landing-card-body .input-group > .form-control,
.landing-card-body .input-group > .form-control:hover,
.landing-card-body .input-group > .form-control:focus { background: transparent; box-shadow: none; }
.landing-card-body .input-group > .btn {
  min-height: 48px; padding: 0 .9375rem;
  border: 0; border-radius: 0 14px 14px 0; background: transparent;
  color: var(--ink-500); font-size: 1rem;
}
.landing-card-body .input-group > .btn:hover { background: transparent; color: var(--ink-900); }
.landing-card-body .form-control.input-validation-error,
.landing-card-body .form-control.is-invalid { box-shadow: 0 0 0 1.5px var(--bad-600); background-color: #fff; }
.landing-card-body .form-control:-webkit-autofill,
.landing-card-body .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink-900);
  -webkit-box-shadow: 0 0 0 1000px #eef7f3 inset, 0 0 0 1.5px rgba(var(--emerald-rgb), .35);
  caret-color: var(--ink-900);
}
.landing-card-body .form-check { padding-left: 1.875rem; }
.landing-card-body .form-check-input { width: 1.125rem; height: 1.125rem; margin-top: .125rem; margin-left: -1.875rem; border-radius: 6px; border-color: rgba(60, 60, 67, .32); background-color: rgba(255, 255, 255, .8); }
.landing-card-body .form-check-input:checked { background-color: var(--emerald-600); border-color: var(--emerald-600); }
.landing-card-body .form-check-label { color: var(--ink-600); font-size: .875rem; }

/* ── The one prominent control ────────────────────────────────────────── */
.landing-card-body .btn.btn-primary, .landing-welcome .btn.btn-primary, .landing-hero-btn {
  --bs-btn-color: #fff; --bs-btn-bg: var(--emerald-600); --bs-btn-border-color: transparent;
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--emerald-600); --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--emerald-700); --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--emerald-600); --bs-btn-disabled-border-color: transparent;
  position: relative;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.005em;
  color: #fff;
  background-image: linear-gradient(180deg, #19a077 0%, #0b7d5b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    inset 0 -1px 0 rgba(0, 0, 0, .14),
    0 1px 2px rgba(8, 102, 75, .45),
    0 12px 26px -10px rgba(11, 125, 91, .65);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.landing-card-body .btn.btn-primary:hover, .landing-welcome .btn.btn-primary:hover, .landing-hero-btn:hover {
  color: #fff;
  filter: brightness(1.06) saturate(1.05);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    inset 0 -1px 0 rgba(0, 0, 0, .14),
    0 2px 4px rgba(8, 102, 75, .4),
    0 18px 34px -12px rgba(11, 125, 91, .7);
}
.landing-card-body .btn.btn-primary:active, .landing-welcome .btn.btn-primary:active, .landing-hero-btn:active {
  transform: translateY(0) scale(.985);
  filter: brightness(.95);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .22), 0 1px 2px rgba(8, 102, 75, .4);
}
.landing-card-body .btn.btn-primary:focus-visible, .landing-welcome .btn.btn-primary:focus-visible, .landing-hero-btn:focus-visible {
  outline: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    0 0 0 3px #fff,
    0 0 0 6px rgba(var(--emerald-rgb), .55);
}
.landing-card-body .btn.btn-primary i { transition: transform .2s ease; }
.landing-card-body .btn.btn-primary:hover i { transform: translateX(2px); }

.landing-card-body .validation-summary-errors { margin-bottom: 1rem; padding: .6875rem .875rem; border-radius: 12px; background: rgba(var(--bad-rgb), .08); box-shadow: inset 0 0 0 1px rgba(var(--bad-rgb), .16); color: #8a000e; font-size: .8125rem; }
.landing-card-body .validation-summary-errors ul { margin: 0; padding: 0; list-style: none; }
.landing-card-body .alert { border-radius: 12px; }
.landing-card-body p.small { font-size: .8125rem; }
.landing-card-body a.text-muted { color: var(--lapis-600) !important; font-weight: 500; }
.landing-card-body a.text-muted:hover { color: var(--lapis-800) !important; }

.landing-hero { max-width: 480px; text-align: center; }
.landing-hero-title { margin-bottom: .5rem; font-family: var(--meva-font-display); font-size: 2rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink-900); }
.landing-hero-sub { margin-bottom: 2rem; font-size: 1rem; color: var(--ink-500); }
.landing-hero-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .625rem 1.625rem; text-decoration: none; }
.landing-hero-btn:hover { text-decoration: none; }
.landing-welcome { max-width: 420px; text-align: center; }
.landing-welcome .lead { margin-bottom: 1.25rem; color: var(--ink-900); }

/* Other signed-out pages (patient portal, document verification) bring their own Bootstrap card: same panel language. */
.landing-main > .container { padding-bottom: 0 !important; }
.landing-main .card {
  --bs-card-border-radius: 24px;
  --bs-card-inner-border-radius: 23px;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, .05), 0 2px 4px rgba(16, 24, 40, .04), 0 18px 36px -18px rgba(16, 24, 40, .22), 0 44px 90px -30px rgba(16, 40, 60, .3);
}

/* ── Language, under the panel ────────────────────────────────────────── */
.landing-lang {
  display: inline-flex; align-items: center; gap: 2px;
  margin-top: 1.25rem; padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .8), 0 1px 2px rgba(16, 24, 40, .06);
}
.landing-lang-option {
  min-width: 84px; height: 32px; padding: 0 .875rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  color: var(--ink-600); font-size: .8125rem; font-weight: 500; text-decoration: none;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.landing-lang-option:hover { color: var(--ink-900); background: rgba(255, 255, 255, .7); text-decoration: none; }
.landing-lang-option[aria-current] {
  color: var(--ink-900); font-weight: 600; background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 4px 10px -4px rgba(16, 24, 40, .16);
}
.landing-lang-option:focus-visible { outline: 2px solid var(--emerald-600); outline-offset: 2px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.landing-footer { flex-shrink: 0; padding: .875rem 1rem 1.125rem; }
.landing-footer-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .375rem; font-size: .75rem; color: var(--ink-500); text-align: center; }
.landing-footer-brand { font-weight: 500; color: var(--ink-600); }
.landing-footer-brand .clinic-branding { justify-content: center; }
.landing-footer-brand .clinic-branding .text-muted { color: var(--ink-500) !important; }
.landing-footer-copy { margin: 0; color: var(--ink-600); }
.landing-footer-copy a { color: var(--ink-700); font-weight: 500; text-decoration: none; }
.landing-footer-copy a:hover { color: var(--ink-900); text-decoration: underline; }
.landing-footer-copy a:focus-visible { outline: 2px solid var(--emerald-600); outline-offset: 2px; border-radius: 4px; }
.landing-footer-sep { margin: 0 .375rem; color: var(--ink-400); }
/* Sign-in page only: no contact block under the form; the legal line stays, centred. */
body.landing-body:has(.landing-card form[action*="/Account/Login"]) .landing-footer-brand { display: none; }
body.landing-body:has(.landing-card form[action*="/Account/Login"]) .landing-footer-inner { justify-content: center; text-align: center; }

/* ── Glass material and motion (only where supported / wanted) ────────── */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .landing-card {
    background: rgba(255, 255, 255, .66);
    -webkit-backdrop-filter: blur(30px) saturate(190%);
    backdrop-filter: blur(30px) saturate(190%);
  }
  .landing-lang-btn {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
  }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .landing-card, .landing-lang-btn { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .landing-lang { background: #fff; box-shadow: 0 0 0 1px var(--line-strong); }
  .landing-lang-option[aria-current] { box-shadow: 0 0 0 1px var(--ink-400); }
  .landing-card-body .form-control, .landing-card-body .input-group { box-shadow: inset 0 0 0 1px var(--ink-400); }
}
@media (prefers-reduced-motion: no-preference) {
  .landing-card { animation: landing-panel-in .55s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes landing-panel-in {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to { opacity: 1; transform: none; }
  }
}
@media (max-width: 480px) {
  .landing-card { border-radius: 24px; }
  .landing-card-header { padding: 2rem 1.375rem 0; }
  .landing-card-body { padding: 1.375rem 1.375rem 1.625rem; }
  .landing-header-inner { padding: .875rem 1rem; }
}
