/* Host Cloud client login — matches hostcloud.ie (navy + teal) */

:root {
  --hc-ink: #0b1220;
  --hc-navy: #080e1c;
  --hc-navy-2: #0f2a5f;
  --hc-navy-3: #0f3365;
  --hc-accent: #0e7490;
  --hc-accent-2: #0e6b8b;
  --hc-text: #f8fafc;
  --hc-muted: #94a3b8;
  --hc-soft: #334155;
  --hc-danger: #ef4444;
  --hc-ok: #16a34a;
  --hc-font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: hidden;
}

.login-body {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  font-family: var(--hc-font);
  color: var(--hc-text);
  background:
    radial-gradient(ellipse 85% 55% at 50% -12%, rgba(14, 116, 144, 0.42), transparent 58%),
    radial-gradient(ellipse 60% 45% at 100% 90%, rgba(15, 42, 95, 0.55), transparent 55%),
    radial-gradient(ellipse 50% 40% at -5% 70%, rgba(14, 107, 139, 0.22), transparent 50%),
    linear-gradient(165deg, #050910 0%, var(--hc-navy) 45%, #0c1832 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-x: hidden;
  overflow-y: hidden;
}

.login-glow {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(44px);
}
.login-glow-a {
  width: min(720px, 92vw);
  height: 420px;
  top: 0;
  left: 50%;
  transform: translate(-50%, -35%);
  background: radial-gradient(circle, rgba(14, 116, 144, 0.5) 0%, rgba(15, 51, 101, 0.2) 45%, transparent 70%);
}
.login-glow-b {
  width: 400px;
  height: 400px;
  right: 0;
  bottom: 0;
  transform: translate(15%, 20%);
  background: radial-gradient(circle, rgba(15, 42, 95, 0.55) 0%, transparent 68%);
}

.login-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.5;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.login-body.is-register .login-shell {
  max-width: 620px;
}

.login-body.is-register {
  justify-content: flex-start;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  overflow-y: auto;
}

/* Short viewports: allow scroll when sign-in content + captcha no longer fits */
@media (max-height: 760px) {
  .login-body:not(.is-register) {
    justify-content: flex-start;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    overflow-y: auto;
  }
}

.login-body.is-register .login-shell {
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 720px) {
  .login-body.is-register {
    padding-top: 2rem;
  }
}

.login-brand {
  text-align: center;
  animation: rise 0.7s ease both;
}

.login-logo {
  width: min(280px, 78vw);
  height: auto;
  display: block;
  margin: 0 auto 0.75rem;
  filter: brightness(0) invert(1) drop-shadow(0 10px 28px rgba(14, 116, 144, 0.35));
}

.login-logo--brand {
  width: min(280px, 78vw);
}

.login-tagline {
  color: var(--hc-muted);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.login-tagline::before,
.login-tagline::after {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hc-accent), transparent);
}

.login-card {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 30%),
    rgba(11, 18, 32, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 1.85rem;
  backdrop-filter: blur(18px);
  box-shadow:
    0 0 0 1px rgba(14, 116, 144, 0.12),
    0 24px 70px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(14, 116, 144, 0.14);
  animation: rise 0.7s ease 0.1s both;
  overflow: visible;
}

.login-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  color: #fff;
}

.login-sub {
  color: var(--hc-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

.login-badge {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, var(--hc-navy-2), var(--hc-accent));
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--hc-muted);
  font-weight: 500;
}

.login-form input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(5, 9, 16, 0.75);
  color: var(--hc-text);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input::placeholder {
  color: #64748b;
}

.login-form input:focus {
  border-color: rgba(14, 116, 144, 0.85);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.22);
}

.login-form select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(5, 9, 16, 0.75);
  color: var(--hc-text);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  outline: none;
  color-scheme: dark;
}

.login-form select option {
  background: #0f172a;
  color: #f8fafc;
}

.login-form select:focus {
  border-color: rgba(14, 116, 144, 0.85);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.22);
}

.login-section-label {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.login-section-label:first-child {
  margin-top: 0;
}

.btn-primary {
  margin-top: 0.35rem;
  border: 0;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, var(--hc-navy-2), var(--hc-accent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 28px rgba(14, 116, 144, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.login-captcha {
  display: grid;
  gap: 0.55rem;
}

.login-captcha-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--hc-muted);
  font-weight: 500;
}

.login-captcha-field input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(5, 9, 16, 0.75);
  color: var(--hc-text);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
}

.login-captcha-field input:focus {
  border-color: rgba(14, 116, 144, 0.85);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.22);
}

.login-captcha-default {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.login-captcha-img {
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
}

.login-captcha-refresh {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.72);
  color: #0e7490;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.login-captcha-refresh:hover:not(:disabled) {
  background: #fff;
  border-color: #7dd3e8;
}

.login-captcha-refresh:disabled {
  opacity: 0.6;
  cursor: wait;
}

