/**
 * Cookie Consent Banner & Modal Styles
 * Compliant with Israeli Privacy Protection Law (Amendment 13)
 */

/* ==========================================================================
   Cookie Consent Banner
   ========================================================================== */

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 1.5rem;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slideUp 0.3s ease-out;
}

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

.cookie-consent-content {
  max-width: 1200px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

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

.cookie-consent-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.cookie-consent-text p {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.cookie-learn-more {
  color: #64b5f6;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.cookie-learn-more:hover {
  color: #90caf9;
  text-decoration: underline;
}

.cookie-consent-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-consent-actions .btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.cookie-consent-actions .btn-primary {
  background: #667eea;
  color: #fff;
}

.cookie-consent-actions .btn-primary:hover {
  background: #5a6fd6;
  transform: translateY(-1px);
}

.cookie-consent-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-consent-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.cookie-consent-actions .btn-outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

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

/* Mobile responsive */
@media (max-width: 768px) {
  .cookie-consent {
    padding: 1rem;
  }

  .cookie-consent-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .cookie-consent-actions {
    flex-direction: column;
    width: 100%;
  }

  .cookie-consent-actions .btn {
    width: 100%;
    padding: 0.875rem 1rem;
  }
}

/* ==========================================================================
   Cookie Settings Modal
   ========================================================================== */

.cookie-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  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 .modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out;
}

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

.cookie-settings-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.cookie-settings-modal .modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #333;
}

.cookie-settings-modal .modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.cookie-settings-modal .modal-close:hover {
  color: #333;
}

.cookie-settings-modal .modal-body {
  padding: 1.5rem;
}

.cookie-settings-intro {
  margin: 0 0 1.5rem 0;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Cookie Category */
.cookie-category {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.cookie-category:last-child {
  margin-bottom: 0;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cookie-category-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cookie-category-info h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

.cookie-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.cookie-badge.required {
  background: #e8f5e9;
  color: #2e7d32;
}

.cookie-category-desc {
  margin: 0.75rem 0 0 0;
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
  padding-right: 3.5rem; /* Account for toggle width in RTL */
}

[dir="ltr"] .cookie-category-desc {
  padding-right: 0;
  padding-left: 3.5rem;
}

/* Cookie Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 26px;
  transition: 0.3s;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  right: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[dir="ltr"] .cookie-toggle-slider:before {
  right: auto;
  left: 3px;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: #667eea;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
  transform: translateX(-22px);
}

[dir="ltr"] .cookie-toggle input:checked + .cookie-toggle-slider:before {
  transform: translateX(22px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  background-color: #667eea;
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-toggle input:focus + .cookie-toggle-slider {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Modal Footer */
.cookie-settings-modal .modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
}

.cookie-settings-modal .modal-footer .btn {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.cookie-settings-modal .modal-footer .btn-primary {
  background: #667eea;
  color: #fff;
}

.cookie-settings-modal .modal-footer .btn-primary:hover {
  background: #5a6fd6;
}

/* ==========================================================================
   Footer Links Enhancement
   ========================================================================== */

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a,
.footer-link-btn {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.footer-links a:hover,
.footer-link-btn:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-separator {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  .footer-links {
    flex-direction: column;
    gap: 0.25rem;
  }

  .footer-separator {
    display: none;
  }
}
