/**
 * Minimal login-gate styles for password-guard (replaces full Kirby Panel CSS bundle).
 * Covers k-login dialog markup shared by site/templates/password-guard.php and the plugin template.
 * Values mirror the Kirby Panel login look (input/button/focus ring) so the gate matches
 * the rest of Visualbook without loading the ~192 KB Panel bundle.
 */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.25;
  color: #111;
}

.k-dialog.k-login.k-login-dialog {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 25rem;
  overflow: hidden;
}

.k-dialog-body {
  padding: 1.5rem;
}

.k-login-form {
  position: relative;
}

.k-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.k-label {
  cursor: pointer;
}

/* Input: white field with a light resting border and a blue focus ring,
   matching the Panel's .k-input. The border wraps the text input + the icon. */
.k-input {
  display: flex;
  align-items: center;
  line-height: 1.25;
  border: 0;
  background: #fff;
  border-radius: 6px;
  outline: 1px solid #d1d5da;
  color: #111;
  min-height: 2.5rem;
}

.k-input:focus-within {
  outline: 2px solid #63a1de;
}

.k-input-element {
  flex-grow: 1;
  min-width: 0;
}

.k-text-input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.5rem 0.75rem;
  font: inherit;
  outline: none;
  color: inherit;
}

.k-input-icon {
  display: flex;
  align-items: center;
  align-self: stretch;
  padding-inline: 0.5rem;
  flex-shrink: 0;
}

.k-icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
  flex-shrink: 0;
}

/* Password show/hide toggle: a bare <button> would render with the UA border
   box — reset it so only the icon shows (as in the Panel). */
.vb-password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
  color: #777;
}

.vb-password-toggle:hover {
  color: #111;
}

.k-login-buttons {
  display: flex;
  margin-top: 2.5rem;
}

.k-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.k-button-icon {
  display: flex;
  flex-shrink: 0;
}

.k-button-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.k-button.k-login-button {
  width: 100%;
  min-height: 2.25rem;
  padding: 0 1rem;
}

/* Positive filled button: pale Visualbook green with dark text (Panel parity). */
.k-button[data-theme="positive"][data-variant="filled"] {
  background: #c6e28d;
  color: #151d07;
}

.k-button[data-theme="positive"][data-variant="filled"]:hover {
  background: #bcdb7c;
}

.k-notification {
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  line-height: 1.25rem;
  width: 100%;
}

.k-notification[data-theme="error"] {
  background: #fcc;
  color: #000;
}

.k-notification[data-theme="positive"] {
  background: #d4edda;
  color: #000;
}

.k-notification p {
  flex-grow: 1;
  margin: 0;
  word-wrap: break-word;
}

.k-login-alert-close {
  display: flex;
  margin-inline-start: 1rem;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  color: inherit;
}
