/**
 * Jurida — Auth CSS
 * Mini-modal Google Sign-In + navbar auth elements
 */

/* -----------------------------------------------------------------------
   Mini-modal overlay
   ----------------------------------------------------------------------- */

.jurida-auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10, 20, 40, 0.55);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.jurida-auth-modal.is-open {
  display: flex;
}

.jurida-auth-modal__box {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 36px 36px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);
  animation: juridaModalIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes juridaModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.jurida-auth-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #7a8aa0;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.jurida-auth-modal__close:hover {
  background: #f1f4f8;
  color: #1B2A4A;
}

.jurida-auth-modal__logo {
  font-size: 2rem;
  color: #C9A84C;
  margin-bottom: 12px;
  line-height: 1;
}

.jurida-auth-modal__title {
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #1B2A4A;
  margin: 0 0 10px;
  line-height: 1.3;
}

.jurida-auth-modal__sub {
  font-size: 0.9rem;
  color: #5a6a80;
  margin: 0 0 28px;
  line-height: 1.55;
}

.jurida-auth-modal__btn-wrap {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

.jurida-auth-modal__error {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: #C0392B;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 8px 12px;
  text-align: left;
}

/* -----------------------------------------------------------------------
   Navbar — auth button (not logged in)
   ----------------------------------------------------------------------- */

.nav__auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid rgba(201, 168, 76, 0.6);
  color: var(--color-navy, #1B2A4A);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav__auth-btn:hover {
  border-color: #C9A84C;
  background: rgba(201, 168, 76, 0.08);
  color: #1B2A4A;
}

/* -----------------------------------------------------------------------
   Navbar — user widget (logged in)
   ----------------------------------------------------------------------- */

.nav__user {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.nav__user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background 0.15s;
}

.nav__user-trigger:hover {
  background: rgba(27, 42, 74, 0.06);
}

.nav__user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(201, 168, 76, 0.5);
  flex-shrink: 0;
}

.nav__user-initial {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #1B2A4A;
  color: #C9A84C;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(201, 168, 76, 0.5);
}

.nav__user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-navy, #1B2A4A);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav__user-caret {
  width: 14px;
  height: 14px;
  color: #7a8aa0;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.nav__user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #ffffff;
  border: 1px solid #e8ecf0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 1000;
  overflow: hidden;
}

.nav__user-dropdown.is-open {
  display: block;
}

.nav__user-dropdown a,
.nav__user-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 16px;
  font-size: 0.875rem;
  color: #1B2A4A;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-weight: 400;
}

.nav__user-dropdown a:hover,
.nav__user-dropdown button:hover {
  background: #f5f7fa;
}

.nav__user-dropdown button#navSignOut {
  color: #C0392B;
  border-top: 1px solid #f0f0f0;
}

.nav__user-dropdown button#navSignOut:hover {
  background: #fff5f5;
}

/* Mobile: flatten dropdown in open menu */
@media (max-width: 768px) {
  .nav__user {
    width: 100%;
  }

  .nav__user-trigger {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 0;
  }

  .nav__user-dropdown {
    position: static;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding-left: 38px;
    border-top: 1px solid #f0f0f0;
  }

  .nav__user-dropdown.is-open {
    display: block;
  }

  .nav__auth-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }
}
