/* Authentication Pages Styles */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
  min-height: calc(100vh - var(--header-height) - 300px);
}

.auth-card {
  width: 100%;
  max-width: 500px;
  background-color: var(--card-background);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px var(--shadow-color);
  overflow: hidden;
  padding: 2rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  width: 100%;
}

@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
  }
}

.form-group.half {
  flex: 1;
}

.input-with-icon {
  position: relative;
}

.input-with-icon svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.input-with-icon .form-input {
  padding-left: 2.75rem;
}

/* Toggle password button */
.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.toggle-password:hover {
  color: var(--primary-color);
}

.toggle-password svg {
  width: 20px;
  height: 20px;
}

.show-password,
.hide-password {
  display: block;
}

.hide-password {
  display: none;
}

.input-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  min-height: 1rem;
}

.input-note {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.auth-error,
.auth-success {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.auth-error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.auth-success {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--primary-color);
}

.forgot-password {
  color: var(--primary-color);
  font-size: 0.875rem;
  text-decoration: none;
  transition: var(--transition);
}

.forgot-password:hover {
  text-decoration: underline;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--border-color);
}

.auth-divider span {
  position: relative;
  background-color: var(--card-background);
  padding: 0 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.social-login {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background-color: var(--card-background);
  color: var(--text-color);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.social-button:hover {
  background-color: var(--secondary-color);
}

.social-button.google svg {
  color: #db4437;
}

.social-button.facebook svg {
  color: #4267b2;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.auth-footer a:hover {
  text-decoration: underline;
}

.terms-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.terms-link:hover {
  text-decoration: underline;
}

/* Password Strength Meter */
.password-strength {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.strength-meter {
  display: flex;
  gap: 0.25rem;
  height: 4px;
}

.strength-segment {
  flex: 1;
  height: 100%;
  background-color: var(--border-color);
  border-radius: 2px;
  transition: var(--transition);
}

.strength-segment.weak {
  background-color: #ef4444;
}

.strength-segment.medium {
  background-color: #f59e0b;
}

.strength-segment.strong {
  background-color: #10b981;
}

.strength-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* User Profile Dropdown */
.user-dropdown {
  position: relative;
}

.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 200px;
  background-color: var(--card-background);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--shadow-color);
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  margin-top: 0.5rem;
  z-index: 100;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: var(--transition);
}

.user-dropdown.active .user-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.user-menu-header {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.user-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-menu-items {
  list-style: none;
}

.user-menu-item {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.user-menu-item:hover {
  background-color: var(--secondary-color);
}

.user-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.875rem;
}

.user-menu-link.logout {
  color: #ef4444;
}

.user-menu-link svg {
  width: 1rem;
  height: 1rem;
}

/* User Avatar Styles */
.user-avatar {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
}

.user-avatar:hover {
  opacity: 0.9;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Google Sign-In Button */
.google-signin-container {
  width: 100%;
  height: 40px;
  margin-bottom: 1rem;
}

.g_id_signin {
  display: flex !important;
  justify-content: center;
  width: 100% !important;
}

.g_id_signin > div {
  width: 100% !important;
  border-radius: var(--radius) !important;
}

.g_id_signin iframe {
  width: 100% !important;
  scale: 1.02;
}

/* Profile Page Styles */
.profile-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .profile-container {
    grid-template-columns: 300px 1fr;
  }
}

.profile-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  height: fit-content;
}

.profile-menu {
  background-color: var(--card-background);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.profile-menu-header {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 auto 1rem;
  overflow: hidden;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-weight: 600;
  font-size: 1.125rem;
}

.profile-menu-items {
  list-style: none;
  padding: 1rem 0;
}

.profile-menu-item {
  padding: 0.5rem 1rem;
}

.profile-menu-item.active {
  background-color: var(--primary-light);
}

.profile-menu-item.active .profile-menu-link {
  color: var(--primary-color);
  font-weight: 500;
}

.profile-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.875rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.profile-menu-link:hover {
  color: var(--primary-color);
}

.profile-menu-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.danger-zone {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.danger-zone-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 0.5rem;
}

.danger-zone-description {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.danger-button {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.danger-button:hover {
  background-color: #ef4444;
  color: white;
}

/* Empty States */
.empty-state-icon {
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-align: center;
}

.addresses-empty,
.payment-methods-empty,
.order-history-empty {
  text-align: center;
  padding: 3rem 1rem;
}

.addresses-empty h3,
.payment-methods-empty h3,
.order-history-empty h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.addresses-empty p,
.payment-methods-empty p,
.order-history-empty p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* Notification */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  background-color: var(--card-background);
  box-shadow: 0 4px 12px var(--shadow-color);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
}

.notification.show {
  transform: translateY(0);
  opacity: 1;
}

.notification.success {
  border-left: 4px solid var(--primary-color);
}

.notification.error {
  border-left: 4px solid #ef4444;
}

/* Notification styles for auth pages */
.auth-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  background-color: var(--card-background);
  box-shadow: 0 4px 12px var(--shadow-color);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
  max-width: 300px;
}

.auth-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.auth-notification.success {
  border-left: 4px solid var(--primary-color);
}

.auth-notification.error {
  border-left: 4px solid #ef4444;
}

.auth-notification-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.auth-notification-icon {
  color: var(--primary-color);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.auth-notification-icon.error {
  color: #ef4444;
}

.auth-notification-message {
  flex: 1;
  font-size: 0.875rem;
}

.auth-notification-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-notification-close:hover {
  color: var(--text-color);
}

/* User avatar with verified badge */
.user-avatar {
  position: relative;
}

.verified-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  border: 2px solid var(--card-background);
}

.verified-badge svg {
  width: 10px;
  height: 10px;
}

