/* ========================================
   Cookie Consent Modal Styles
   TTD Consulting - Cookie Consent Implementation
   ======================================== */

/* Overlay - Semi-transparent background */
.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  animation: fadeIn 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Modal Container */
.cookie-modal {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.4s ease-out;
}

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

/* Content Padding */
.cookie-content {
  padding: 32px;
}

/* Typography */
.cookie-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

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

.cookie-description a {
  color: #0066cc;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.cookie-description a:hover {
  color: #0052a3;
}

.cookie-description-small {
  font-size: 14px;
  margin-bottom: 20px;
}

/* Buttons Container */
.cookie-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}

/* Button Styles */
.cookie-btn {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
}

.cookie-btn:focus {
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.3);
}

/* Primary Button - Accept All */
.cookie-btn-primary {
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.cookie-btn-primary:hover {
  background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
  transform: translateY(-1px);
}

.cookie-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

/* Secondary Button - Reject */
.cookie-btn-secondary {
  background: #f5f5f5;
  color: #333333;
  border: 1px solid #dddddd;
}

.cookie-btn-secondary:hover {
  background: #e8e8e8;
  border-color: #cccccc;
}

/* Tertiary Button - Manage */
.cookie-btn-tertiary {
  background: transparent;
  color: #0066cc;
  border: 1px solid #0066cc;
}

.cookie-btn-tertiary:hover {
  background: rgba(0, 102, 204, 0.05);
  border-color: #0052a3;
  color: #0052a3;
}

/* Preferences Panel */
.cookie-preferences {
  display: none;
}

.cookie-options {
  margin: 20px 0;
}

.cookie-option {
  background: #f9f9f9;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: background 0.2s ease;
}

.cookie-option:hover {
  background: #f2f2f2;
}

.cookie-option-header {
  margin-bottom: 8px;
}

/* Checkbox Label */
.cookie-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.cookie-checkbox-label input[disabled] {
  cursor: not-allowed;
}

.cookie-checkbox-label input[disabled] ~ .cookie-checkbox-custom {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Hide default checkbox */
.cookie-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Custom Checkbox */
.cookie-checkbox-custom {
  width: 20px;
  height: 20px;
  background: #ffffff;
  border: 2px solid #cccccc;
  border-radius: 4px;
  margin-right: 12px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
}

/* Checkbox checkmark */
.cookie-checkbox:checked ~ .cookie-checkbox-custom::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cookie-checkbox:checked ~ .cookie-checkbox-custom {
  background: #0066cc;
  border-color: #0066cc;
}

.cookie-checkbox:focus ~ .cookie-checkbox-custom {
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

/* Option Title */
.cookie-option-title {
  font-weight: 600;
  font-size: 15px;
  color: #1a1a1a;
  flex: 1;
}

/* Badge */
.cookie-badge {
  background: #e8f4ff;
  color: #0066cc;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  margin-left: auto;
}

/* Option Description */
.cookie-option-description {
  font-size: 13px;
  color: #666666;
  line-height: 1.5;
  margin: 8px 0 0 32px;
}

/* Footer Cookie Link */
.footer-cookie-link {
  margin-top: 20px;
  text-align: center;
}

.footer-cookie-link a {
  color: #0066cc;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-block;
}

.footer-cookie-link a:hover {
  background: rgba(0, 102, 204, 0.1);
  color: #0052a3;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-modal {
    max-width: 95%;
    max-height: 95vh;
  }

  .cookie-content {
    padding: 24px;
  }

  .cookie-title {
    font-size: 20px;
  }

  .cookie-description {
    font-size: 14px;
  }

  .cookie-buttons {
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
    padding: 14px 20px;
  }

  .cookie-option-description {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .cookie-content {
    padding: 20px;
  }

  .cookie-title {
    font-size: 18px;
  }

  .cookie-option {
    padding: 12px;
  }
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
  .cookie-modal {
    border: 2px solid #000000;
  }

  .cookie-btn {
    border: 2px solid currentColor;
  }

  .cookie-option {
    border: 2px solid #000000;
  }
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  .cookie-overlay,
  .cookie-modal {
    animation: none;
  }

  .cookie-btn,
  .cookie-option {
    transition: none;
  }
}

/* Print Styles - Hide modal when printing */
@media print {
  .cookie-overlay {
    display: none !important;
  }
}
