/*
FILE: web/css/runtime_global_topbar_home_auth_refine_v18_52.css
ROLE: global topbar home button visual + auth card readability refine
STATUS: active patch v18.52
DOES:
- styles injected Acasă button in global topbar
- keeps flow pages untouched by selector
- makes auth title readable white
- makes auth card smaller and cleaner
DOES NOT:
- touch backend, database, API, sessions, passwords, flow submit, jobs, storage
*/

:root{
  --abc-v1852-home-line: rgba(92,181,255,.46);
  --abc-v1852-home-bg: rgba(18,55,96,.72);
  --abc-v1852-home-bg-hover: rgba(30,78,132,.88);
  --abc-v1852-auth-title: #f7fbff;
  --abc-v1852-auth-muted: rgba(226,236,248,.72);
}

/* Injected home button: same global button family, before language. */
.abc-topbar-home-button-v18-52{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:36px !important;
  padding:8px 16px !important;
  border:1px solid var(--abc-v1852-home-line) !important;
  border-radius:14px !important;
  background:linear-gradient(180deg,var(--abc-v1852-home-bg),rgba(8,20,37,.78)) !important;
  color:#f4f9ff !important;
  font-weight:900 !important;
  font-size:14px !important;
  line-height:1 !important;
  text-decoration:underline !important;
  text-underline-offset:3px !important;
  text-shadow:0 1px 0 rgba(0,0,0,.42) !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.035) !important;
  cursor:pointer !important;
  white-space:nowrap !important;
}

.abc-topbar-home-button-v18-52:hover,
.abc-topbar-home-button-v18-52:focus{
  background:linear-gradient(180deg,var(--abc-v1852-home-bg-hover),rgba(10,28,52,.92)) !important;
  border-color:rgba(125,202,255,.68) !important;
  color:#fff !important;
  outline:0 !important;
}

/* Do not show injected home button on flow pages; flows already have their own working logic. */
body.private-client-account-page .abc-topbar-home-button-v18-52,
body.business-client-account-page .abc-topbar-home-button-v18-52,
body.private-partner-account-page .abc-topbar-home-button-v18-52,
body.business-partner-account-page .abc-topbar-home-button-v18-52,
body[data-page="flow"] .abc-topbar-home-button-v18-52{
  display:none !important;
}

/* Auth readability: title must be white, not black/hidden. */
body[data-page="auth_login"] .auth-dashboard-panel__title,
body[data-page="auth_notice"] .auth-dashboard-panel__title,
body[data-page="auth_login"] .auth-card h1,
body[data-page="auth_notice"] .auth-card h1,
body[data-page="auth_login"] .auth-panel-card h1,
body[data-page="auth_notice"] .auth-panel-card h1{
  color:var(--abc-v1852-auth-title) !important;
  text-shadow:0 1px 0 rgba(0,0,0,.45) !important;
  opacity:1 !important;
}

/* Auth secondary text should not be black on dark. */
body[data-page="auth_login"] .auth-panel-target,
body[data-page="auth_notice"] .auth-panel-target,
body[data-page="auth_login"] .auth-card p,
body[data-page="auth_notice"] .auth-card p{
  color:var(--abc-v1852-auth-muted) !important;
}

/* Auth card smaller and less bulky, keeping previous dark single-layer fix. */
body[data-page="auth_login"] .auth-panel-card,
body[data-page="auth_notice"] .auth-panel-card,
body[data-page="auth_login"] .auth-card,
body[data-page="auth_notice"] .auth-card,
body[data-page="auth_login"] .auth-card-dashboard,
body[data-page="auth_notice"] .auth-card-dashboard{
  width:min(390px,100%) !important;
  max-width:390px !important;
  padding:14px !important;
  border-radius:16px !important;
}

body[data-page="auth_login"] .auth-shell-content-panel,
body[data-page="auth_notice"] .auth-shell-content-panel,
body[data-page="auth_login"] .content-engine-panel,
body[data-page="auth_notice"] .content-engine-panel{
  min-height:auto !important;
  padding:10px !important;
}

/* Desktop layout can stay horizontal only when enough space exists. */
body[data-page="auth_login"] .auth-form-v9,
body[data-page="auth_notice"] .auth-form-v9{
  gap:10px !important;
}

body[data-page="auth_login"] .auth-form-v9 .client-form-field,
body[data-page="auth_notice"] .auth-form-v9 .client-form-field{
  padding:9px 10px !important;
}

body[data-page="auth_login"] .auth-form-v9 input,
body[data-page="auth_notice"] .auth-form-v9 input{
  min-height:38px !important;
  height:38px !important;
}

/* Use the same global header/topbar/footer family on auth pages. */
body[data-page="auth_login"] .site-header,
body[data-page="auth_notice"] .site-header,
body[data-page="auth_login"] .content-top-strip,
body[data-page="auth_notice"] .content-top-strip,
body[data-page="auth_login"] .site-footer,
body[data-page="auth_notice"] .site-footer{
  background:rgba(8,20,37,.96) !important;
  border-color:rgba(92,181,255,.22) !important;
}

/* Mobile: home button should wrap cleanly, not create side overflow. */
@media (max-width:760px){
  .abc-topbar-home-button-v18-52{
    width:auto !important;
    min-height:34px !important;
    padding:8px 13px !important;
    font-size:13px !important;
  }

  body[data-page="auth_login"] .auth-panel-card,
  body[data-page="auth_notice"] .auth-panel-card,
  body[data-page="auth_login"] .auth-card,
  body[data-page="auth_notice"] .auth-card{
    width:100% !important;
    max-width:100% !important;
    padding:13px !important;
  }
}
