/*
 * CLiCK website refinements.
 * Keep selectors scoped by data-path so ERPNext pages and portal features retain
 * their native layout and behaviour.
 */

/* Preserve the natural proportions of the home hero artwork. */
@media (min-width: 768px) {
  body[data-path="welcome"] .hero-with-right-image .hero-image {
    flex: 0 0 40%;
    width: 40%;
    height: auto;
    min-width: 0;
    max-width: 40%;
    object-fit: contain;
    align-self: center;
  }
}

/* Modern login, isolated from the rest of the ERPNext website. */
body[data-path="login"] {
  --click-ink: #151515;
  --click-muted: #6f6f6b;
  --click-line: #deded9;
  --click-soft: #f6f6f4;
  background: #fff;
  color: var(--click-ink);
}

body[data-path="login"] .navbar {
  min-height: 84px;
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid var(--click-line);
  box-shadow: none;
}

body[data-path="login"] .navbar .container {
  max-width: 1180px;
}

body[data-path="login"] .navbar-brand img {
  max-width: 164px !important;
  max-height: 58px !important;
}

body[data-path="login"] #page-login .page-content-wrapper {
  background:
    radial-gradient(circle at 50% 8%, rgba(0, 0, 0, 0.025), transparent 34rem),
    #fff;
}

body[data-path="login"] #page-login main.container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 85px);
  margin: 0 !important;
  padding: clamp(52px, 8vh, 92px) 24px 64px;
}

body[data-path="login"] #page-login .page_content,
body[data-path="login"] #page-login .page_content > div {
  width: 100%;
}

body[data-path="login"] #page-login section {
  width: min(100%, 440px);
  margin-inline: auto;
}

body[data-path="login"] .page-card-head {
  margin: 0 auto 24px;
  text-align: center;
}

body[data-path="login"] .page-card-head .app-logo {
  display: none;
}

body[data-path="login"] .page-card-head::before {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border: 1px solid var(--click-line);
  border-radius: 16px;
  background: #fff url("/assets/clickcg/images/favicon/favicon-master-512.png") center / 34px 34px no-repeat;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  content: "";
}

body[data-path="login"] .page-card-head h4 {
  margin: 0;
  color: var(--click-ink);
  font-size: clamp(1.75rem, 4vw, 2.05rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

body[data-path="login"] .login-subtitle {
  margin: 10px 0 0;
  color: var(--click-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

body[data-path="login"] .login-content.page-card {
  width: 100%;
  max-width: none;
  padding: 32px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--click-line);
  border-radius: 20px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.07);
}

body[data-path="login"] .page-card-body,
body[data-path="login"] .page-card-actions {
  padding: 0;
}

body[data-path="login"] .form-group {
  margin-bottom: 14px;
}

body[data-path="login"] .form-control {
  min-height: 52px;
  padding-top: 0;
  padding-bottom: 0;
  background: #fff !important;
  border: 1px solid #d4d4cf !important;
  border-radius: 12px;
  color: var(--click-ink);
  font-size: 0.95rem;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

body[data-path="login"] .form-control:focus {
  background: #fff !important;
  border-color: var(--click-ink) !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

body[data-path="login"] .field-icon {
  opacity: 0.64;
}

body[data-path="login"] .toggle-password {
  color: var(--click-muted);
  font-size: 0.8rem;
}

body[data-path="login"] .forgot-password-message {
  margin: 3px 0 22px;
}

body[data-path="login"] a {
  color: var(--click-ink);
  text-decoration-color: rgba(0, 0, 0, 0.28);
  text-underline-offset: 3px;
}

body[data-path="login"] a:hover {
  color: #000;
  text-decoration-color: #000;
}

body[data-path="login"] .btn-login,
body[data-path="login"] .btn-forgot,
body[data-path="login"] .btn-signup,
body[data-path="login"] .btn-login-with-email-link,
body[data-path="login"] .form-verify .btn-primary {
  min-height: 50px;
  border: 1px solid #111;
  border-radius: 12px;
  background: #151515;
  color: #fff;
  font-size: 0.94rem;
  font-weight: 600;
  box-shadow: none;
  transition: transform 160ms ease, background-color 160ms ease;
}

body[data-path="login"] .btn-login:hover,
body[data-path="login"] .btn-forgot:hover,
body[data-path="login"] .btn-signup:hover,
body[data-path="login"] .btn-login-with-email-link:hover,
body[data-path="login"] .form-verify .btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
}

body[data-path="login"] .login-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 18px;
  color: var(--click-muted) !important;
  font-size: 0.8rem;
}

body[data-path="login"] .login-divider::before,
body[data-path="login"] .login-divider::after {
  flex: 1;
  height: 1px;
  background: var(--click-line);
  content: "";
}

body[data-path="login"] .social-login-buttons {
  display: grid;
  gap: 10px;
}

body[data-path="login"] .btn-login-option {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  background: #fff !important;
  border: 1px solid var(--click-line) !important;
  border-radius: 12px;
  color: var(--click-ink);
  box-shadow: none;
}

body[data-path="login"] .btn-login-option:hover {
  background: var(--click-soft) !important;
  border-color: #c8c8c2 !important;
}

body[data-path="login"] .sign-up-message {
  margin-top: 24px;
  color: var(--click-muted);
  font-size: 0.88rem;
}

body[data-path="login"] .navbar-toggler {
  border-color: var(--click-line);
  border-radius: 12px;
}

/* ERPNext hides the website footer on login by default. Keep its functionality. */
body[data-path="login"] .web-footer {
  display: block !important;
  border-top: 1px solid var(--click-line);
}

@media (max-width: 575.98px) {
  body[data-path="login"] .navbar {
    min-height: 72px;
  }

  body[data-path="login"] .navbar-brand img {
    max-width: 142px !important;
    max-height: 52px !important;
  }

  body[data-path="login"] #page-login main.container {
    min-height: calc(100vh - 73px);
    padding: 38px 16px 44px;
  }

  body[data-path="login"] .login-content.page-card {
    padding: 24px 20px;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.055);
  }

  body[data-path="login"] .page-card-head::before {
    width: 52px;
    height: 52px;
    background-size: 31px 31px;
    border-radius: 15px;
  }
}

