/* Tema login Doity — espelho de login_v2.css + admin_login_responsive.css */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --doity-red: #FF2B34;
  --doity-red-hover: #e0262e;
  --doity-text: #505151;
  --doity-border: #D9D9D9;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  height: 100%;
  color: var(--doity-text);
}

body.doity-kc-login {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
}

img { border: 0; }

/* ---- Esconde chrome padrão do Keycloak/PatternFly ---- */
#kc-header,
#kc-header-wrapper,
.pf-v5-c-login__header,
.pf-c-login__header,
.login-pf body::before {
  display: none !important;
}

/* ---- Layout principal split 50/50 ---- */
.login_wrapper {
  display: grid;
  grid-template-columns: 50% 50%;
}

.login_wrapper .login_content {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 100vh;
  overflow-y: scroll;
  background: #fff;
}

.login_wrapper .login_content::-webkit-scrollbar {
  width: 3px !important;
  opacity: 0 !important;
  transition: 0.5s ease-in-out;
}

.login_wrapper .login_content::-webkit-scrollbar-track {
  display: none;
}

.login_wrapper .login_content::-webkit-scrollbar-thumb {
  background-color: #E0E0E0;
  outline: 1px solid #EBEBEB;
  opacity: 0;
}

/* ---- Coluna do formulário ---- */
.users.login {
  width: 337px;
  max-height: 800px;
  padding-top: 91px;
  justify-self: center;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: max-content max-content max-content 1fr;
}

/* ---- Logo ---- */
.doity-logo-link {
  display: flex;
}

.logo {
  height: 39px;
  width: 100%;
  margin-bottom: 27px;
}

/* ---- Título ---- */
.Header_text {
  color: #000;
  font-size: 24px;
  font-weight: 500;
  width: 100%;
  text-align: center;
  margin-bottom: 27px;
}

/* ---- Mensagens de erro/sucesso ---- */
.mensagem {
  width: 100%;
  margin-bottom: 8px;
}

.alert {
  display: block;
  padding: 15px;
  width: 100%;
  margin-bottom: 12px;
  border-radius: 5px;
  line-height: 19px;
  font-size: 12px;
}

.alert-error {
  border: 1px solid #FF2B34;
  background-color: #FDEDED;
  color: #FF2B34;
}

.alert-success {
  background-color: #f6faf0;
  border: 1px solid #6aa500;
  color: #6aa500;
}

.alert-warning {
  border: 1px solid #f0ad4e;
  background-color: #fcf8e3;
  color: #8a6d3b;
}

/* ---- Labels ---- */
.input_label {
  color: #000;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  margin-bottom: 7px;
}

label {
  margin-bottom: 0;
}

/* ---- Inputs ---- */
.input_wrapper {
  width: 100%;
  height: 43px;
  border-radius: 10px;
  border: 1px solid var(--doity-border);
  background: #FFF;
  margin-bottom: 21px;
}

.input_wrapper:focus-within {
  border-color: var(--doity-red);
  box-shadow: 0 0 0 2px rgba(255, 43, 52, 0.12);
}

input[type=text],
input[type=password],
input[type=email] {
  background-color: transparent;
  border: none;
  border-radius: 10px;
  color: #555555;
  display: inline-block;
  font-size: 12px;
  height: 100%;
  line-height: 20px;
  padding: 4px 18px;
  vertical-align: middle;
  width: 100%;
  font-family: Inter, sans-serif;
  outline: none;
  box-shadow: none;
}

/* ---- Erro inline de campo ---- */
.field-error {
  display: block;
  margin: -14px 0 14px;
  color: var(--doity-red);
  font-size: 12px;
}

/* ---- Link "Esqueceu sua senha?" ---- */
.forgot {
  float: right;
  color: #737277;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  text-decoration: none;
  margin-bottom: 21px;
}

.forgot:hover {
  color: var(--doity-red);
}

/* ---- Botão Entrar / Sair ---- */
.submit {
  margin-top: 10px;
  width: 100%;
  height: 43px;
  border-radius: 10px;
  background: var(--doity-red);
  overflow: hidden;
  clear: both;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submit input[type="submit"],
.submit #kc-login,
.submit #kc-logout {
  background-color: transparent;
  color: #FFFFFF;
  cursor: pointer;
  font-size: 12px;
  line-height: 20px;
  margin: 0;
  text-align: center;
  border: none;
  border-radius: 10px;
  width: 100%;
  height: 100%;
  font-family: Inter, sans-serif;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
}

.submit a,
.submit .doity-logout-continue,
.submit #continue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 43px;
  background-color: transparent;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  font-family: Inter, sans-serif;
  line-height: 20px;
  text-align: center;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.submit a:hover,
.submit a:focus {
  color: #FFFFFF;
  text-decoration: none;
}

.submit:hover,
.submit:focus-within {
  background: var(--doity-red-hover);
}

/* ---- Tela "sem conta" (Google sem conta Doity) ---- */
.doity-no-account-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.doity-error-message {
  width: 100%;
  text-align: center;
}

.doity-no-account-sub {
  color: var(--doity-text);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 20px;
}

.doity-no-account-email-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F7F7F7;
  border: 1px solid var(--doity-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
  text-align: left;
}

