/* Shared styles for the sign-in pages. */

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

/* Colours, fonts and layout follow the Intercom Help Centre
   (intercom.customers.fpzero.co.uk), so the two sites feel like one. */
:root {
  --red: #E30613;
  --red-dark: #c10510;
  --text: #1a1a1a;
  --text-secondary: #595959;
  --border: rgba(26, 26, 26, 0.15);
  --content-width: 1000px;
}

body {
  font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--text);
}

/* The hero photo fades to white, as on the Help Centre home page. */
.hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0.55) 72%, #fff 100%),
    url('/hero-bg.jpg') center top / cover no-repeat,
    #111;
  min-height: 405px;
  padding: 0 24px 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.top-bar {
  width: 100%;
  max-width: var(--content-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.brand img {
  display: block;
  height: 40px;
  width: auto;
}

.top-link {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.top-link:hover {
  text-decoration: underline;
}

.hero h1 {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin: 36px 0 28px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.search-bar {
  width: 100%;
  max-width: 420px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 20px 20px 20px 52px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font: inherit;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  outline: none;
  pointer-events: none;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.9);
}

.search-bar .search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  color: #fff;
  z-index: 1;
}

/* The card sits over the bottom of the fade, like the collection cards. */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 24px 64px;
  margin-top: -110px;
  position: relative;
}

.login-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 40px 36px;
  width: 100%;
  max-width: 460px;
  height: fit-content;
}

.login-card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.login-card p {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.12);
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-btn:hover {
  background: var(--red-dark);
}

a.submit-btn {
  text-decoration: none;
}

.go-now {
  margin-top: 16px;
}

.submit-btn:disabled {
  background: #999;
  cursor: not-allowed;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.submit-btn.loading .spinner {
  display: inline-block;
}

.submit-btn.loading .btn-text {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-message {
  display: none;
  color: var(--red);
  font-size: 14px;
  text-align: center;
  margin-top: 16px;
  padding: 10px;
  background: #fef2f2;
  border-radius: 6px;
}

.error-message.visible {
  display: block;
}

.success-message {
  display: none;
  color: #166534;
  font-size: 14px;
  text-align: center;
  margin-top: 16px;
  padding: 10px;
  background: #f0fdf4;
  border-radius: 6px;
}

.success-message.visible {
  display: block;
}

.login-card .session-note {
  display: none;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin: 12px 0 0;
}

.login-card .session-note.visible {
  display: block;
}

.session-links {
  display: block;
  margin-top: 6px;
}


.form-group .hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.login-card .form-links {
  font-size: 14px;
  text-align: center;
  margin: 18px 0 0;
}

.form-links a,
.session-note a {
  color: var(--red);
}

.hidden {
  display: none;
}

footer {
  background: #000;
  color: #fff;
  padding: 56px 24px 64px;
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.footer-inner p {
  font-size: 17px;
}

.social {
  display: flex;
  gap: 18px;
  margin-top: 40px;
}

.social a {
  color: #fff;
  display: block;
  width: 18px;
  height: 18px;
}

.social a:hover {
  opacity: 0.75;
}

.social svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 600px) {
  .hero {
    min-height: 0;
    padding: 0 16px 120px;
  }

  .top-bar {
    padding: 16px 0;
  }

  .brand img {
    height: 28px;
  }

  .hero h1 {
    font-size: 24px;
    margin: 24px 0 20px;
  }

  .search-bar input {
    padding: 15px 16px 15px 46px;
    font-size: 16px;
  }

  .search-bar .search-icon {
    left: 16px;
  }

  main {
    padding: 0 16px 48px;
    margin-top: -90px;
  }

  .login-card {
    padding: 28px 20px;
  }

  footer {
    padding: 40px 16px 48px;
  }
}
