/* Notification System Styles */

.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
  pointer-events: none;
}

.notification {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
  padding: 16px;
  border-left: 4px solid;
  animation: slideIn 0.3s ease-out;
  pointer-events: auto;
  position: relative;
}

.notification.error {
  border-left-color: #dc3545;
  background: linear-gradient(135deg, #fff, #fef2f2);
}

.notification.warning {
  border-left-color: #ffc107;
  background: linear-gradient(135deg, #fff, #fffbf0);
}

.notification.info {
  border-left-color: #0dcaf0;
  background: linear-gradient(135deg, #fff, #f0f9ff);
}

.notification.success {
  border-left-color: #198754;
  background: linear-gradient(135deg, #fff, #f0fff4);
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.notification-title {
  font-weight: 600;
  font-size: 14px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #6c757d;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.notification-close:hover {
  background: rgba(108, 117, 125, 0.1);
  color: #495057;
}

.notification-message {
  font-size: 13px;
  color: #495057;
  line-height: 1.4;
  margin: 0;
}

.notification-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.notification-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.notification-btn.primary {
  background: #007bff;
  color: white;
}

.notification-btn.primary:hover {
  background: #0056b3;
  color: white;
  text-decoration: none;
}

.notification-btn.secondary {
  background: #6c757d;
  color: white;
}

.notification-btn.secondary:hover {
  background: #545b62;
  color: white;
  text-decoration: none;
}

/* Icons */
.notification-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.notification-icon.error::before {
  content: "⚠️";
}

.notification-icon.warning::before {
  content: "⚡";
}

.notification-icon.info::before {
  content: "ℹ️";
}

.notification-icon.success::before {
  content: "✅";
}

/* Animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.notification.removing {
  animation: slideOut 0.3s ease-in forwards;
}

/* Tier indicators */
.tier-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-badge.tier-anonymous {
  background: #e9ecef;
  color: #6c757d;
}

.tier-badge.tier-free {
  background: #d1ecf1;
  color: #0c5460;
}

.tier-badge.tier-paid {
  background: #d4edda;
  color: #155724;
}

/* Search counter */
.search-counter {
  font-size: 12px;
  color: #6c757d;
  margin-left: 8px;
}

/* Feature locked states */
.feature-locked {
  opacity: 0.5;
  cursor: not-allowed;
  position: relative;
}

.feature-locked::after {
  content: "🔒";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  z-index: 1;
}

.feature-limited {
  border: 2px dashed #ffc107;
  position: relative;
}

.feature-limited::before {
  content: "Limited";
  position: absolute;
  top: -8px;
  right: 8px;
  background: #ffc107;
  color: #000;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Upgrade CTA */
.upgrade-cta {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.upgrade-cta:hover {
  background: linear-gradient(45deg, #0056b3, #004085);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.upgrade-cta::after {
  content: "⭐";
}

/* Feature Limitation Modal Styles */
.modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  border-bottom: 1px solid #e9ecef;
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid #e9ecef;
  padding: 1.5rem;
}

#modal-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.upgrade-benefits {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 8px;
  padding: 1rem;
  border-left: 4px solid var(--primary-green);
}

.upgrade-benefits h6 {
  color: var(--primary-green);
  margin-bottom: 0.75rem;
}

.upgrade-benefits ul {
  margin-bottom: 0;
}

.upgrade-benefits li {
  font-size: 14px;
  color: #495057;
}

.modal-footer .btn {
  min-width: 120px;
  font-weight: 500;
}

.modal-footer .btn-primary {
  background: linear-gradient(45deg, var(--primary-green), #1a8f5a);
  border-color: var(--primary-green);
  transition: all 0.2s ease;
}

.modal-footer .btn-primary:hover {
  background: linear-gradient(45deg, #1a8f5a, var(--primary-green));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 121, 72, 0.3);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .notification-container {
    left: 10px;
    right: 10px;
    top: 10px;
    max-width: none;
  }
  
  .notification {
    padding: 12px;
  }
  
  .tier-badge {
    position: static;
    display: inline-block;
    margin-left: 8px;
  }
  
  .modal-dialog {
    margin: 1rem;
  }
  
  .modal-body,
  .modal-header,
  .modal-footer {
    padding: 1rem;
  }
  
  #modal-icon {
    font-size: 36px !important;
  }
  
  .modal-footer .btn {
    min-width: 100px;
    font-size: 14px;
  }
}

/* Modal z-index overrides */
.modal {
  z-index: 6000 !important;
}

.modal-backdrop {
  z-index: 5999 !important;
}

/* Ensure Bootstrap modal centering is preserved */
.modal.show .modal-dialog {
  transform: none;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 1rem);
}

/* Fix mobile modal centering - override the margin: 1rem */
@media (max-width: 767px) {
  .modal-dialog {
    margin: 1rem auto !important;
  }
  
  .modal-dialog-centered {
    margin: 1rem auto !important;
    min-height: calc(100% - 2rem);
  }
}



/* Customer Portal Button Styles */
.customer-portal-btn {
  background: linear-gradient(45deg, #6c757d, #495057);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.customer-portal-btn:hover {
  background: linear-gradient(45deg, #495057, #343a40);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.customer-portal-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.customer-portal-btn .bi {
  font-size: 16px;
}

@media (min-width: 576px) {
  .modal-dialog-centered {
    min-height: calc(100% - 3.5rem);
  }
}

/* Fix yearly subscription button hover state */
.yearly-subscription-btn:hover {
  background-color: var(--primary-green) !important;
  border-color: var(--primary-green) !important;
  color: white !important;
}

.yearly-subscription-btn:hover .badge {
  background-color: rgba(0, 0, 0, 0.2) !important;
  color: white !important;
}
