/* Authentication & User Features CSS for newlyripe.com */

/* Auth Button & User Menu */
.auth-container {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.auth-btn {
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  color: white;
  border: none;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: white;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-profile:hover {
  border-color: #FF6B35;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.15);
}

.user-name {
  font-weight: 600;
  color: #2C2C2C;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* User Dropdown Menu */
.user-menu {
  position: absolute;
  top: 60px;
  right: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.user-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu a,
.user-menu button {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.95rem;
  color: #2C2C2C;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.user-menu a:hover,
.user-menu button:hover {
  background: #FAFAF9;
}

/* Auth Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content h2 {
  margin: 0 0 24px 0;
  font-size: 1.8rem;
  color: #2C2C2C;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-content input {
  padding: 14px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.modal-content input:focus {
  outline: none;
  border-color: #FF6B35;
}

.submit-btn {
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  color: white;
  border: none;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  font-weight: 300;
  color: #6B6B6B;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close:hover {
  color: #2C2C2C;
}

.error-message {
  color: #E53935;
  font-size: 0.9rem;
  margin: 8px 0 0 0;
  min-height: 20px;
}

.auth-switch {
  margin-top: 24px;
  text-align: center;
  font-size: 0.9rem;
  color: #6B6B6B;
}

.auth-switch a {
  color: #FF6B35;
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  font-weight: 500;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.3s ease;
  z-index: 10001;
  max-width: 300px;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-success {
  border-left: 4px solid #4CAF50;
}

.notification-error {
  border-left: 4px solid #E53935;
}

.notification-info {
  border-left: 4px solid #2196F3;
}

/* Watchlist Button (Heart Icon) */
.watchlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 20;
  pointer-events: auto;
}

.watchlist-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.watchlist-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #FF6B35;
  stroke-width: 2;
  transition: all 0.2s ease;
}

.watchlist-btn.saved svg {
  fill: #FF6B35;
}

/* Mobile specific adjustments for watchlist button */
@media (max-width: 768px) {
  .watchlist-btn {
    width: 44px;
    height: 44px;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  }
  
  .watchlist-btn svg {
    width: 22px;
    height: 22px;
  }
}

/* Price Alert Button */
.price-alert-btn {
  background: #F7F7F7;
  border: 2px solid #E0E0E0;
  color: #2C2C2C;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.price-alert-btn:hover {
  border-color: #FF6B35;
  background: #FFF5F2;
  color: #FF6B35;
}

/* Price History Chart */
.price-history-container {
  margin-top: 16px;
  padding: 16px;
  background: #FAFAF9;
  border-radius: 8px;
  display: none;
}

.price-history-container.visible {
  display: block;
}

.price-history-trigger {
  color: #FF6B35;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.price-history-trigger:hover {
  text-decoration: underline;
}

/* Watchlist Page */
.watchlist-header {
  margin-bottom: 32px;
  text-align: center;
}

.watchlist-header h1 {
  font-size: 2.5rem;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.watchlist-header p {
  color: #6B6B6B;
  font-size: 1.1rem;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-state h2 {
  font-size: 2rem;
  color: #2C2C2C;
  margin-bottom: 16px;
}

.empty-state p {
  color: #6B6B6B;
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.primary-button {
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  color: white;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.price-change {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

.price-change.decreased {
  background: #E8F5E9;
  color: #2E7D32;
}

.price-change.increased {
  background: #FFEBEE;
  color: #C62828;
}

.watchlist-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.view-button,
.remove-button {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
  border: none;
}

.view-button {
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  color: white;
}

.view-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.remove-button {
  background: #F7F7F7;
  color: #6B6B6B;
  border: 2px solid #E0E0E0;
}

.remove-button:hover {
  background: #FFEBEE;
  border-color: #E53935;
  color: #E53935;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .auth-container {
    top: 15px;
    right: 15px;
  }
  
  .user-menu {
    right: 15px;
  }
  
  .modal-content {
    padding: 30px 24px;
    margin: 0 16px;
  }
  
  .notification {
    right: 16px;
    max-width: calc(100% - 32px);
  }
}