/* Public Click AI assistant */
#click-assistant {
  --click-ai-ink: #151515;
  --click-ai-muted: #6f6f6b;
  --click-ai-line: #deded9;
  --click-ai-soft: #f6f6f4;
  position: fixed;
  right: max(24px, calc(((100vw - 1140px) / 2) + 15px));
  bottom: 24px;
  z-index: 1050;
  color: var(--click-ai-ink);
  font-family: inherit;
}

.click-ai-launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 18px 0 10px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #151515;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.16);
}

.click-ai-mark,
.contact-guidance-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 1.15rem;
}

.click-ai-panel {
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(650px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--click-ai-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.16);
}

.click-ai-panel[hidden],
.click-ai-chat-view[hidden],
.click-ai-lead-view[hidden] {
  display: none !important;
}

.click-ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 74px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--click-ai-line);
}

.click-ai-header div {
  display: grid;
  gap: 2px;
}

.click-ai-header strong {
  font-size: 1rem;
}

.click-ai-header span,
.click-ai-disclaimer {
  color: var(--click-ai-muted);
  font-size: 0.76rem;
}

.click-ai-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--click-ai-line);
  border-radius: 12px;
  background: #fff;
  color: var(--click-ai-ink);
  font-size: 1.5rem;
  line-height: 1;
}

.click-ai-chat-view {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.click-ai-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
}

.click-ai-message {
  max-width: 86%;
  padding: 12px 14px;
  border: 1px solid var(--click-ai-line);
  border-radius: 15px;
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.5;
}

.click-ai-message-assistant {
  align-self: flex-start;
  border-bottom-left-radius: 5px;
  background: #fff;
}

.click-ai-message-user {
  align-self: flex-end;
  border-color: #151515;
  border-bottom-right-radius: 5px;
  background: #151515;
  color: #fff;
}

.click-ai-message.is-typing {
  color: var(--click-ai-muted);
}

.click-ai-handoff {
  align-self: flex-start;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #151515;
  border-radius: 12px;
  background: #fff;
  color: #151515;
  font-weight: 600;
}

.click-ai-suggestions {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.click-ai-suggestions button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--click-ai-line);
  border-radius: 999px;
  background: #fff;
  color: var(--click-ai-ink);
  font-size: 0.78rem;
}

.click-ai-composer {
  display: flex;
  gap: 8px;
  margin: 0 16px;
  padding: 8px;
  border: 1px solid #cfcfca;
  border-radius: 15px;
  background: #fff;
}

.click-ai-composer:focus-within {
  border-color: #151515;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}

.click-ai-composer input {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--click-ai-ink);
}

.click-ai-composer button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: #151515;
  color: #fff;
  font-size: 1.15rem;
}

.click-ai-disclaimer {
  margin: 9px 18px 13px;
  text-align: center;
}

.click-ai-lead-view {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.click-ai-back {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--click-ai-muted);
  font-size: 0.82rem;
}

.click-ai-lead-view h3 {
  margin: 22px 0 6px;
  font-size: 1.35rem;
}

.click-ai-lead-view > p {
  margin: 0 0 20px;
  color: var(--click-ai-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.click-ai-lead-form {
  display: grid;
  gap: 13px;
}

.click-ai-lead-form > label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--click-ai-ink);
  font-size: 0.78rem;
  font-weight: 600;
}

