/* tn-login.css — Medit-Action login page */
/* Colori dinamici da variabili YOOtheme/UIkit */

:root {
  --tn-primary:       var(--uk-color-primary,       #76337D);
  --tn-primary-dark:  var(--uk-color-primary-hover,  #5a2260);
  --tn-text:          var(--uk-color-foreground,     #313E4F);
  --tn-muted:         var(--uk-color-muted,          #545962);
  --tn-emphasis:      var(--uk-color-emphasis,       #19365d);
  --tn-border:        #ccc;
  --tn-bg-card:       rgba(255,255,255,0.82);
}

/* __ BOTTONE AIUTO _________________________________________________ */
.help-me {
  font-size: 24pt !important;
  color: var(--tn-primary) !important;
  margin-top: 0px !important;
}

/* ── Reset minimale ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Body (usato solo in modalità full-page, non shortcode) ──────── */
.tn-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  color: var(--tn-text);
  padding: 24px 16px;
  overflow-x: hidden;
}

.tn-login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: var(--tn-login-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  transform: scale(1.05);
  pointer-events: none;
}

/* ── Layout principale ───────────────────────────────────────────── */
body.tn-login-body {
  margin: 0 auto;
  min-height: 100vh;
  display: block;
}

.tn-login-main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  padding: 20px 20px 5px 20px;
  margin: 0 auto;
}

/* ── Card ────────────────────────────────────────────────────────── */
.tn-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--tn-border);
  border-radius: 5px;
  padding: 32px 28px 24px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity .25s ease, transform .25s ease;
  margin: 0 auto;
}

.tn-card--hidden { display: none; }

/* ── Header card ─────────────────────────────────────────────────── */
.tn-card__header {
  text-align: center;
  margin-bottom: 10px;
}

.tn-card__header p {
  margin: 5px auto 10px auto !important;
}

.tn-card__header h1 {
  margin: 20px auto 5px auto !important;
}

/* Logo dal sito */
.tn-logo {
  display: block;
  width: auto;
  height: 52px;
  margin: 0 auto 16px;
  object-fit: contain;
}

.tn-card__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--tn-emphasis);
  letter-spacing: .03em;
  margin-bottom: 4px;
}

.tn-card__subtitle {
  font-size: 12px;
  color: var(--tn-muted);
  letter-spacing: .06em;
}

/* ── Body card ───────────────────────────────────────────────────── */
.tn-card__body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Label e input ───────────────────────────────────────────────── */
.tn-label {
  display: block;
  font-size: 12px;
  color: var(--tn-text);
  margin-bottom: 5px;
}

.tn-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--tn-border);
  border-radius: 4px;
  font-size: 14px;
  color: var(--tn-text);
  background: #fff;
  outline: none;
  transition: border-color .15s;
}

.tn-input:focus { border-color: var(--tn-primary); }

/* ── Bottoni ─────────────────────────────────────────────────────── */
.tn-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .15s, background .15s;
  margin-top: 12px;
}

.tn-btn--primary {
  background: var(--tn-primary);
  color: #fff;
}

.tn-btn--primary:hover    { background: var(--tn-primary-dark); }
.tn-btn--primary:disabled { opacity: .6; cursor: not-allowed; }

.tn-btn--ghost {
  background: transparent;
  color: var(--tn-muted);
  border: 1px solid var(--tn-border);
}

.tn-btn--ghost:hover { background: rgba(0,0,0,.04); }

/* Icona Telegram */
.tn-icon-telegram {
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm5.894 8.221-1.97 9.28c-.145.658-.537.818-1.084.508l-3-2.21-1.447 1.394c-.16.16-.295.295-.605.295l.213-3.053 5.56-5.023c.242-.213-.054-.333-.373-.12l-6.871 4.326-2.962-.924c-.643-.204-.657-.643.136-.953l11.57-4.461c.537-.194 1.006.131.833.941z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm5.894 8.221-1.97 9.28c-.145.658-.537.818-1.084.508l-3-2.21-1.447 1.394c-.16.16-.295.295-.605.295l.213-3.053 5.56-5.023c.242-.213-.054-.333-.373-.12l-6.871 4.326-2.962-.924c-.643-.204-.657-.643.136-.953l11.57-4.461c.537-.194 1.006.131.833.941z'/%3E%3C/svg%3E") center/contain no-repeat;
  display: inline-block;
  flex-shrink: 0;
}

/* Icona Email — stessa costruzione a disco dell'icona Telegram */
.tn-icon-email {
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zM6 8h12a1 1 0 0 1 1 1v.35l-7 4.2-7-4.2V9a1 1 0 0 1 1-1zm-1 3.68V15a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3.32l-7 4.2-7-4.2z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zM6 8h12a1 1 0 0 1 1 1v.35l-7 4.2-7-4.2V9a1 1 0 0 1 1-1zm-1 3.68V15a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3.32l-7 4.2-7-4.2z'/%3E%3C/svg%3E") center/contain no-repeat;
  display: inline-block;
  flex-shrink: 0;
}

