/**
 * LiteCart Cookie Manager - Bar Style (Non-blocking)
 * CookieConsent v3 stiliai, neblokuojantis dizainas
 * Panašus į Cookiebot - juosta apačioje
 * Responsyvus dizainas su italų ir anglų kalbomis
 */

/* Cookie Banner Bar - Non-blocking */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

.cookie-banner-bar {
  background: #fff;
  padding: 15px 0;
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.cookie-banner-message {
  flex: 1;
  min-width: 300px;
}

.cookie-banner-message strong {
  display: block;
  color: #333;
  font-size: 16px;
  margin-bottom: 5px;
  font-weight: 600;
}

.cookie-banner-message p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cookie-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

.cookie-btn-accept {
  background-color: #4CAF50;
  color: #ffffff;
}

.cookie-btn-accept:hover {
  background-color: #45a049;
}

.cookie-btn-reject {
  background-color: #f44336;
  color: #ffffff;
}

.cookie-btn-reject:hover {
  background-color: #da190b;
}

.cookie-btn-settings {
  background-color: #2196F3;
  color: #ffffff;
}

.cookie-btn-settings:hover {
  background-color: #1976D2;
}

.cookie-btn-save {
  background-color: #4CAF50;
  color: #ffffff;
}

.cookie-btn-save:hover {
  background-color: #45a049;
}

/* Cookie Details - Expandable */
.cookie-banner-details {
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  padding: 20px 0;
}

.cookie-banner-details .cookie-banner-content {
  display: block;
  padding: 0 20px;
}

.cookie-categories {
  margin: 20px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
}

.cookie-category {
  background: #fff;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.cookie-category label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  margin: 0;
  gap: 12px;
}

.cookie-category input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cookie-category input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-category strong {
  display: block;
  font-size: 15px;
  color: #333;
  margin-bottom: 5px;
  font-weight: 600;
}

.cookie-category span {
  display: block;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.cookie-banner-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

.cookie-banner-footer a {
  color: #4CAF50;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease;
}

.cookie-banner-footer a:hover {
  color: #45a049;
  text-decoration: underline;
}

/* Settings Button (after consent) */
#cookie-settings-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #4CAF50;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  z-index: 9999;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

#cookie-settings-btn:hover {
  background: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    padding: 0 15px;
  }

  .cookie-banner-message {
    min-width: auto;
    text-align: center;
  }

  .cookie-banner-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .cookie-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 16px;
  }

  .cookie-categories {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cookie-category {
    padding: 12px;
  }

  .cookie-banner-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  #cookie-settings-btn {
    bottom: 15px;
    right: 15px;
    padding: 8px 12px;
    font-size: 13px;
  }
}

@media screen and (max-width: 480px) {
  .cookie-banner-bar {
    padding: 10px 0;
  }

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

  .cookie-banner-message p {
    font-size: 13px;
  }

  .cookie-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .cookie-banner-actions {
    gap: 8px;
  }

  .cookie-category {
    padding: 10px;
  }

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

  .cookie-category span {
    font-size: 12px;
  }
}

/* Animation for banner appearance */
@keyframes cookieBarSlideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#cookie-banner {
  animation: cookieBarSlideIn 0.3s ease-out;
}

/* Animation for details expansion */
.cookie-banner-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.cookie-banner-details[style*="block"] {
  max-height: 1000px;
}

/* Print styles */
@media print {
  #cookie-banner,
  #cookie-settings-btn {
    display: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  #cookie-banner {
    border-top: 2px solid #000;
  }
  
  .cookie-btn {
    border: 1px solid #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  #cookie-banner,
  .cookie-banner-details,
  .cookie-btn {
    animation: none;
    transition: none;
  }
}
