/* SELMA Web (VPS2) layout polish & dual-auth (Google v2 / Pixel v1 token) UI */

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.web-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid #3c6d6c;
  background: #0e2528;
  color: var(--aqua);
  white-space: nowrap;
}

.web-auth-btn.logged-out {
  background: var(--aqua);
  color: #092027;
  border-color: transparent;
  font-weight: 650;
}

.web-auth-btn:hover,
.web-auth-btn:focus-visible {
  border-color: var(--aqua);
}

.web-login-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 15px;
  margin: 0 0 12px;
  border: 1px solid #3c6d6c;
  border-radius: 15px;
  background: #0f242b;
  font-size: 13px;
  line-height: 1.5;
}

.web-login-banner p {
  margin: 0;
  color: #d6ecf0;
  flex: 1 1 220px;
}

.web-login-banner button {
  flex: none;
  padding: 8px 14px;
  font-size: 12px;
}

#desktopSettings.web-auth-dialog {
  width: min(92vw, 480px);
  max-height: 88vh;
  overflow: auto;
  padding: 22px 24px;
}

#desktopSettings.web-auth-dialog h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.web-auth-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0;
  background: #0b1722;
}

.web-auth-section h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.web-auth-google-slot {
  min-height: 44px;
  margin: 10px 0 6px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  overflow: hidden;
  color-scheme: light;
}

.web-auth-status {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.web-auth-status.ok {
  color: #9de8bd;
}

.web-auth-status.err {
  color: #ffb3b3;
}

.web-auth-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.web-auth-row button {
  margin: 0;
}

.web-auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 4px;
  cursor: pointer;
}

.web-auth-remember input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--aqua);
}

.web-auth-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 12px;
  background: #102a2e;
  border: 1px solid #356768;
  margin-bottom: 12px;
  font-size: 12px;
  color: #d6f4f0;
}

.web-auth-current button {
  margin: 0;
  padding: 6px 11px;
  font-size: 11px;
}

#dictate.listening {
  border-color: #f07f7f;
  color: #ffd2d2;
  background: #321116;
}

/* Desktop viewport polish: prevent outer page double-scroll and clipped composer buttons */
@media (min-width: 1050px) {
  body.web-cloud header {
    height: 76px;
  }

  body.web-cloud .presence,
  body.web-cloud[data-load="1"] .presence {
    top: 18px;
    height: calc(100vh - 110px);
    min-height: 460px;
  }

  body.web-cloud main {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 154px);
    min-height: 420px;
    overflow: auto;
  }

  body.web-cloud #dialog.selected {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
  }

  body.web-cloud #messages {
    min-height: 120px;
  }

  body.web-cloud footer {
    margin-top: 10px;
    padding: 10px 0 14px;
  }
}

/* Mobile portrait-top pills wrap cleanly without colliding with bottom caption */
@media (max-width: 599px) {
  body.web-cloud .portrait-top {
    gap: 6px;
  }

  body.web-cloud .portrait-top .pill {
    padding: 6px 9px;
    font-size: 10px;
  }

  body.web-cloud .web-auth-btn {
    padding: 7px 11px;
    font-size: 11px;
  }
}
