/* Copyright (c) 2026 African Folder. All rights reserved. Proprietary - see LICENSE.txt. */
.eng-auth-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(18, 16, 15, 0.72);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.eng-auth-overlay.open { display: flex; }
.eng-auth-modal {
  position: relative;
  width: 100%; max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--paper, #FBF6EC);
  border-radius: 16px;
  padding: 36px 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.eng-auth-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: transparent; color: var(--muted, #8A817A);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.eng-auth-close:hover { background: var(--paper-2, #F5EEDE); }
.eng-auth-brand {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 20px;
  color: var(--ink, #12100F); margin-bottom: 22px;
}
.eng-auth-brand .brand-mark {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--terracotta, #C64C1E); color: var(--paper, #FBF6EC);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 700; font-size: 12px;
}
.eng-auth-title {
  font-family: 'Fraunces', serif; font-size: 26px; font-weight: 600;
  letter-spacing: -0.01em; color: var(--ink, #12100F);
  text-align: center; margin-bottom: 8px;
}
.eng-auth-sub {
  font-size: 15px; color: var(--ink-soft, #3A3532);
  text-align: center; margin-bottom: 24px; line-height: 1.4;
}
.eng-auth-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px; background: var(--paper, #FBF6EC);
  border: 1px solid var(--rule-2, #D9CFB8); border-radius: 100px;
  font-size: 15px; font-weight: 600; color: var(--ink, #12100F);
  cursor: pointer;
}
.eng-auth-google:disabled { opacity: 0.5; cursor: not-allowed; }
.eng-auth-google:not(:disabled):hover { border-color: var(--ink, #12100F); }
.eng-auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 18px 0;
  font-size: 13px; color: var(--muted, #8A817A); text-transform: lowercase;
}
.eng-auth-divider::before, .eng-auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--rule, #E8DFD1);
}
.eng-auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.eng-auth-modal input[type="text"],
.eng-auth-modal input[type="email"],
.eng-auth-modal input[type="password"] {
  width: 100%; padding: 12px 14px; margin-bottom: 10px;
  background: var(--paper-2, #F5EEDE); border: 1px solid var(--rule, #E8DFD1);
  border-radius: 10px; font-family: inherit; font-size: 15px; color: var(--ink, #12100F);
  outline: none;
}
.eng-auth-modal input:focus { border-color: var(--terracotta, #C64C1E); background: var(--paper, #FBF6EC); }
.eng-auth-password-wrap { position: relative; }
.eng-auth-password-wrap input { padding-right: 42px; }
.eng-auth-eye {
  position: absolute; right: 12px; top: 12px;
  background: none; border: none; color: var(--muted, #8A817A); cursor: pointer; padding: 2px;
}
.eng-auth-eye svg { width: 18px; height: 18px; }
.eng-auth-error {
  background: rgba(198,76,30,0.08); border: 1px solid rgba(198,76,30,0.3);
  color: var(--terracotta-2, #8B2E10); font-size: 13px;
  padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; line-height: 1.4;
}
.eng-auth-submit {
  width: 100%; padding: 13px; margin-top: 4px;
  background: var(--terracotta, #C64C1E); color: var(--paper, #FBF6EC);
  border: none; border-radius: 100px; font-size: 16px; font-weight: 700; cursor: pointer;
}
.eng-auth-submit:hover { background: var(--terracotta-2, #8B2E10); }
.eng-auth-submit:disabled { opacity: 0.6; cursor: wait; }
.eng-auth-link {
  display: block; text-align: center; margin-top: 16px;
  font-size: 14px; color: var(--ink-soft, #3A3532); text-decoration: underline;
}
.eng-auth-switch {
  text-align: center; margin-top: 20px; font-size: 15px; color: var(--ink-soft, #3A3532);
}
.eng-auth-switch a, .eng-auth-link:hover { color: var(--terracotta, #C64C1E); font-weight: 600; text-decoration: underline; }
.eng-webmail-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; margin-bottom: 10px;
  background: var(--paper-2, #F5EEDE); border: 1px solid var(--rule, #E8DFD1); border-radius: 10px;
  font-size: 15px; font-weight: 600; color: var(--ink, #12100F); text-decoration: none;
}
.eng-webmail-btn:hover { border-color: var(--ink, #12100F); }

/* Account page */
.eng-account-notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 15px; }
.eng-account-notice.success { background: rgba(34,139,34,0.1); color: #1d6b1d; border: 1px solid rgba(34,139,34,0.25); }
.eng-account-notice.error { background: rgba(198,76,30,0.08); color: var(--terracotta-2, #8B2E10); border: 1px solid rgba(198,76,30,0.3); }
.eng-account-notice.warn { background: rgba(198,140,30,0.1); color: #8a5a10; border: 1px solid rgba(198,140,30,0.3); }
.eng-account-notice.warn a { color: inherit; font-weight: 700; text-decoration: underline; margin-left: 6px; }
.eng-account-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.eng-account-avatar { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.eng-account-form { max-width: 480px; }
.eng-field-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft, #3A3532); margin: 16px 0 6px; }
.eng-account-form input[type="text"],
.eng-account-form input[type="password"],
.eng-account-form input[type="file"],
.eng-account-form textarea {
  width: 100%; padding: 11px 13px; background: var(--paper-2, #F5EEDE);
  border: 1px solid var(--rule, #E8DFD1); border-radius: 10px;
  font-family: inherit; font-size: 15px; color: var(--ink, #12100F);
}
.eng-account-form textarea { resize: vertical; }

/* Feed card overflow menu */
.thread-more-wrap { position: relative; margin-left: auto; }
.thread-more-btn { background: none; border: none; color: var(--muted); font-size: 18px; font-weight: 700; cursor: pointer; padding: 2px 6px; }
.thread-more-menu {
  display: none; position: absolute; right: 0; top: 100%; z-index: 20;
  background: var(--paper, #FBF6EC); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12); min-width: 140px; overflow: hidden;
}
.thread-more-menu.open { display: block; }
.thread-more-menu button {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  background: none; border: none; font-size: 14px; color: var(--ink); cursor: pointer;
}
.thread-more-menu button:hover { background: var(--paper-2); }
.thread-more-menu button:disabled { opacity: 0.6; cursor: default; }

/* Google button is a link now */
a.eng-auth-google { box-sizing: border-box; text-decoration: none; }
.eng-auth-hint { margin: 10px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--muted, #8A817A); }
.eng-auth-hint[hidden] { display: none; }

/* Account page: choose-your-handle card and the Google connection */
.eng-handle-card {
  max-width: 480px; margin: 0 0 24px; padding: 16px 18px;
  background: var(--paper-2, #F5EEDE); border: 1px solid var(--rule, #E8DFD1); border-radius: 12px;
}
.eng-handle-card.is-prompt { border-color: var(--terracotta, #C64C1E); box-shadow: 0 0 0 3px rgba(198,76,30,0.12); }
.eng-handle-title { margin: 0 0 4px; font-size: 17px; }
.eng-handle-help { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--muted, #8A817A); }
.eng-handle-input { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.eng-handle-input span { font-size: 16px; font-weight: 700; color: var(--muted, #8A817A); }
.eng-handle-input input[type="text"] {
  flex: 1; min-width: 0; padding: 11px 13px; background: var(--paper, #FBF6EC);
  border: 1px solid var(--rule-2, #D9CFB8); border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink, #12100F);
}
.eng-handle-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.eng-handle-actions .eng-auth-submit { width: auto; padding: 11px 26px; margin-top: 0; }
.eng-handle-keep { background: none; border: none; padding: 6px 2px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft, #3A3532); text-decoration: underline; cursor: pointer; }
.eng-google-card { max-width: 480px; margin: 22px 0 0; padding: 12px 16px; border: 1px solid var(--rule, #E8DFD1); border-radius: 12px; }
.eng-google-card-line { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.eng-google-card-note { margin: 8px 0 0; font-size: 13px; color: var(--muted, #8A817A); }
.eng-google-unlink { margin-top: 10px; background: none; border: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--terracotta-2, #8B2E10); text-decoration: underline; cursor: pointer; }
.eng-account-notice.success a { color: inherit; font-weight: 700; text-decoration: underline; margin-left: 6px; }
