:root {
  --kk-accent: #00c77f;
  --kk-border: rgba(85, 85, 85, 0.18);
  --kk-border-soft: rgba(85, 85, 85, 0.16);
  --kk-focus-border: rgba(0, 199, 127, 0.55);
  --kk-focus-glow: rgba(0, 199, 127, 0.18);
}

/* Layout */
.kk-portal {
  max-width: 860px;
  margin: 0 auto;
}

/* Nav tabs */
.kk-portal-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--kk-border-soft);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.02);
  margin: 0 0 16px;
}

.kk-portal-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1;
  user-select: none;
}

.kk-portal-nav a:hover {
  border-color: rgba(85, 85, 85, 0.18);
  background: rgba(0, 0, 0, 0.03);
}

/* Active tab based on ?view=... */
.kk-portal[data-view='login'] .kk-tab-login,
.kk-portal[data-view='request'] .kk-tab-request,
.kk-portal[data-view='forgot'] .kk-tab-forgot,
.kk-portal[data-view='reset'] .kk-tab-login {
  background: #fff;
  border-color: rgba(85, 85, 85, 0.22);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Boxes */
.kk-box {
  padding: 16px;
  border: 1px solid var(--kk-border-soft);
  border-radius: 12px;
  background: #fff;
  margin: 14px 0;
}

/* Messages */
.kk-ok {
  border-color: rgba(0, 128, 0, 0.22);
  background: rgba(0, 128, 0, 0.04);
}
.kk-err {
  border-color: rgba(200, 0, 0, 0.22);
  background: rgba(200, 0, 0, 0.04);
}

/* Forms */
.kk-form {
  display: grid;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

/* Inputs */
.kk-form input[type='text'],
.kk-form input[type='email'],
.kk-form input[type='password'],
.kk-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--kk-border);
  border-radius: 10px;
  box-sizing: border-box;
  background: #fff;
  box-shadow: none;
}

.kk-form input:focus,
.kk-form select:focus {
  outline: none;
  border-color: var(--kk-focus-border) !important;
  box-shadow: 0 0 0 4px var(--kk-focus-glow);
}

/* Buttons */
.kk-form button {
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.kk-form button:hover {
  filter: brightness(0.98);
}

.kk-form button:active {
  transform: translateY(1px);
}

/* Remember me */
.kk-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 0;
  cursor: pointer;
  user-select: none;
}

.kk-remember input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

/* =========================================================
   Split email: ONE combined control (wrapper has border)
   ========================================================= */
.kk-email-split {
  display: grid;
  grid-template-columns: 1fr 55%;
  align-items: stretch;

  border: 1px solid var(--kk-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.kk-email-split input#kk_email_id,
.kk-email-split select#kk_domain {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  height: 48px;
  padding: 12px 14px;
  background: transparent;
}

.kk-email-split select#kk_domain {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  padding-right: 54px;
  background-image: url('../icons/kk__arrow-down.svg');
  background-repeat: no-repeat;
  background-position: right 16px center;

  cursor: pointer;
}

.kk-email-split select#kk_domain::-ms-expand {
  display: none;
}

.kk-email-split:focus-within {
  border-color: var(--kk-focus-border) !important;
  box-shadow: 0 0 0 4px var(--kk-focus-glow);
}

/* Password */
.kk-password {
  position: relative;
}

.kk-password input {
  padding-right: 52px !important;
}

.kk-password-toggle {
  position: absolute;
  right: 1px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 38px !important;
  height: 38px !important;
  border: 0 !important;
  box-shadow: none !important;
  background: #fff;
  border-radius: 999px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

.kk-password-toggle:hover {
  background: rgba(0, 0, 0, 0.03);
}

.kk-password-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--kk-focus-glow);
}

/* Icons */
.kk-eye {
  display: none;
  width: 18px;
  height: 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

.kk-eye-open {
  display: block;
  background-image: url('../icons/kk__eye-open.svg');
}

.kk-eye-closed {
  background-image: url('../icons/kk__eye-closed.svg');
}

.kk-password.is-shown .kk-eye-open {
  display: none;
}
.kk-password.is-shown .kk-eye-closed {
  display: block;
}

/* Client top bar */
.kk-client-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kk-client-title {
  margin: 18px 0 10px;
}

.kk-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(85, 85, 85, 0.18);
  background: #fff;
  font-weight: 600;
}
.kk-logout-btn:hover {
  background: rgba(0, 0, 0, 0.03);
}

