/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  pointer-events: none;
}

.toast {
  min-width: 300px;
  padding: 1rem 1.5rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 1rem;
  pointer-events: all;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid;
}

.toast.success {
  border-left-color: #10b981;
}

.toast.error {
  border-left-color: #ef4444;
}

.toast.info {
  border-left-color: #3b82f6;
}

.toast.warning {
  border-left-color: #f59e0b;
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast.success .toast-icon { color: #10b981; }
.toast.error .toast-icon { color: #ef4444; }
.toast.info .toast-icon { color: #3b82f6; }
.toast.warning .toast-icon { color: #f59e0b; }

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: var(--color-graphite);
}

.toast-message {
  font-size: 0.8125rem;
  color: rgba(46, 46, 46, 0.7);
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: rgba(46, 46, 46, 0.5);
  transition: color 0.2s;
}

.toast-close:hover {
  color: rgba(46, 46, 46, 0.8);
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.removing {
  animation: slideOutRight 0.3s ease-out forwards;
}

@keyframes slideOutRight {
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

[data-theme="dark"] .toast {
  background: #2a2a2a;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .toast-title {
  color: #f5f5f5;
}

[data-theme="dark"] .toast-message {
  color: rgba(245, 245, 245, 0.7);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.back-to-top {
  position: fixed;
  bottom: 10rem;
  right: 1.5rem;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-sage);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(136, 199, 138, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(136, 199, 138, 0.4);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  color: white;
}

@media (max-width: 768px) {
  .back-to-top {
    width: 48px;
    height: 48px;
    bottom: 8rem;
    right: 1rem;
  }
  
  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-sage), #6FA871);
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 2px 8px rgba(136, 199, 138, 0.4);
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: white;
  padding: 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-banner-text {
  flex: 1;
}

.cookie-banner-text h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-graphite);
}

.cookie-banner-text p {
  font-size: 0.875rem;
  color: rgba(46, 46, 46, 0.7);
  line-height: 1.6;
}

.cookie-banner-text a {
  color: var(--color-sage);
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.cookie-banner-actions button {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.cookie-accept {
  background: var(--color-sage);
  color: white;
}

.cookie-accept:hover {
  background: #7ab87c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(136, 199, 138, 0.3);
}

.cookie-decline {
  background: transparent;
  color: var(--color-graphite);
  border: 1px solid rgba(46, 46, 46, 0.2);
}

.cookie-decline:hover {
  background: rgba(46, 46, 46, 0.05);
}

[data-theme="dark"] .cookie-banner {
  background: #242424;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .cookie-banner-text h4 {
  color: #f5f5f5;
}

[data-theme="dark"] .cookie-banner-text p {
  color: rgba(245, 245, 245, 0.7);
}

[data-theme="dark"] .cookie-decline {
  color: #f5f5f5;
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .cookie-decline:hover {
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cookie-banner-actions {
    flex-direction: column;
  }
  
  .cookie-banner-actions button {
    width: 100%;
  }
  
  .toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
  }
  
  .toast {
    min-width: auto;
    width: 100%;
  }
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  font-size: 0.875rem;
  color: rgba(46, 46, 46, 0.6);
}

.breadcrumbs a {
  color: rgba(46, 46, 46, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--color-sage);
}

.breadcrumbs .separator {
  color: rgba(46, 46, 46, 0.3);
}

.breadcrumbs .current {
  color: var(--color-graphite);
  font-weight: 500;
}

[data-theme="dark"] .breadcrumbs {
  color: rgba(245, 245, 245, 0.6);
}

[data-theme="dark"] .breadcrumbs a {
  color: rgba(245, 245, 245, 0.6);
}

[data-theme="dark"] .breadcrumbs .current {
  color: #f5f5f5;
}
