/* IPMC Cookie Banner - Enhanced Styling */

.cookie {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(8, 25, 61, 0.16);
  border-radius: 8px;
  z-index: 999;
  max-width: 480px;
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  border: 1px solid #e5e7eb;
}

.cookie.show {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  opacity: 1;
  transform: translateY(0);
  animation: slideUp 0.3s ease-out;
}

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

.cookie > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cookie strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: #071a3d;
  line-height: 1.3;
}

.cookie p {
  font-size: 13px;
  color: #5a6577;
  line-height: 1.6;
  margin: 0;
}

.cookie > div:last-child {
  display: flex;
  gap: 10px;
  flex-direction: column;
  flex-shrink: 0;
}

.cookie button {
  border: 0;
  padding: 11px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  min-width: 140px;
  text-align: center;
}

.cookie-essential {
  background: #f3f4f6;
  color: #071a3d;
  border: 1px solid #d8dde6;
}

.cookie-essential:hover {
  background: #e5e7eb;
  border-color: #c1c8d0;
  transform: translateY(-1px);
}

.cookie-essential:active {
  transform: translateY(0);
}

.cookie-accept {
  background: #133bb5;
  color: #fff;
  border: 1px solid #133bb5;
}

.cookie-accept:hover {
  background: #0d2f9b;
  border-color: #0d2f9b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(19, 59, 181, 0.2);
}

.cookie-accept:active {
  transform: translateY(0);
}

/* Focus states for accessibility */
.cookie button:focus-visible {
  outline: 3px solid #f5b942;
  outline-offset: 2px;
}

/* Close button (future enhancement) */
.cookie-close {
  background: none;
  border: 0;
  color: #5a6577;
  padding: 0;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  min-width: auto;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 16px;
  top: 16px;
}

.cookie-close:hover {
  color: #071a3d;
}

/* Tablet/Small Desktop */
@media (max-width: 1024px) {
  .cookie {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .cookie.show {
    grid-template-columns: 1fr;
  }

  .cookie > div:last-child {
    flex-direction: row;
  }

  .cookie button {
    flex: 1;
    min-width: auto;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .cookie {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 16px;
    margin: 0;
  }

  .cookie strong {
    font-size: 14px;
  }

  .cookie p {
    font-size: 12px;
  }

  .cookie > div:last-child {
    gap: 8px;
  }

  .cookie button {
    padding: 10px 14px;
    font-size: 12px;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .cookie {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 12px;
    border-radius: 6px;
  }

  .cookie strong {
    font-size: 13px;
  }

  .cookie p {
    font-size: 11px;
  }

  .cookie button {
    padding: 9px 12px;
    font-size: 11px;
    min-width: 80px;
  }
}

/* Print styles */
@media print {
  .cookie {
    display: none !important;
  }
}

/* Dark mode support (if implemented in future) */
@media (prefers-color-scheme: dark) {
  .cookie {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  }

  .cookie strong {
    color: #f3f4f6;
  }

  .cookie p {
    color: #d1d5db;
  }

  .cookie-essential {
    background: #374151;
    color: #f3f4f6;
    border-color: #4b5563;
  }

  .cookie-essential:hover {
    background: #4b5563;
    border-color: #6b7280;
  }

  .cookie-close {
    color: #d1d5db;
  }

  .cookie-close:hover {
    color: #f3f4f6;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .cookie {
    transition: none;
  }

  .cookie.show {
    animation: none;
  }

  .cookie button:hover {
    transform: none !important;
  }

  .cookie button:active {
    transform: none !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: more) {
  .cookie {
    border-width: 2px;
  }

  .cookie button {
    border-width: 2px;
  }

  .cookie-close {
    font-weight: bold;
  }
}