.kk-resource-list {
  margin: 0;
  padding-left: 18px;
}
.kk-resource-list li {
  margin: 8px 0;
}

.kk-client-meta {
  display: flex;
  gap: 4px;
}

body:not(.kk-client) .kk-client-only {
  display: none !important;
}

/* =========================================================
   Knock Knock – WP 2FA Validate Form (scoped to /client/)
   Page post ID: 1984
   ========================================================= */
article#post-1984 #login-bg-bdk,
article#post-1984 a#login-logo-bdk {
  display: none;
}

article#post-1984 .login-header {
  width: 100%;
  min-width: 98vw;
  margin: 64px auto;
}

article#post-1984 #login {
  width: 400px;
}

article#post-1984 form#loginform {
  max-width: 520px;
  margin: 24px auto;
  padding: 18px 18px 14px;

  border: 1px solid rgba(85, 85, 85, 0.12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

article#post-1984 form#loginform p {
  margin: 0 0 12px;
  color: rgba(17, 17, 17, 0.75);
  line-height: 1.45;
}

article#post-1984 form#loginform p strong {
  color: rgba(17, 17, 17, 0.9);
}

article#post-1984 form#loginform label {
  display: inline-block;
  font-weight: 700;
  margin: 0 0 8px;
  color: rgba(17, 17, 17, 0.9);
}

article#post-1984 form#loginform input#authcode {
  width: 100%;
  height: 48px;
  padding: 12px 14px;
  border-radius: 12px;

  border: 1px solid rgba(85, 85, 85, 0.16);
  background: #fff;
  box-sizing: border-box;

  font-size: 16px;
  letter-spacing: 0.1em;
}

article#post-1984 form#loginform input#authcode:focus {
  outline: none;
  border-color: var(--kk-focus-border);
  box-shadow: 0 0 0 4px var(--kk-focus-glow);
}

/* Buttons container */
article#post-1984 form#loginform p.submit {
  margin-top: 14px;
  margin-bottom: 10px;
}

article#post-1984 form#loginform input[type='submit'].button,
article#post-1984 form#loginform input[type='submit'].button-primary {
  appearance: none;
  -webkit-appearance: none;

  border-radius: 999px !important;
  padding: 12px 16px !important;
  height: auto !important;

  font-weight: 800 !important;
  letter-spacing: 0.01em;

  cursor: pointer;
  transition:
    transform 0.08s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    filter 0.15s ease;
}

article#post-1984 form#loginform input#wp-submit {
  width: 100%;

  border: 1px solid rgba(0, 199, 127, 0.45) !important;
  background: rgba(0, 199, 127, 0.16) !important;
  color: #0a4b34 !important;

  box-shadow: 0 10px 22px rgba(0, 199, 127, 0.14);
}

article#post-1984 form#loginform input#wp-submit:hover {
  border-color: rgba(0, 199, 127, 0.65) !important;
  background: rgba(0, 199, 127, 0.2) !important;
  box-shadow: 0 14px 28px rgba(0, 199, 127, 0.18);
}

article#post-1984 form#loginform input#wp-submit:active {
  transform: translateY(1px);
}

article#post-1984 form#loginform p.\32 fa-email-resend {
  margin-top: 0;
}

article#post-1984 form#loginform input[name='wp-2fa-email-code-resend'] {
  width: 100%;

  border: 1px solid rgba(85, 85, 85, 0.18) !important;
  background: rgba(0, 0, 0, 0.03) !important;
  color: rgba(17, 17, 17, 0.85) !important;

  box-shadow: none;
}

article#post-1984 form#loginform input[name='wp-2fa-email-code-resend']:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(85, 85, 85, 0.26) !important;
}

article#post-1984 form#loginform br {
  display: none;
}

/* =========================================================
   Knock Knock – WP 2FA Setup Form (front-end)
   Scope: .kk-client-body.kk-wp2fa
   ========================================================= */

