/* Cookie Consent Banner */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  border-top: 3px solid #ff6b35;
  animation: slideUp 0.5s ease-out;
}

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

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

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

.cookie-consent-text h3 {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #ff6b35;
}

.cookie-consent-text p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.9;
}

.cookie-consent-text a {
  color: #ff6b35;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.cookie-consent-text a:hover {
  color: #ff8c42;
}

.cookie-consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-consent-actions .btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.cookie-consent-actions .btn-primary {
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
}

.cookie-consent-actions .btn-primary:hover {
  background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.cookie-consent-actions .btn-secondary {
  background: #6c757d;
  color: white;
}

.cookie-consent-actions .btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.cookie-consent-actions .btn-outline-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-consent-actions .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Cookie Settings Modal */
.cookie-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-settings-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.cookie-settings-content {
  position: relative;
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.cookie-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 25px;
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px 12px 0 0;
}

.cookie-settings-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c3e50;
}

.cookie-settings-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #6c757d;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.cookie-settings-close:hover {
  background: rgba(255, 107, 53, 0.1);
  color: #ff6b35;
}

.cookie-settings-body {
  padding: 25px;
}

.cookie-settings-body > p {
  margin-bottom: 25px;
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.6;
}

.cookie-category {
  margin-bottom: 25px;
  padding: 20px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.cookie-category:hover {
  border-color: #ff6b35;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.1);
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cookie-category-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
}

.cookie-category p {
  margin: 0;
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
}

.cookie-toggle input[type="checkbox"] {
  display: none;
}

.toggle-label {
  display: block;
  width: 50px;
  height: 26px;
  background: #ccc;
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-label.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-label {
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-label .toggle-slider {
  transform: translateX(24px);
}

.cookie-toggle input[type="checkbox"]:disabled + .toggle-label {
  background: #28a745;
  cursor: not-allowed;
}

.cookie-toggle input[type="checkbox"]:disabled + .toggle-label .toggle-slider {
  transform: translateX(24px);
}

.cookie-settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 25px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
}

.cookie-settings-footer .btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.cookie-settings-footer .btn-primary {
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
}

.cookie-settings-footer .btn-primary:hover {
  background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.cookie-settings-footer .btn-outline-secondary {
  background: transparent;
  color: #6c757d;
  border: 2px solid #e9ecef;
}

.cookie-settings-footer .btn-outline-secondary:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
  .cookie-consent-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .cookie-consent-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .cookie-settings-content {
    margin: 10px;
    max-height: 90vh;
  }
  
  .cookie-settings-header,
  .cookie-settings-body,
  .cookie-settings-footer {
    padding: 15px 20px;
  }
  
  .cookie-category {
    padding: 15px;
  }
  
  .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .cookie-settings-footer {
    flex-direction: column;
    gap: 10px;
  }
  
  .cookie-settings-footer .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .cookie-consent-banner {
    padding: 15px;
  }
  
  .cookie-consent-actions .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .cookie-settings-content {
    margin: 5px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent-banner,
  .cookie-settings-content,
  .toggle-slider,
  .btn {
    animation: none;
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .cookie-consent-banner {
    background: #000;
    border-top-color: #fff;
  }
  
  .cookie-settings-content {
    border: 2px solid #000;
  }
  
  .toggle-label {
    border: 2px solid #000;
  }
}

/* Cookie Settings Link */
.cookie-settings-link {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cookie-settings-link:hover {
  color: #ff6b35;
  background: rgba(255, 107, 53, 0.1);
}

/* Current Settings Display */
.current-settings {
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.current-settings h4 {
  margin: 0 0 15px 0;
  color: #2c3e50;
  font-size: 1rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.setting-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.setting-item.enabled {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.setting-item.disabled {
  background: rgba(108, 117, 125, 0.1);
  color: #6c757d;
  border: 1px solid rgba(108, 117, 125, 0.2);
}

.setting-icon {
  font-size: 1.1rem;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}

.cookie-actions .btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.cookie-actions .btn-primary {
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
}

.cookie-actions .btn-primary:hover {
  background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.cookie-actions .btn-outline-secondary {
  background: transparent;
  color: #6c757d;
  border: 2px solid #e9ecef;
}

.cookie-actions .btn-outline-secondary:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
}

/* Responsive adjustments for cookie settings */
@media (max-width: 768px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .cookie-actions {
    flex-direction: column;
  }
  
  .cookie-actions .btn {
    width: 100%;
  }
}

/* Floating Cookie Button */
.floating-cookie-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: floatIn 0.8s ease-out;
  transition: all 0.3s ease;
}

.floating-cookie-button.near-top {
  bottom: 120px;
}

.floating-cookie-button.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

/* Esconder quando banner de cookies está ativo */
.cookie-consent-banner ~ * .floating-cookie-button {
  display: none;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(100px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.floating-cookie-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.2);
  max-width: 280px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.floating-cookie-content:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.floating-cookie-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
}

.cookie-emoji {
  font-size: 1.2rem;
  margin-right: 8px;
}

.cookie-text {
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
}

.minimize-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.minimize-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.floating-cookie-body {
  padding: 16px;
}

.floating-cookie-body p {
  margin: 0 0 12px 0;
  font-size: 0.85rem;
  color: #6c757d;
  line-height: 1.4;
}

.floating-cookie-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-accept-all {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-accept-all:hover {
  background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-dismiss {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.btn-dismiss:hover {
  background: rgba(108, 117, 125, 0.1);
  color: #495057;
}

/* Minimized State */
.floating-cookie-button.minimized {
  animation: minimizeIn 0.4s ease-out;
}

@keyframes minimizeIn {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(0.9);
  }
}

.floating-cookie-minimized {
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
  transition: all 0.3s ease;
  position: relative;
}

.floating-cookie-minimized:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
}

.floating-cookie-minimized .cookie-emoji {
  font-size: 1.1rem;
  margin: 0;
}

.cookie-count {
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 2px;
  opacity: 0.9;
}

/* Pulse animation for attention */
.floating-cookie-button:not(.minimized) {
  animation: floatIn 0.8s ease-out, pulse 3s ease-in-out 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .floating-cookie-button {
    bottom: 15px;
    right: 15px;
  }
  
  .floating-cookie-button.near-top {
    bottom: 90px;
  }
  
  .floating-cookie-content {
    max-width: 250px;
  }
  
  .floating-cookie-header {
    padding: 10px 14px;
  }
  
  .floating-cookie-body {
    padding: 14px;
  }
  
  .cookie-text {
    font-size: 0.85rem;
  }
  
  .floating-cookie-body p {
    font-size: 0.8rem;
  }
  
  .btn-accept-all {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .floating-cookie-button {
    bottom: 10px;
    right: 10px;
  }
  
  .floating-cookie-button.near-top {
    bottom: 80px;
  }
  
  .floating-cookie-content {
    max-width: 220px;
  }
  
  .floating-cookie-minimized {
    width: 48px;
    height: 48px;
  }
  
  .floating-cookie-minimized .cookie-emoji {
    font-size: 1rem;
  }
  
  .cookie-count {
    font-size: 0.65rem;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .floating-cookie-button,
  .floating-cookie-content,
  .floating-cookie-minimized,
  .btn-accept-all {
    animation: none;
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .floating-cookie-content {
    border: 2px solid #000;
  }
  
  .floating-cookie-minimized {
    border: 2px solid #fff;
  }
}

/* Don't show on very small screens to avoid interference */
@media (max-width: 320px) {
  .floating-cookie-button {
    display: none;
  }
} 