/**
 * Cookie Consent Banner & Modal Styles
 * Extracted from functions.php for better maintainability
 */

/* ========================================
   Cookie Banner Overlay
   ======================================== */
#cookie-banner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999998;
  display: none;
}

#cookie-banner-overlay.show {
  display: block;
}

/* ========================================
   Cookie Consent Banner
   ======================================== */
#cookie-consent-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1a1a1a;
  color: white;
  padding: 0;
  z-index: 999999;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  display: none;
  animation: cookiePopIn 0.4s ease-out;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
}

@keyframes cookiePopIn {
  from {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

#cookie-consent-banner.show {
  display: block;
}

/* ========================================
   Banner Content
   ======================================== */
.cookie-consent-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.cookie-consent-text {
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  color: #ddd;
}

.cookie-consent-text-break {
  display: none;
}

@media (min-width: 769px) {
  .cookie-consent-text-break {
    display: inline;
  }
}

.cookie-consent-text strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  color: white;
  font-weight: 700;
}

/* ========================================
   Banner Actions (Buttons)
   ======================================== */
.cookie-consent-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.cookie-consent-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex: 1;
  min-width: 140px;
}

.cookie-consent-btn.accept {
  background: #BB0A21;
  color: white;
}

.cookie-consent-btn.accept:hover {
  background: #9a0819;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(187, 10, 33, 0.4);
}

.cookie-consent-btn.decline {
  background: #000;
  color: white;
  border: 2px solid white;
  text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.cookie-consent-btn.decline:hover {
  background: #1a1a1a;
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 255, 255, 0.2);
}

.cookie-consent-btn.customize {
  background: #000;
  color: white;
  border: 2px solid white;
  text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.cookie-consent-btn.customize:hover {
  background: #1a1a1a;
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 255, 255, 0.2);
}

/* ========================================
   Cookie Modal
   ======================================== */
#cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999999;
}

.cookie-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
}

.cookie-modal-content {
  position: relative;
  max-width: 600px;
  margin: 50px auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}

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

.cookie-modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 20px;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 1;
}

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

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

.cookie-modal-body p {
  color: #666;
  line-height: 1.6;
}

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

/* ========================================
   Cookie Categories
   ======================================== */
.cookie-category {
  margin: 20px 0;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 6px;
}

.cookie-category-header {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.cookie-category h3 {
  margin: 0 0 5px 0;
  font-size: 16px;
  color: #333;
}

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

/* ========================================
   Cookie Switch Toggle
   ======================================== */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  flex-shrink: 0;
}

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

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

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

.cookie-switch input:checked + .cookie-slider {
  background-color: #BB0A21;
}

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

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

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
  #cookie-consent-banner {
    width: 92%;
    max-width: 400px;
  }
  
  .cookie-consent-content {
    padding: 20px 18px;
    gap: 20px;
  }
  
  .cookie-consent-text {
    font-size: 14px;
  }
  
  .cookie-consent-text strong {
    font-size: 18px;
    margin-bottom: 8px;
  }
  
  .cookie-consent-actions {
    flex-direction: column;
  }
  
  .cookie-consent-btn {
    width: 100%;
    min-width: auto;
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .cookie-modal-content {
    margin: 20px;
    max-height: calc(100vh - 40px);
  }
  
  .cookie-modal-footer {
    flex-direction: column;
  }
  
  .cookie-modal-footer .cookie-consent-btn {
    width: 100%;
  }
}