.doity-no-account-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #505151;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.doity-no-account-email-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.doity-no-account-email-info strong {
  font-size: 13px;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doity-no-account-email-info small {
  font-size: 11px;
  color: #737277;
}

.doity-error-primary-btn {
  margin-top: 0;
  margin-bottom: 10px;
}

.doity-no-account-primary-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 43px;
  background-color: transparent;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  font-family: Inter, sans-serif;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.doity-no-account-primary-link:hover,
.doity-no-account-primary-link:focus {
  color: #fff;
  text-decoration: none;
}

.doity-error-secondary-btn {
  margin-bottom: 20px;
}

.doity-no-account-secondary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 43px;
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: 500;
  font-family: Inter, sans-serif;
  border: 1px solid var(--doity-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.doity-no-account-secondary-btn:hover,
.doity-no-account-secondary-btn:focus {
  border-color: #c5c5c5;
}

.doity-no-account-footer {
  font-size: 12px;
  color: var(--doity-text);
  margin: 0;
}

.doity-no-account-login-link {
  color: var(--doity-red);
  font-weight: 600;
  text-decoration: none;
}

.doity-no-account-login-link:hover {
  text-decoration: underline;
}

/* compat: botão Voltar legado */
.doity-error-back { margin-top: 0; }
.doity-error-back-btn {
  background-color: transparent;
  color: #FFFFFF;
  cursor: pointer;
  font-size: 12px;
  line-height: 20px;
  margin: 0;
  text-align: center;
  border: none;
  border-radius: 10px;
  width: 100%;
  height: 100%;
  font-family: Inter, sans-serif;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
}

/* ---- Tela de logout ---- */
.doity-logout-confirm {
  width: 100%;
}

.doity-logout-message {
  color: var(--doity-text);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  margin: 0 0 16px;
}

.doity-logout-clients {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  text-align: center;
  color: var(--doity-text);
  font-size: 14px;
}

.doity-logout-clients li {
  margin: 0;
  padding: 0;
}

.doity-logout-back {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
}

.doity-logout-back a {
  color: var(--doity-red);
  text-decoration: none;
}

.doity-logout-back a:hover {
  text-decoration: underline;
}

/* ---- Login social (Google / IdPs) ---- */
body.doity-kc-login .kc-social-section,
.kc-social-section {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 8px;
}

body.doity-kc-login .kc-social-divider,
.kc-social-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: #737277;
  font-size: 12px;
  text-align: center;
}

body.doity-kc-login .kc-social-divider::before,
body.doity-kc-login .kc-social-divider::after,
.kc-social-divider::before,
.kc-social-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--doity-border);
}

body.doity-kc-login .kc-social-divider span,
.kc-social-divider span {
  white-space: nowrap;
}

body.doity-kc-login .kc-social-list,
.kc-social-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.doity-kc-login .kc-social-list li,
.kc-social-list li {
  margin: 0 0 12px !important;
  padding: 0 !important;
  list-style: none !important;
}

body.doity-kc-login a.kc-social-btn,
.kc-social-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 43px !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  border: 1px solid var(--doity-border) !important;
  background: #fff !important;
  color: #000 !important;
  font-family: Inter, sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.doity-kc-login a.kc-social-btn:hover,
body.doity-kc-login a.kc-social-btn:focus,
.kc-social-btn:hover,
.kc-social-btn:focus {
  border-color: #c5c5c5 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
  color: #000 !important;
  text-decoration: none !important;
  background: #fff !important;
}

body.doity-kc-login .kc-social-icon,
.kc-social-icon {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

body.doity-kc-login svg.kc-social-icon--google,
body.doity-kc-login img.kc-social-icon--google,
.kc-social-icon--google {
  background-image: none !important;
  overflow: visible !important;
}

span.kc-social-icon--google {
  background-image: url("../img/google-icon.svg");
}

body.doity-kc-login .kc-social-label,
.kc-social-label {
  color: #000 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

/* ---- Blocos "Crie sua conta" / "Localize participante" ---- */
.box-new-account {
  padding: 15px 20px;
  position: relative;
  clear: both;
  text-align: center;
  line-height: 20px;
  font-size: 12px;
  color: #4A4A4A;
}

.box-new-account a {
  color: var(--doity-red);
  text-decoration: none;
  font-size: 12px;
}

/* ---- Painel direito (banner) ---- */
.login_banner {
  width: 100%;
  height: 100vh;
  background-image: url("../img/login_image.avif");
  background-size: cover;
  background-position: center;
}

/* ---- Sem botões PatternFly ---- */
.pf-c-button.pf-m-control,
.pf-v5-c-button.pf-m-control {
  display: none !important;
}

/* ---- Responsivo ---- */

@media only screen and (max-width: 768px) {
  .login_wrapper .mobile_banner {
    display: none;
  }

  .login_wrapper {
    grid-template-columns: 1fr;
    height: 100vh;
  }

  .users.login {
    padding-top: 42px;
    grid-template-rows: unset;
  }
}

@media only screen and (max-width: 450px) {
  .users.login {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-height: 600px) {
  .users.login {
    padding-top: 10px;
    margin: auto 0;
  }

  .box-new-account {
    padding: 5px 20px;
  }
}
