:root {
  --brand-orange: #f57b22;
  --brand-orange-dark: #e56d0d;
  --brand-green: #91b551;
  --color-white: #ffffff;
  --color-gray-light: #f5f5f5;
  --color-gray: #666666;
  --color-gray-dark: #333333;
  --color-black: #000000;
  --shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  --shadow-modal: 0 4px 20px rgba(0, 0, 0, 0.3);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  box-shadow: var(--shadow);
  z-index: 9999;
  padding: 20px;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
}

.cookie-text {
  flex: 1;
  min-width: 300px;
}

.cookie-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-gray-dark);
}

.cookie-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-gray);
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.cookie-btn-accept {
  background: var(--brand-orange);
  color: var(--color-white);
}

.cookie-btn-accept:hover {
  background: var(--brand-orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(245, 123, 34, 0.3);
}

.cookie-btn-reject {
  background: transparent;
  color: var(--color-gray);
  border: 2px solid var(--color-gray);
}

.cookie-btn-reject:hover {
  background: var(--color-gray-light);
  color: var(--color-gray-dark);
}

.cookie-btn-preferences {
  background: var(--brand-green);
  color: var(--color-white);
}

.cookie-btn-preferences:hover {
  background: #7fa043;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(145, 181, 81, 0.3);
}

.lang-toggle {
  position: absolute;
  top: -5px;
  right: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 24px;
  padding: 5px 10px;
  transition: var(--transition);
  z-index: 10;
  line-height: 1;
}

.lang-toggle:hover {
  transform: scale(1.1);
}

.flag {
  display: inline-block;
  line-height: 1;
}

/* Cookie Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cookie-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.cookie-modal-content {
  position: relative;
  background: var(--color-white);
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--color-gray-light);
}

.cookie-modal-header h2 {
  margin: 0;
  font-size: 22px;
  color: var(--color-gray-dark);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-gray);
  transition: var(--transition);
  padding: 0;
  width: 32px;
  height: 32px;
}

.modal-close:hover {
  color: var(--color-gray-dark);
  transform: rotate(90deg);
}

.cookie-modal-body {
  padding: 24px;
}

.modal-intro {
  margin: 0 0 24px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-gray);
}

.cookie-category {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--color-gray-light);
  border-radius: 8px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.category-info {
  flex: 1;
}

.category-info h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: var(--color-gray-dark);
}

.category-description {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-gray);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: var(--transition);
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--color-white);
  transition: var(--transition);
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--brand-orange);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-switch.disabled .toggle-slider {
  background-color: var(--brand-green);
  cursor: not-allowed;
  opacity: 0.7;
}

.toggle-switch.disabled input {
  cursor: not-allowed;
}

.cookie-modal-footer {
  padding: 24px;
  border-top: 1px solid var(--color-gray-light);
  text-align: right;
}

.cookie-modal-footer .cookie-btn {
  min-width: 180px;
}

/* Responsive */
@media (max-width: 768px) {
  .cookie-banner {
    padding: 16px;
  }
  
  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cookie-text {
    min-width: auto;
  }
  
  .cookie-actions {
    justify-content: stretch;
  }
  
  .cookie-btn {
    flex: 1;
  }
  
  .lang-toggle {
    position: relative;
    top: auto;
    right: auto;
    align-self: flex-end;
    margin-top: 10px;
  }
  
  .cookie-modal-content {
    max-height: 90vh;
  }
  
  .category-header {
    flex-direction: column;
  }
  
  .toggle-switch {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .cookie-title {
    font-size: 16px;
  }
  
  .cookie-description {
    font-size: 13px;
  }
  
  .cookie-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .cookie-modal-header h2 {
    font-size: 18px;
  }
  
  .cookie-modal-body,
  .cookie-modal-header,
  .cookie-modal-footer {
    padding: 16px;
  }
}
