/* =========================================================
   TDLM Login Modal — Theme-aligned v2 (more polished)
   Keeps layout/behavior; improves aesthetics.
   ========================================================= */

:root {
  --tdlm-blue: #003a6b;
  --tdlm-blue-hover: #002f57;

  --tdlm-text: #111;
  --tdlm-border: rgba(0,0,0,.12);

  /* modal depth */
  --tdlm-shadow: 0 20px 65px rgba(0,0,0,.22);
  --tdlm-radius: 10px;
}

.tdlm-text-center { text-align: center; }

/* Overlay: slight dim so modal feels intentional */
.tdlm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.22);
  z-index: 99998;
  max-width: 100%;
}

/* Modal shell: keep centering, improve “card” look */
.tdlm-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  background: #fff;
  border-radius: var(--tdlm-radius);
  border: 1px solid var(--tdlm-border);
  box-shadow: var(--tdlm-shadow);

  z-index: 99999;

  /* a touch more balanced than “big padding everywhere” */
  padding: 18px 22px 18px;
  font-family: inherit;

  min-width: 320px;
  max-width: 520px;
  width: calc(100% - 2rem);

  color: var(--tdlm-text);
}

/* Subtle “header strip” inside the modal (doesn't change layout) */
.tdlm-modal::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 46px;
  background: linear-gradient(to bottom, rgba(0,0,0,.04), rgba(0,0,0,0));
  pointer-events: none;
  border-top-left-radius: var(--tdlm-radius);
  border-top-right-radius: var(--tdlm-radius);
}

/* Close button: proper icon button */
.tdlm-close {
  position: absolute;
  right: 12px;
  top: 10px;

  width: 34px;
  height: 34px;

  border: 1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.05);
  border-radius: 9999px;

  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #222;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tdlm-close:hover { background: rgba(0,0,0,.08); }

/* Titles */
.tdlm-h5 {
  margin: 8px 0 6px;
  font-size: 18px;
  line-height: 1.2;
}

.tdlm-h6 {
  margin: 0 0 14px;
  font-size: 14.5px;
  font-weight: 400;
  opacity: .82;
  text-transform: none;
  letter-spacing: normal;
}

/* Form spacing: slightly calmer */
.tdlm-form {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.08);
}

/* Labels */
.tdlm-label {
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 2px;
}

/* Inputs: refined */
.tdlm-input {
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: 8px;
  padding: 12px 12px;
  font-size: 14px;
  outline: none;
  background: rgba(0,0,0,.02);
}
.tdlm-input:focus { border-color: rgba(0,0,0,.40); }

/* Links row */
.tdlm-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  margin-bottom: 6px;
}
.tdlm-row-between { justify-content: space-between; }

.tdlm-link {
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: .18em;
  color: inherit;
  opacity: .9;
}
.tdlm-link:hover { opacity: 1; }

/* =========================================================
   Buttons (fix bold + reduce padding)
   ========================================================= */

/* Primary action (LOGIN / SEND) */
.tdlm-submit {
  margin-top: 2px;
  border: 0;
  border-radius: 8px;

  /* tighter vertical padding */
  padding: 0.46em 1.05em;

  /* REGULAR (you asked for non-bold) */
  font-size: 86%;
  font-weight: 400;

  cursor: pointer;
  background: var(--tdlm-blue);
  color: #fff;

  margin-bottom: 6px;
}
.tdlm-submit:hover { background: var(--tdlm-blue-hover); }

/* Error */
.tdlm-error {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(220, 53, 69, .10);
  color: #b02a37;
  font-size: 12.5px;
  border: 1px solid rgba(176, 42, 55, .25);
}

/* Signup row */
.tdlm-signup {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* Secondary action */
.tdlm-signup-btn {
  font-size: 12.5px;
  font-weight: 400;
  text-decoration: none;

  border: 1px solid rgba(0,0,0,.25);
  border-radius: 8px;

  padding: 0.42em 0.95em;

  color: var(--tdlm-text);
  background: transparent;
}
.tdlm-signup-btn:hover { background: rgba(0,0,0,.04); }

/* Optional trigger button (if used elsewhere) */
.tdlm-open-btn {
  border: 0;
  border-radius: 0;
  padding: 0.46em 1.05em;
  font-size: 86%;
  font-weight: 400;
  cursor: pointer;
  background: var(--tdlm-blue);
  color: #fff;
}
.tdlm-open-btn:hover { background: var(--tdlm-blue-hover); }
