/* Cookie Consent Popup Styles */

/* Floating Cookie Button - Bottom Left */
.cookie-settings-tab {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #d4a574 0%, #8b6239 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 999999;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cookie-settings-tab:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.cookie-settings-tab:active {
  transform: scale(0.95) rotate(-5deg);
}

.cookie-settings-tab .cookie-icon {
  font-size: 32px;
  line-height: 1;
  animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

/* Cookie Popup Overlay */
.cookie-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.cookie-popup.show {
  opacity: 1;
  visibility: visible;
}

/* Popup Content */
.cookie-popup-content {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
  animation: slideUp 0.4s ease;
}

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

/* Header */
.cookie-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.cookie-popup-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: white;
}

.cookie-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.cookie-close-btn:hover {
  background: rgba(148, 163, 184, 0.1);
  color: white;
}

/* Body */
.cookie-popup-body {
  padding: 24px 28px;
}

.cookie-description {
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0 0 24px 0;
  font-size: 15px;
}

/* Cookie Categories */
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookie-category {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.cookie-category:hover {
  border-color: rgba(102, 126, 234, 0.3);
  background: rgba(15, 23, 42, 0.8);
}

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

.cookie-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.cookie-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
}

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

.cookie-name {
  color: white;
  font-weight: 600;
  font-size: 16px;
  flex: 1;
}

.cookie-required {
  background: rgba(34, 211, 238, 0.2);
  color: #22d3ee;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.cookie-category-desc {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  padding-left: 32px;
}

/* Footer */
.cookie-popup-footer {
  display: flex;
  gap: 12px;
  padding: 20px 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  flex-wrap: wrap;
}

.cookie-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cookie-btn-reject {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.cookie-btn-reject:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

.cookie-btn-save {
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.cookie-btn-save:hover {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.5);
  color: white;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.cookie-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Links */
.cookie-popup-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 28px 24px;
  font-size: 13px;
  color: #64748b;
}

.cookie-popup-links a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cookie-popup-links a:hover {
  color: #8b94ff;
  text-decoration: underline;
}

.cookie-popup-links span {
  color: #475569;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .cookie-popup {
    padding: 12px;
    align-items: flex-end;
  }

  .cookie-popup-content {
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
  }

  .cookie-popup-header {
    padding: 20px;
  }

  .cookie-popup-header h3 {
    font-size: 20px;
  }

  .cookie-popup-body {
    padding: 20px;
  }

  .cookie-popup-footer {
    padding: 16px 20px;
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
    min-width: unset;
  }

  .cookie-popup-links {
    padding: 12px 20px 20px;
    flex-wrap: wrap;
  }

  .cookie-settings-tab {
    width: 56px;
    height: 56px;
    bottom: 16px;
    left: 16px;
  }

  .cookie-settings-tab .cookie-icon {
    font-size: 28px;
  }
}

/* Custom scrollbar for popup */
.cookie-popup-content::-webkit-scrollbar {
  width: 8px;
}

.cookie-popup-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 4px;
}

.cookie-popup-content::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.5);
  border-radius: 4px;
}

.cookie-popup-content::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.7);
}

/* Cookie Details Button */
.cookie-details-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 6px;
  color: #8b94ff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cookie-details-btn:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.5);
  color: #a5b4fc;
}

.cookie-details-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Cookie Details Flyout */
.cookie-details-flyout {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 90vw;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(148, 163, 184, 0.1);
}

.cookie-details-flyout.show {
  transform: translateX(0);
}

.cookie-details-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cookie-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  flex-shrink: 0;
}

.cookie-details-header h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.cookie-details-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cookie-details-close:hover {
  background: rgba(148, 163, 184, 0.1);
  color: white;
}

.cookie-details-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  color: #cbd5e1;
}

.cookie-details-body p {
  line-height: 1.6;
  margin: 0 0 20px 0;
  font-size: 15px;
}

.cookie-details-body h5 {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 12px 0;
}

.cookie-details-body h5:first-child {
  margin-top: 0;
}

/* Cookie Details Table */
.cookie-details-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px 0;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.cookie-details-table th,
.cookie-details-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.cookie-details-table th {
  background: rgba(15, 23, 42, 0.8);
  color: #8b94ff;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cookie-details-table td {
  color: #cbd5e1;
  font-size: 14px;
}

.cookie-details-table tbody tr:last-child td {
  border-bottom: none;
}

.cookie-details-table tbody tr:hover {
  background: rgba(102, 126, 234, 0.05);
}

/* Cookie Details Lists */
.cookie-details-body ul {
  margin: 12px 0 20px 0;
  padding-left: 20px;
}

.cookie-details-body li {
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 8px;
  font-size: 14px;
}

.cookie-details-body li:last-child {
  margin-bottom: 0;
}

/* Risk items styling */
.cookie-details-body li strong {
  color: #ef4444;
}

/* Layman's explanation styling */
.cookie-details-body .layman-explanation {
  background: rgba(102, 126, 234, 0.1);
  border-left: 3px solid #667eea;
  padding: 16px;
  margin: 16px 0 20px 0;
  border-radius: 8px;
  font-style: italic;
  color: #e0e7ff;
  line-height: 1.7;
}

/* Cookie Details Scrollbar */
.cookie-details-body::-webkit-scrollbar {
  width: 8px;
}

.cookie-details-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 4px;
}

.cookie-details-body::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.5);
  border-radius: 4px;
}

.cookie-details-body::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.7);
}

/* Mobile adjustments for flyout */
@media (max-width: 640px) {
  .cookie-details-flyout {
    width: 100vw;
    max-width: 100vw;
  }

  .cookie-details-header {
    padding: 20px;
  }

  .cookie-details-header h4 {
    font-size: 18px;
  }

  .cookie-details-body {
    padding: 20px;
  }

  .cookie-details-btn {
    font-size: 12px;
    padding: 5px 10px;
  }
}