.click-ai-lead-form input,
.click-ai-lead-form select,
.click-ai-lead-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d4d4cf;
  border-radius: 11px;
  background: #fff;
  color: var(--click-ai-ink);
  font: inherit;
}

.click-ai-lead-form textarea {
  resize: vertical;
}

.click-ai-lead-form .click-ai-consent {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 8px;
  color: var(--click-ai-muted);
  font-weight: 400;
  line-height: 1.4;
}

.click-ai-consent input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
}

.click-ai-submit-lead {
  min-height: 48px;
  border: 1px solid #151515;
  border-radius: 12px;
  background: #151515;
  color: #fff;
  font-weight: 600;
}

.click-ai-submit-lead:disabled {
  opacity: 0.55;
}

.click-ai-lead-status {
  margin: 0;
  color: #8b1e1e;
  font-size: 0.82rem;
  line-height: 1.45;
}

.click-ai-lead-status.is-success {
  color: #27613b;
}

.click-ai-honeypot,
.contact-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

/* Modern contact and CRM lead form. */
body[data-path="contact"] #page-Contact\ Us\ Settings main.container {
  max-width: 1120px;
  padding-top: 28px;
  padding-bottom: 72px;
}

body[data-path="contact"] .page-header h1 {
  max-width: 760px;
  margin-top: 28px;
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1;
}

body[data-path="contact"] .contact-content > div:first-child {
  max-width: 680px;
  margin: 18px 0 34px;
  color: #666661;
  font-size: 1.04rem;
  line-height: 1.65;
}

body[data-path="contact"] .contact-content > div:first-child br {
  display: none;
}

body[data-path="contact"] .contact-content > .row {
  align-items: flex-start;
}

body[data-path="contact"] .contact-form-column,
body[data-path="contact"] .contact-guidance {
  padding: 30px;
  border: 1px solid #deded9;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.055);
}

body[data-path="contact"] .contact-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

body[data-path="contact"] .contact-form-column .form-group {
  margin-bottom: 16px;
}

body[data-path="contact"] .contact-form-column label {
  display: block;
  margin-bottom: 7px;
  color: #2a2a28;
  font-size: 0.82rem;
  font-weight: 600;
}

body[data-path="contact"] .contact-form-column .form-control {
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid #d4d4cf !important;
  border-radius: 12px;
  background: #fff !important;
  box-shadow: none;
}

body[data-path="contact"] .contact-form-column textarea.form-control {
  min-height: 150px;
}

body[data-path="contact"] .contact-form-column .form-control:focus {
  border-color: #151515 !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}

body[data-path="contact"] .contact-consent {
  display: flex !important;
  gap: 9px;
  align-items: flex-start;
  margin: 2px 0 18px !important;
  color: #6f6f6b !important;
  font-weight: 400 !important;
  line-height: 1.45;
}

body[data-path="contact"] .contact-consent input {
  margin-top: 3px;
}

body[data-path="contact"] .btn-send {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid #151515;
  border-radius: 12px;
  background: #151515;
  color: #fff;
  font-weight: 600;
}

body[data-path="contact"] .contact-guidance {
  background: #f8f8f6;
  box-shadow: none;
}

body[data-path="contact"] .contact-guidance-mark {
  margin-bottom: 24px;
  border: 1px solid #deded9;
}

body[data-path="contact"] .contact-guidance h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

body[data-path="contact"] .contact-guidance .contact-eyebrow {
  margin: 0 0 8px;
  color: #777772;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-path="contact"] .contact-guidance address {
  margin: 22px 0 18px;
  color: #555551;
  font-size: 0.94rem;
  font-style: normal;
  line-height: 1.7;
}

body[data-path="contact"] .contact-guidance address strong {
  color: #151515;
  font-weight: 650;
}

body[data-path="contact"] .contact-guidance hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid #deded9;
}

body[data-path="contact"] .contact-guidance p,
body[data-path="contact"] .contact-guidance li {
  color: #666661;
  font-size: 0.9rem;
  line-height: 1.55;
}

body[data-path="contact"] .contact-guidance ul {
  margin: 22px 0;
  padding-left: 18px;
}

body[data-path="contact"] .contact-guidance a {
  color: #151515;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 767.98px) {
  #click-assistant {
    right: 16px;
    bottom: 16px;
  }

  .click-ai-panel {
    height: min(680px, calc(100vh - 32px));
    border-radius: 18px;
  }

  body[data-path="contact"] .contact-field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  body[data-path="contact"] .contact-form-column,
  body[data-path="contact"] .contact-guidance {
    padding: 22px 18px;
    border-radius: 16px;
  }

  body[data-path="contact"] .contact-guidance {
    margin: 20px 15px 0;
  }

  body[data-path="contact"] .web-footer .footer-logo-extension .row {
    row-gap: 20px;
  }

  body[data-path="contact"] .web-footer .footer-logo-extension .text-left,
  body[data-path="contact"] .web-footer .footer-logo-extension .text-right {
    text-align: left !important;
  }

  body[data-path="contact"] .web-footer .footer-grouped-links > .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 36px;
    margin-right: 0;
    margin-left: 0;
  }

  body[data-path="contact"] .web-footer .footer-group {
    width: auto;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
  }
}

