/* Cookie Banner Variables */
:root {
  --cookie-bg: #2d2d2d;
  --cookie-text: #ffffff;
  --cookie-btn-primary: #38BDF8; /* Blue matching h3.text-blue */
  --cookie-btn-primary-hover: #0EA5E9; /* Darker blue for hover */
  --cookie-btn-secondary: transparent;
  --cookie-btn-secondary-border: #ffffff;
  --cookie-link: #ffffff;
}

/* Banner Container */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--cookie-bg);
  color: var(--cookie-text);
  padding: 15px 20px;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  display: none; /* Hidden by default, shown via JS */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#cookie-banner.show {
  display: block;
  animation: slideUp 0.5s ease-out;
}

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

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

.cookie-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-title {
  font-weight: bold;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

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

/* Buttons */
.cookie-btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: 1px solid transparent;
}

.cookie-btn-accept, .cookie-btn-reject {
  background-color: var(--cookie-btn-primary);
  color: white;
}

.cookie-btn-accept:hover, .cookie-btn-reject:hover {
  background-color: var(--cookie-btn-primary-hover);
}

.cookie-btn-settings {
  background-color: transparent;
  border: 1px solid var(--cookie-btn-secondary-border);
  color: white;
}

.cookie-btn-settings:hover {
  background-color: rgba(255,255,255,0.1);
}

.cookie-link {
  color: var(--cookie-link);
  text-decoration: underline;
  cursor: pointer;
}

/* Modal for Settings */
.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
}

.cookie-modal-overlay.show {
  display: flex;
}

.cookie-modal {
  background: white;
  color: #333;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.cookie-modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.cookie-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.cookie-modal-body {
  padding: 20px;
  overflow-y: auto;
}

.cookie-modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Toggles in Modal */
.cookie-option {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.cookie-option:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cookie-option-info h4 {
  margin: 0 0 5px 0;
  font-size: 16px;
}

.cookie-option-info p {
  margin: 0;
  font-size: 13px;
  color: #666;
}

.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

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

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

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--cookie-btn-primary);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--cookie-btn-primary);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

input:disabled + .slider {
  background-color: #999;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: left;
  }
  
  .cookie-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .cookie-btn {
    width: 100%;
    text-align: center;
  }
}