.login-captcha-recaptcha {
  min-height: 78px;
  padding: 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.login-captcha-warn {
  margin: 0;
  font-size: 0.88rem;
  color: #fcd34d;
}

.alert {
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.alert-success {
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.35);
  color: #bbf7d0;
}

.login-foot {
  color: #64748b;
  font-size: 0.8rem;
  animation: rise 0.7s ease 0.2s both;
}

.login-foot a {
  color: #5eead4;
  text-decoration: none;
  font-weight: 500;
}
.login-foot a:hover {
  text-decoration: underline;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .login-card { padding: 1.35rem; }
  .login-body.is-register .login-shell {
    max-width: 100%;
  }
}

.account-choice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  margin-bottom: 0.65rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s, background 0.15s;
}
.account-choice:hover {
  border-color: rgba(14, 116, 144, 0.55);
  background: rgba(14, 116, 144, 0.08);
}
.account-choice input { margin-top: 0.25rem; accent-color: var(--hc-accent); }
.account-choice strong { display: block; color: #fff; }
.account-choice small { color: var(--hc-muted); }

.login-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.login-row-contact {
  grid-template-columns: 1fr 1fr;
}

/* Phone input on login/register */
.login-row .hc-phone-wrap {
  min-width: 0;
  position: relative;
}

.login-row .hc-phone-wrap.is-open {
  z-index: 30;
}

.login-row .hc-phone-label,
.login-field-phone .hc-phone-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--hc-muted);
}

.login-row .hc-phone-input {
  display: flex;
  align-items: stretch;
  min-height: 2.65rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  overflow: visible;
}

.login-row .hc-phone-input:focus-within {
  border-color: rgba(14, 116, 144, 0.75);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.18);
}

.login-row .hc-phone-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 100%;
  min-height: 2.65rem;
  padding: 0 0.55rem 0 0.65rem;
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px 0 0 10px;
  background: rgba(15, 23, 42, 0.35);
  font: inherit;
  font-size: 0.88rem;
  color: #e2e8f0;
  cursor: pointer;
  white-space: nowrap;
}

.login-row .hc-phone-trigger:hover {
  background: rgba(14, 116, 144, 0.15);
}

.login-row .hc-phone-dial {
  font-weight: 600;
  color: #e2e8f0;
}

.login-row .hc-phone-chevron {
  width: 0.85rem;
  height: 0.85rem;
  color: #94a3b8;
  flex: 0 0 auto;
}

.login-row .hc-phone-menu[hidden] {
  display: none !important;
}

.login-row .hc-phone-number {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  border-radius: 0 10px 10px 0;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  color: #fff;
  background: transparent;
}

.login-row .hc-phone-number:focus {
  outline: none;
}

.login-row .hc-phone-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  width: min(22rem, calc(100vw - 2rem));
  max-height: 16rem;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: #0f172a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.login-row .hc-phone-search-wrap {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.login-row .hc-phone-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-row .hc-phone-search {
  width: 100%;
  min-height: 2rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  font: inherit;
  font-size: 0.86rem;
  color: #fff;
  background: rgba(15, 23, 42, 0.65);
}

.login-row .hc-phone-search:focus {
  outline: none;
  border-color: rgba(14, 116, 144, 0.75);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.18);
}

.login-row .hc-phone-options {
  overflow-y: auto;
  max-height: 12.5rem;
  padding: 0.25rem 0;
}

.login-row .hc-phone-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  color: #e2e8f0;
  cursor: pointer;
}

.login-row .hc-phone-flag-img {
  display: block;
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  flex: 0 0 auto;
}

.login-row .hc-phone-option-label {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}

.login-row .hc-phone-option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-row .hc-phone-option:hover,
.login-row .hc-phone-option.is-selected {
  background: rgba(14, 116, 144, 0.18);
}

.login-row .hc-phone-option-dial {
  color: var(--hc-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.login-row .hc-phone-divider {
  height: 1px;
  margin: 0.25rem 0.65rem;
  background: rgba(148, 163, 184, 0.2);
}

.login-row .hc-phone-picker {
  position: relative;
}

.login-field-phone-cc input {
  text-align: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.login-form label em {
  font-style: normal;
  font-weight: 500;
  color: var(--hc-muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78em;
}

.login-marketing {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.login-marketing-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--hc-muted);
}

.login-marketing-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.86rem;
  color: #e2e8f0;
  cursor: pointer;
}

.login-marketing-check input {
  margin-top: 0.15rem;
  accent-color: var(--hc-accent);
  width: auto;
}

.login-switch {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--hc-muted);
}

.login-store-link {
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--hc-muted);
}

.login-switch a,
.login-store-link a {
  color: #67e8f9;
  text-decoration: none;
  font-weight: 600;
}

.login-switch a:hover,
.login-store-link a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .login-row {
    grid-template-columns: 1fr;
  }

  .login-row-contact {
    grid-template-columns: 1fr;
  }
}
