/* Cookie Consent Banner Styles */

.cookie-banner-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(1px);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cookie-banner-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a4d3a; /* Dark green */
  border-top: 3px solid #d4af37; /* Golden border */
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  padding: 24px;
  padding-top: 24px; /* Extra padding at top for close button */
  animation: slideUp 0.4s ease-out;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: visible; /* Allow close button to be visible */
  display: block !important; /* Override inline styles when shown */
  text-align: left !important; /* Prevent text centering from affecting children */
}

.cookie-banner[hidden] {
  display: none !important;
}

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

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

/* Cookie Banner Close Button - matches modal close button style */
.cookie-banner-close {
  position: absolute !important;
  top: -6px !important;
  right: 5px !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  color: #ffffff; /* White */
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  z-index: 10001;
  width: auto !important;
  height: auto !important;
  min-width: auto !important;
  min-height: auto !important;
  max-width: none !important;
  transform: none !important;
  text-align: right !important;
  float: none !important;
}

.cookie-banner-close svg {
  width: 24px !important;
  height: 24px !important;
  display: block;
}

@media (min-width: 769px) {
  .cookie-banner-text {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
  }
  
  .cookie-banner-title {
    flex: 1;
    min-width: 0;
    /*margin: 0 !important;*/
    margin: 0 0 18px 0;
  }
  
  .cookie-banner-close {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px; /* Slight adjustment to align with title */
  }
  
  .cookie-banner-text p {
    width: 100%;
    margin-top: 12px;
  }
}

.cookie-banner-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #d4af37; /* Golden on hover */
}

.cookie-banner-close:focus {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

.cookie-banner-close svg {
  width: 24px;
  height: 24px;
  display: block;
}

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

.cookie-banner-title {
  font-family: 'Playfair Display', 'Times New Roman', Times, serif;
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 700;
  color: #feffe3; /* White text */
  margin: 0 0 12px 0;
}

.cookie-banner-text p {
  color: #ffffff; /* White text */
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.cookie-banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-banner-actions .btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 24px;
  font-size: 16px;
}

.cookie-banner-actions .btn.btn-primary,
.cookie-banner-actions .btn.primary {
  background: #d4af37 !important; /* Golden background */
  color: #000000 !important; /* Black text */
  border: 2px solid #d4af37 !important;
}

.cookie-banner-actions .btn.btn-primary:hover,
.cookie-banner-actions .btn.primary:hover {
  background: #f4d03f !important; /* Lighter golden on hover */
  border-color: #f4d03f !important;
  color: #000000 !important; /* Black text */
}

.cookie-banner-actions .btn.btn-secondary,
.cookie-banner-actions .btn.secondary {
  background: transparent !important;
  color: #ffffff !important; /* White text */
  border: 2px solid #d4af37 !important; /* Golden border */
}

.cookie-banner-actions .btn.btn-secondary:hover,
.cookie-banner-actions .btn.secondary:hover {
  background: rgba(212, 175, 55, 0.2) !important; /* Semi-transparent golden */
  border-color: #f4d03f !important;
  color: #ffffff !important;
}

.cookie-banner-link {
  color: #d4af37; /* Golden color */
  text-decoration: underline;
  font-size: 14px;
  text-align: center;
  display: block;
  margin-top: 8px;
}

.cookie-banner-link:hover {
  color: #f4d03f; /* Lighter golden on hover */
}

.cookie-banner-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #ffffff; /* White */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  z-index: 1;
  width: 32px;
  height: 32px;
}

.cookie-banner-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #d4af37; /* Golden on hover */
}

.cookie-banner-close:focus {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

.cookie-banner-close svg {
  width: 20px;
  height: 20px;
}

/* Cookie Preferences Modal */

.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease;
  overflow: visible !important; /* Ensure close button is not clipped */
}

@media (max-width: 768px) {
  .cookie-modal {
    align-items: flex-start;
    padding: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding-left: 3px;
    padding-right: 3px;
    overflow: hidden;
    top: var(--header-offset, calc(88px + env(safe-area-inset-top, 0px)));
    bottom: 0;
    height: calc(100vh - var(--header-offset, calc(88px + env(safe-area-inset-top, 0px))) - env(safe-area-inset-bottom, 0px) - 12px);
  }
}

body.cookie-modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

.cookie-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1;
}

.cookie-modal[hidden] {
  display: none;
}

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

