/* Cookie Consent Component Styles */

/* Banner Styles */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border-top: 1px solid #e5e7eb; /* border-gray-200 */
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 50;
  padding: 1rem;
  animation: slideUp 0.3s ease-out;
}

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

.cookie-banner__container {
  max-width: 96rem; /* max-w-6xl */
  margin: 0 auto;
}

.cookie-banner__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .cookie-banner__content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-banner__text {
  flex: 1;
}

.cookie-banner__title {
  font-weight: 600; /* font-semibold */
  color: #111827; /* text-gray-900 */
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.cookie-banner__description {
  font-size: 0.875rem; /* text-sm */
  color: #4b5563; /* text-gray-600 */
  line-height: 1.5;
  margin: 0;
}

.cookie-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

@media (min-width: 640px) {
  .cookie-banner__actions {
    flex-direction: row;
    width: auto;
  }
}

.cookie-banner__button {
  padding: 0.5rem 1rem;
  font-size: 0.875rem; /* text-sm */
  border-radius: 0.375rem; /* rounded-md */
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
  min-width: 120px;
}

.cookie-banner__button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.cookie-banner__button--settings {
  border-color: #d1d5db; /* border-gray-300 */
  background-color: #ffffff;
  color: #374151; /* text-gray-700 */
}

.cookie-banner__button--settings:hover {
  background-color: #f9fafb; /* hover:bg-gray-50 */
}

.cookie-banner__button--reject {
  border-color: #d1d5db; /* border-gray-300 */
  background-color: #ffffff;
  color: #374151; /* text-gray-700 */
}

.cookie-banner__button--reject:hover {
  background-color: #f9fafb; /* hover:bg-gray-50 */
}

.cookie-banner__button--accept {
  background-color: #2563eb; /* bg-blue-600 */
  color: #ffffff;
  border-color: #2563eb;
}

.cookie-banner__button--accept:hover {
  background-color: #1d4ed8; /* hover:bg-blue-700 */
}

/* Settings Modal Styles */
.cookie-settings {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

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

.cookie-settings__modal {
  background-color: #ffffff;
  border-radius: 0.5rem; /* rounded-lg */
  max-width: 28rem; /* max-w-md */
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.cookie-settings__content {
  padding: 1.5rem;
}

.cookie-settings__title {
  font-size: 1.25rem; /* text-xl */
  font-weight: 600; /* font-semibold */
  color: #111827; /* text-gray-900 */
  margin-bottom: 1rem;
}

.cookie-settings__description {
  font-size: 0.875rem; /* text-sm */
  color: #4b5563; /* text-gray-600 */
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.cookie-settings__options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Cookie Option Styles */
.cookie-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-option__info {
  flex: 1;
  margin-right: 1rem;
}

.cookie-option__title {
  font-weight: 500; /* font-medium */
  color: #111827; /* text-gray-900 */
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.cookie-option__description {
  font-size: 0.875rem; /* text-sm */
  color: #4b5563; /* text-gray-600 */
  line-height: 1.4;
  margin: 0;
}

.cookie-option__toggle {
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.cookie-option__checkbox {
  width: 1rem; /* h-4 w-4 */
  height: 1rem;
  color: #2563eb; /* text-blue-600 */
  border-radius: 0.25rem;
  border: 1px solid #d1d5db; /* border-gray-300 */
  cursor: pointer;
}

.cookie-option__checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-option__checkbox:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Settings Actions */
.cookie-settings__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.cookie-settings__button {
  flex: 1;
  padding: 0.5rem 1rem;
  font-size: 0.875rem; /* text-sm */
  border-radius: 0.375rem; /* rounded-md */
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  text-align: center;
}

.cookie-settings__button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.cookie-settings__button--cancel {
  border: 1px solid #d1d5db; /* border-gray-300 */
  background-color: #ffffff;
  color: #374151; /* text-gray-700 */
}

.cookie-settings__button--cancel:hover {
  background-color: #f9fafb; /* hover:bg-gray-50 */
}

.cookie-settings__button--save {
  background-color: #2563eb; /* bg-blue-600 */
  color: #ffffff;
  border: 1px solid #2563eb;
}

.cookie-settings__button--save:hover {
  background-color: #1d4ed8; /* hover:bg-blue-700 */
}

/* Responsive Design */
@media (max-width: 640px) {
  .cookie-banner {
    padding: 0.75rem;
  }
  
  .cookie-banner__content {
    gap: 0.75rem;
  }
  
  .cookie-banner__title {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }
  
  .cookie-banner__description {
    font-size: 0.8125rem;
  }
  
  .cookie-banner__button {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    min-width: 100px;
  }
  
  .cookie-settings__content {
    padding: 1rem;
  }
  
  .cookie-settings__title {
    font-size: 1.125rem;
  }
  
  .cookie-option {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .cookie-option__info {
    margin-right: 0;
  }
  
  .cookie-option__toggle {
    align-self: flex-end;
    margin-top: 0;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .cookie-banner {
    background-color: #1f2937; /* gray-800 */
    border-top-color: #374151; /* border-gray-700 */
  }
  
  .cookie-banner__title {
    color: #f9fafb; /* text-gray-50 */
  }
  
  .cookie-banner__description {
    color: #d1d5db; /* text-gray-300 */
  }
  
  .cookie-settings__modal {
    background-color: #1f2937; /* gray-800 */
  }
  
  .cookie-settings__title {
    color: #f9fafb; /* text-gray-50 */
  }
  
  .cookie-settings__description,
  .cookie-option__description {
    color: #d1d5db; /* text-gray-300 */
  }
  
  .cookie-option__title {
    color: #f9fafb; /* text-gray-50 */
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .cookie-banner {
    border-top-width: 2px;
  }
  
  .cookie-banner__button {
    border-width: 2px;
  }
  
  .cookie-settings__modal {
    border: 2px solid #374151;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .cookie-banner,
  .cookie-settings,
  .cookie-settings__modal {
    animation: none;
  }
  
  .cookie-banner__button,
  .cookie-settings__button {
    transition: none;
  }
}

/* Print Styles */
@media print {
  .cookie-banner,
  .cookie-settings {
    display: none;
  }
}