.kk-client-body.kk-wp2fa {
  padding: 22px 0;
  font-family: 'FTDbody' !important;
}

.kk-client-body.kk-wp2fa h3 {
  font-family: 'FTDbody' !important;
  margin: 0 0 14px;
  color: rgba(17, 17, 17, 0.9);
}

.kk-client-body.kk-wp2fa a.learn_more_link {
  display: none !important;
}

.kk-client-body.kk-wp2fa a {
  font-family: 'FTDbody' !important;

  text-decoration: none;
}

/* Turn the WP table into card rows */
.kk-client-body.kk-wp2fa table.form-table,
.kk-client-body.kk-wp2fa table.wp-2fa-user-profile-form {
  font-family: 'FTDbody' !important;
  width: 100%;
  border: 0 !important;
  border-collapse: separate;
  border-spacing: 0 10px;
  margin: 0;
}

.kk-client-body.kk-wp2fa table.form-table th,
.kk-client-body.kk-wp2fa table.wp-2fa-user-profile-form th {
  font-family: 'FTDbody' !important;
  border: 0 !important;
  width: 240px;
  font-weight: 800;
  color: rgba(17, 17, 17, 0.9);
}

.kk-client-body.kk-wp2fa table.form-table td,
.kk-client-body.kk-wp2fa table.wp-2fa-user-profile-form td {
  font-family: 'FTDbody' !important;
  border: 0 !important;
}

/* Buttons: make every WP2FA button match KK buttons */
.kk-client-body.kk-wp2fa .button,
.kk-client-body.kk-wp2fa a.button,
.kk-client-body.kk-wp2fa button.button,
.kk-client-body.kk-wp2fa .wp-2fa-button-primary,
.kk-client-body.kk-wp2fa .wp-2fa-button-secondary {
  font-family: 'FTDbody' !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 12px 14px !important;
  border-radius: 999px !important;
  line-height: 1 !important;

  font-weight: 800 !important;
  border: 1px solid rgba(85, 85, 85, 0.18) !important;
  background: #fff !important;
  color: rgba(17, 17, 17, 0.9) !important;

  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
  cursor: pointer;
  transition:
    transform 0.08s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    filter 0.15s ease;
}

.kk-client-body.kk-wp2fa .button:hover,
.kk-client-body.kk-wp2fa a.button:hover,
.kk-client-body.kk-wp2fa button.button:hover {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(85, 85, 85, 0.26) !important;
}

.kk-client-body.kk-wp2fa .button:active,
.kk-client-body.kk-wp2fa a.button:active,
.kk-client-body.kk-wp2fa button.button:active {
  transform: translateY(1px);
}

/* Primary buttons */
.kk-client-body.kk-wp2fa .button.button-primary,
.kk-client-body.kk-wp2fa a.button.button-primary,
.kk-client-body.kk-wp2fa .wp-2fa-button-primary {
  font-family: 'FTDbody' !important;
  border-color: rgba(0, 199, 127, 0.45) !important;
  background: rgba(0, 199, 127, 0.16) !important;
  color: #0a4b34 !important;
  box-shadow: 0 10px 22px rgba(0, 199, 127, 0.14) !important;
}

.kk-client-body.kk-wp2fa .button.button-primary:hover,
.kk-client-body.kk-wp2fa a.button.button-primary:hover,
.kk-client-body.kk-wp2fa .wp-2fa-button-primary:hover {
  font-family: 'FTDbody' !important;
  border-color: rgba(0, 199, 127, 0.65) !important;
  background: rgba(0, 199, 127, 0.2) !important;
  box-shadow: 0 14px 28px rgba(0, 199, 127, 0.18) !important;
}