.cookie-modal-content {
  position: relative;
  background: #1a4d3a; /* Dark green */
  border: 3px solid #d4af37; /* Golden border */
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  z-index: 2; /* Above backdrop */
}

@media (max-width: 768px) {
  .cookie-modal-content {
    max-height: none;
    height: 100%;
    max-height: 100%;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    border-radius: 16px;
    border: 3px solid #d4af37;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }
}


.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3); /* Semi-transparent golden */
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-modal-header {
    padding-top: 12px !important;
    padding-bottom: 16px;
    padding-left: 24px;
    padding-right: 24px;
    flex-shrink: 0;
  }
}

.cookie-modal-header h2 {
  font-family: 'Playfair Display', 'Times New Roman', Times, serif;
  font-size: clamp(24px, 3vw, 28px);
  font-weight: 700;
  color: #ffffff; /* White text */
  margin: 0;
}

.cookie-modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #ffffff; /* White */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.cookie-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #d4af37; /* Golden on hover */
}

.cookie-modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .cookie-modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }
}

.cookie-modal-intro {
  color: #ffffff; /* White text */
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.cookie-category {
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.3); /* Semi-transparent golden */
}

.cookie-category-header {
  margin-bottom: 12px;
}

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

.cookie-category-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #d4af37; /* Golden checkbox */
}

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

.cookie-category-title {
  font-family: 'Playfair Display', 'Times New Roman', Times, serif;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff; /* White text */
}

.cookie-category-desc {
  color: #ffffff; /* White text */
  font-size: 15px;
  line-height: 1.6;
  margin: 8px 0 0 32px;
}

.cookie-category-details {
  margin-top: 12px;
  padding-left: 32px;
}

.cookie-detail-text {
  color: rgba(255, 255, 255, 0.9); /* Slightly transparent white */
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.cookie-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid rgba(212, 175, 55, 0.3); /* Semi-transparent golden */
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-modal-footer .btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 24px;
  font-size: 16px;
}

.cookie-modal-footer .btn.btn-primary,
.cookie-modal-footer .btn.primary {
  background: #d4af37 !important; /* Golden background */
  color: #000000 !important; /* Black text */
  border: 2px solid #d4af37 !important;
}

.cookie-modal-footer .btn.btn-primary:hover,
.cookie-modal-footer .btn.primary:hover {
  background: #f4d03f !important; /* Lighter golden on hover */
  border-color: #f4d03f !important;
  color: #000000 !important; /* Black text */
}

.cookie-modal-footer .btn.btn-secondary,
.cookie-modal-footer .btn.secondary {
  background: transparent !important;
  color: #ffffff !important; /* White text */
  border: 2px solid #d4af37 !important; /* Golden border */
}

.cookie-modal-footer .btn.btn-secondary:hover,
.cookie-modal-footer .btn.secondary:hover {
  background: rgba(212, 175, 55, 0.2) !important; /* Semi-transparent golden */
  border-color: #f4d03f !important;
  color: #ffffff !important;
}

/* Responsive Design */

@media (max-width: 768px) {
  .cookie-banner {
    padding: 20px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    margin-left: 12px;
    margin-right: 12px;
    margin-bottom: 12px;
    border: 3px solid #d4af37;
    border-top: 3px solid #d4af37;
    border-radius: 16px;
    left: 0;
    right: 0;
    bottom: 0;
  }
  
  .cookie-banner-content {
    gap: 16px;
  }
  
  .cookie-banner-close {
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
  }
  
  .cookie-banner-close svg {
    width: 18px;
    height: 18px;
  }
  
  .cookie-banner-actions {
    flex-direction: column;
  }
  
  .cookie-banner-actions .btn {
    width: 100%;
  }
  
  .cookie-modal {
    padding: 16px;
  }
  
  .cookie-modal-content {
    max-height: 95vh;
  }
  
  .cookie-modal-header {
    padding-top: 12px !important;
    padding-bottom: 16px;
    padding-left: 24px;
    padding-right: 24px;
  }
  
  .cookie-modal-close-top {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  
  .cookie-modal-close-top svg {
    width: 22px;
    height: 22px;
  }
  
  .cookie-modal-body {
    padding: 20px 16px;
  }
  
  .cookie-modal-footer {
    flex-direction: column;
    padding: 16px;
  }
  
  .cookie-modal-footer .btn {
    width: 100%;
  }
  
  .cookie-category {
    padding: 16px;
  }
  
  .cookie-category-desc,
  .cookie-category-details {
    margin-left: 0;
    padding-left: 0;
  }
}