/* Separatore "+" fra le due icone del pulsante OTP */
.tn-btn__plus {
  font-weight: 600;
  opacity: .65;
  margin: 0 1px;
  line-height: 1;
}

/* Telegram error notification */
#tn-identifier-error {
  font-weight: bold !important;
  color: red !important;
}

/* ── Divisore ────────────────────────────────────────────────────── */
.tn-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  color: var(--tn-muted);
  font-size: 11px;
}

.tn-divider::before,
.tn-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--tn-border);
}

.tn-divider--small { margin-top: 8px; }

/* Divisore forte: separa il login con password dal login con codice.
   Testo grande, filetto scuro e spesso. */
.tn-divider--strong {
  margin: 22px 0 18px;
  gap: 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tn-emphasis);
}

.tn-divider--strong::before,
.tn-divider--strong::after {
  height: 3px;
  border-radius: 2px;
  background: var(--tn-emphasis);
  opacity: .85;
}

/* ── Form password inline (sempre aperto nel passo 1) ────────────── */
.tn-inline-form {
  display: flex;
  flex-direction: column;
}

.tn-form-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--tn-emphasis);
  letter-spacing: .03em;
  margin: 4px 0 10px !important;
}

/* ── Dots navigazione ────────────────────────────────────────────── */
.tn-card__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.tn-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  transition: width .2s, background .2s;
}

.tn-dot--active {
  width: 18px;
  background: var(--tn-primary);
}

/* ── Badge canale ────────────────────────────────────────────────── */
.tn-channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e8f5f0;
  border: 1px solid #b8ddd0;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  color: #2a7a5a;
  margin: 0 auto 10px;
  align-self: center;
}

.tn-channel-badge--email {
  background: #fdf6e8;
  border-color: #e8d0a0;
  color: #7a5a1a;
}

/* ── Hint e testo OTP ────────────────────────────────────────────── */
.tn-otp-hint {
  font-size: 13px;
  color: var(--tn-muted);
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.5;
}

.tn-masked-email {
  font-family: monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--tn-emphasis);
  text-align: center;
  margin: -6px 0 10px;
  min-height: 20px;
}

/* ── Celle OTP ───────────────────────────────────────────────────── */
.tn-otp-cells {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 4px 0 6px;
}

.tn-otp-cell {
  width: 42px;
  height: 52px;
  text-align: center;
  font-size: 22px;
  font-family: monospace;
  font-weight: 500;
  color: var(--tn-text);
  border: 1px solid var(--tn-border);
  border-radius: 4px;
  background: #fff;
  outline: none;
  transition: border-color .15s;
  caret-color: transparent;
}

.tn-otp-cell:focus    { border-color: var(--tn-primary); border-width: 2px; }
.tn-otp-cell--filled  { border-color: var(--tn-primary); }
.tn-otp-cell--error   { border-color: #c0392b; }

/* ── Footer OTP ──────────────────────────────────────────────────── */
.tn-otp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.tn-timer {
  font-size: 11px;
  color: var(--tn-muted);
}

.tn-link {
  font-size: 11px;
  color: var(--tn-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.tn-link--reset {
  display: block;
  text-align: center;
  margin-top: 14px;
}

/* ── Spam hint ───────────────────────────────────────────────────── */
.tn-spam-hint {
  background: #fffbe8;
  border-left: 2px solid #e8d0a0;
  border-radius: 0 4px 4px 0;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--tn-text);
  line-height: 1.6;
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 8px;
}

.tn-spam-hint--hidden { display: none; }

/* ── Errori ──────────────────────────────────────────────────────── */
.tn-error {
  font-size: 12px;
  color: #c0392b;
  margin: 0;
}
 
/* Occupa spazio solo quando contiene davvero un messaggio:
   da vuoto il <p> collassa a 0 e non lascia buchi nel layout. */
.tn-error:not(:empty) {
  margin: 4px 0 6px;
}
/* ── Back link ───────────────────────────────────────────────────── */
.tn-back {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--tn-muted);
  cursor: pointer;
  padding: 12px 0 0;
  display: block;
}

.tn-back:hover { color: var(--tn-text); }

/* ── Password form ───────────────────────────────────────────────── */
.tn-password-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media ( max-width: 440px ) {
  .tn-card { padding: 24px 18px 18px; }
  .tn-otp-cell { width: 36px; height: 46px; font-size: 20px; }
}

.wpml-ls-link img {
  min-width: 40px !important;
  border: 1px solid #aeaeae;
}

.wpml-ls-legacy-list-horizontal {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wpml-ls-legacy-list-horizontal ul {
    max-width: 400px !important;
}