/* ==========================================================================
   Mixia / ViewMix — User Authentication & Profile Widget Styles (Light Editorial)
   Matches the bright, clean, high-contrast design system of index.html and create.
   ========================================================================== */

/* 1. Header Widget Styles */
.vm-auth-widget {
  display: inline-flex;
  align-items: center;
  position: relative;
  font-family: inherit;
}

.vm-auth-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  color: #0F172A;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.vm-auth-login-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #FF5400;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.vm-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.vm-user-pill:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.vm-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #FF5400, #E04800);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(255, 84, 0, 0.25);
}

.vm-user-name {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vm-user-chevron {
  font-size: 10px;
  color: #64748B;
  transition: transform 0.2s ease;
}

.vm-user-pill.open .vm-user-chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.vm-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
  z-index: 10000;
  display: none;
  flex-direction: column;
  gap: 4px;
  animation: vmDropdownIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[dir="rtl"] .vm-user-dropdown {
  left: auto;
  right: 0;
}

.vm-user-dropdown.is-open {
  display: flex;
}

@keyframes vmDropdownIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.vm-user-dropdown-header {
  padding: 8px 10px 10px 10px;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 4px;
}

.vm-dropdown-email {
  font-size: 11.5px;
  color: #64748B;
  direction: ltr;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[dir="rtl"] .vm-dropdown-email {
  text-align: right;
}

.vm-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: inherit;
  transition: all 0.15s ease;
}

.vm-dropdown-item:hover {
  background: #F8FAFC;
  color: #0F172A;
}

.vm-dropdown-item.primary {
  color: #FF5400;
  font-weight: 700;
}

.vm-dropdown-item.primary:hover {
  background: rgba(255, 84, 0, 0.08);
}

.vm-dropdown-item.danger {
  color: #EF4444;
}

.vm-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

/* 2. Modal Overlay & Card (Light Editorial) */
.vm-auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.vm-auth-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.vm-auth-card {
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 24px;
  padding: 34px 30px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.04);
  position: relative;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
  text-align: right;
  color: #0F172A;
}

[dir="ltr"] .vm-auth-card {
  direction: ltr;
  text-align: left;
}

[dir="ltr"] .vm-auth-close {
  left: auto;
  right: 18px;
}

.vm-auth-backdrop.is-open .vm-auth-card {
  transform: translateY(0) scale(1);
}

.vm-auth-close {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #64748B;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vm-auth-close:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.vm-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 84, 0, 0.08);
  border: 1px solid rgba(255, 84, 0, 0.2);
  color: #FF5400;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.vm-auth-title {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
  color: #0F172A;
}

.vm-auth-subtitle {
  font-size: 14px;
  color: #64748B;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

/* Google Sign-in Button */
.vm-btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #FFFFFF;
  color: #1F2937;
  border: 1.5px solid #CBD5E1;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.vm-btn-google:hover {
  background: #F8FAFB;
  border-color: #94A3B8;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
}

.vm-btn-google svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.vm-auth-error {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #DC2626;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
  line-height: 1.4;
}

.vm-auth-error.is-visible {
  display: block;
}

.vm-auth-footer {
  margin-top: 20px;
  font-size: 12px;
  color: #94A3B8;
  text-align: center;
  line-height: 1.5;
}