/* Wizard cards/pills */
.kk-client-body.kk-wp2fa .option-pill {
  border: 1px solid var(--kk-border-soft);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.kk-client-body.kk-wp2fa .option-pill h3 {
  margin: 0 0 6px;
}

/* Inputs in wizard */
.kk-client-body.kk-wp2fa input[type='tel'],
.kk-client-body.kk-wp2fa input[type='text'],
.kk-client-body.kk-wp2fa input[type='password'],
.kk-client-body.kk-wp2fa select,
.kk-client-body.kk-wp2fa textarea {
  font-family: 'FTDbody' !important;
  border: 1px solid var(--kk-border) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  box-shadow: none !important;
  background: #fff !important;
  max-width: 520px;
}

.kk-client-body.kk-wp2fa input:focus,
.kk-client-body.kk-wp2fa select:focus,
.kk-client-body.kk-wp2fa textarea:focus {
  outline: none !important;
  border-color: var(--kk-focus-border) !important;
  box-shadow: 0 0 0 4px var(--kk-focus-glow) !important;
}

/* Backup codes */
.kk-client-body.kk-wp2fa textarea.app-key,
.kk-client-body.kk-wp2fa #backup-codes-wrapper {
  min-height: 140px;
  width: 100%;
  font-family: 'FTDbody' !important;
}
.kk-client-body.kk-wp2fa
  .wp2fa-modal.enable_styling
  .radio-cells.max-3
  .option-pill {
  border: 0 !important;
}

.wp-2fa-configuration-form .button.enable_styling:hover {
  border: 0 !important;
}

/* Action rows */
.kk-client-body.kk-wp2fa .wp2fa-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  justify-content: center;
}

/* Modal (Micromodal) */
.kk-client-body.kk-wp2fa .modal__overlay {
  background: rgba(0, 0, 0, 0.55) !important;
}

.kk-client-body.kk-wp2fa .modal__container {
  font-family: 'FTDbody' !important;
  border-radius: 18px !important;
  border: 1px solid rgba(85, 85, 85, 0.16) !important;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28) !important;
  padding: 0 !important;
  background: #fff !important;
}

.kk-client-body.kk-wp2fa .modal__content {
  padding: 18px !important;
}

.kk-client-body.kk-wp2fa .modal__footer {
  padding: 14px 18px !important;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--kk-border-soft);
  background: #fff;
}

.kk-client-body.kk-wp2fa .modal__close {
  opacity: 0.7;
}
.kk-client-body.kk-wp2fa .modal__close:hover {
  opacity: 1;
}

/* Disabled */
.kk-client-body.kk-wp2fa .disabled,
.kk-client-body.kk-wp2fa [disabled] {
  opacity: 0.55;
  pointer-events: none;
}
 
/* Mobile */
@media (max-width: 600px) {
  .kk-portal-nav {
    border-radius: 16px;
    width: 100%;
    justify-content: center;
  }

  .kk-email-split {
    grid-template-columns: 1fr;
  }

  .kk-email-split select#kk_domain {
    border-left: 0 !important;
    border-top: 1px solid rgba(85, 85, 85, 0.14) !important;
  }
}

@media (max-width: 640px) {
  .kk-client-body.kk-wp2fa table.form-table,
  .kk-client-body.kk-wp2fa table.wp-2fa-user-profile-form,
  .kk-client-body.kk-wp2fa table.form-table tbody,
  .kk-client-body.kk-wp2fa table.wp-2fa-user-profile-form tbody,
  .kk-client-body.kk-wp2fa table.form-table tr,
  .kk-client-body.kk-wp2fa table.wp-2fa-user-profile-form tr,
  .kk-client-body.kk-wp2fa table.form-table th,
  .kk-client-body.kk-wp2fa table.wp-2fa-user-profile-form th,
  .kk-client-body.kk-wp2fa table.form-table td,
  .kk-client-body.kk-wp2fa table.wp-2fa-user-profile-form td {
    display: block;
    width: 100%;
  }

  .kk-client-body.kk-wp2fa table.form-table th,
  .kk-client-body.kk-wp2fa table.wp-2fa-user-profile-form th {
    border-right: 1px solid var(--kk-border-soft);
    border-bottom: 0;
    border-top-right-radius: 12px;
    border-bottom-left-radius: 0;
    width: 100%;
  }

  .kk-client-body.kk-wp2fa table.form-table td,
  .kk-client-body.kk-wp2fa table.wp-2fa-user-profile-form td {
    border-left: 1px solid var(--kk-border-soft);
    border-top: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 12px;
  }
}