@media (max-width: 420px) {
  body[data-path="contact"] .web-footer .footer-grouped-links > .row {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* Password creation and signup completion use the same visual language. */
body[data-path="update-password"],
body[data-path="complete_signup"] {
  --click-ink: #151515;
  --click-muted: #6f6f6b;
  --click-line: #deded9;
  background: #fff;
  color: var(--click-ink);
}

body[data-path="update-password"] .navbar,
body[data-path="complete_signup"] .navbar {
  min-height: 84px;
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid var(--click-line);
  box-shadow: none;
}

body[data-path="update-password"] main.container,
body[data-path="complete_signup"] main.container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 85px);
  margin: 0 !important;
  padding: clamp(52px, 8vh, 92px) 24px 64px;
  background:
    radial-gradient(circle at 50% 8%, rgba(0, 0, 0, 0.025), transparent 34rem),
    #fff;
}

body[data-path="update-password"] .page_content,
body[data-path="complete_signup"] .page_content {
  width: 100%;
}

body[data-path="update-password"] .for-reset-password,
body[data-path="complete_signup"] .login-content.page-card {
  width: min(100%, 440px);
  max-width: 440px;
  margin-inline: auto;
}

body[data-path="update-password"] .page-card-head {
  margin: 0 auto 24px !important;
  padding: 0 !important;
  text-align: center;
}

body[data-path="update-password"] .page-card-head::before,
body[data-path="complete_signup"] .form-signin-heading::before {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border: 1px solid var(--click-line);
  border-radius: 16px;
  background: #fff url("/assets/clickcg/images/favicon/favicon-master-512.png") center / 34px 34px no-repeat;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  content: "";
}

body[data-path="update-password"] .page-card-head h4,
body[data-path="complete_signup"] .form-signin-heading {
  margin: 0;
  color: var(--click-ink);
  font-size: clamp(1.75rem, 4vw, 2.05rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

body[data-path="update-password"] .login-subtitle,
body[data-path="complete_signup"] .login-subtitle {
  margin: 10px 0 0;
  color: var(--click-muted);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.45;
}

body[data-path="update-password"] .for-reset-password > .page-card,
body[data-path="complete_signup"] .login-content.page-card {
  padding: 32px;
  background: #fff;
  border: 1px solid var(--click-line);
  border-radius: 20px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.07);
}

body[data-path="update-password"] .for-reset-password > .page-card {
  width: 100%;
  max-width: none;
}

body[data-path="complete_signup"] .login-content.page-card {
  width: min(100%, 440px);
  max-width: 440px;
}

body[data-path="complete_signup"] .form-signin-heading + .login-subtitle {
  margin: 10px 0 26px;
}

body[data-path="update-password"] .form-control,
body[data-path="complete_signup"] .form-control {
  min-height: 52px;
  padding-top: 0;
  padding-bottom: 0;
  background: #fff !important;
  border: 1px solid #d4d4cf !important;
  border-radius: 12px;
  color: var(--click-ink);
  box-shadow: none;
}

body[data-path="update-password"] .form-control:focus,
body[data-path="complete_signup"] .form-control:focus {
  border-color: var(--click-ink) !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

body[data-path="update-password"] .btn-update,
body[data-path="complete_signup"] .btn-complete-signup {
  min-height: 50px;
  border: 1px solid #111;
  border-radius: 12px;
  background: #151515;
  color: #fff;
  font-size: 0.94rem;
  font-weight: 600;
  box-shadow: none;
}

body[data-path="update-password"] .btn-update:disabled,
body[data-path="complete_signup"] .btn-complete-signup:disabled {
  border-color: #9a9a96;
  background: #9a9a96;
  opacity: 0.72;
}

body[data-path="update-password"] .sign-up-message {
  margin-top: 24px;
  color: var(--click-muted);
  font-size: 0.88rem;
}

body[data-path="update-password"] .web-footer,
body[data-path="complete_signup"] .web-footer {
  border-top: 1px solid var(--click-line);
}

@media (max-width: 575.98px) {
  body[data-path="update-password"] main.container,
  body[data-path="complete_signup"] main.container {
    min-height: calc(100vh - 73px);
    padding: 38px 16px 44px;
  }

  body[data-path="update-password"] .for-reset-password > .page-card,
  body[data-path="complete_signup"] .login-content.page-card {
    padding: 24px 20px;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.055);
  }
}
