/* Cookie Banner Styles */
#mpc-cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 450px;
  background: var(--banner-bg, #1c1c1c);
  color: var(--banner-text, #ffffff);
  padding: 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#mpc-cookie-banner p {
  color: var(--banner-text, #ffffff);
  margin: 0 0 15px 0;
  line-height: 1.5;
}

#mpc-cookie-banner a {
  color: var(--banner-text, #ffffff);
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

#mpc-cookie-banner a:hover {
  opacity: 0.8;
}

.mpc-buttons {
  margin-top: 15px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#mpc-cookie-banner button {
  padding: 10px 16px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  min-width: 80px;
  transition: all 0.3s ease;
  font-family: inherit;
}

#mpc-cookie-banner button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mpc-accept { 
  background: var(--accept-btn, #0073e6); 
  color: #fff; 
}

.mpc-reject { 
  background: var(--reject-btn, #666); 
  color: #fff; 
}

.mpc-custom { 
  background: var(--custom-btn, #f0f0f0); 
  color: #333; 
  border: 1px solid #ddd;
}

/* Modal Styles */
#mpc-preferences-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 10000;
  display: none;
  backdrop-filter: blur(2px);
}

#mpc-preferences-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mpc-modal-content {
  background: var(--modal-bg, #2c2c2c);
  color: var(--modal-text, #ffffff);
  padding: 30px;
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mpc-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--modal-text, #ffffff);
  font-size: 28px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.mpc-modal-close:hover {
  opacity: 1;
  background: rgba(255,255,255,0.1);
}

.mpc-modal-content h3 {
  margin-top: 0;
  color: var(--modal-text, #ffffff);
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
  padding-right: 40px;
  font-weight: 600;
}

/* Modal Description */
.mpc-modal-description {
  margin-bottom: 25px;
  padding: 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}

.mpc-description-short {
  margin: 0 0 15px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--modal-text, #ffffff);
}

.mpc-description-full {
  margin-top: 15px;
}

.mpc-description-full p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--modal-text, #ffffff);
}

.mpc-show-more {
  background: none;
  border: none;
  color: var(--accept-btn, #0073e6);
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  padding: 0;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.mpc-show-more:hover {
  opacity: 0.8;
}

/* Category Styles */
.mpc-category {
  margin-bottom: 15px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

.mpc-category:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
}

.mpc-category-header {
  padding: 20px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.mpc-category-header:hover {
  background: rgba(255,255,255,0.05);
}

.mpc-category-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mpc-category-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mpc-accordion-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
  opacity: 0.7;
}

.mpc-category-title strong {
  color: var(--modal-text, #ffffff);
  font-size: 16px;
  font-weight: 600;
}

.mpc-toggle-container {
  display: flex;
  align-items: center;
}

.mpc-always-active {
  color: #28a745;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  background: rgba(40, 167, 69, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Toggle Switch */
.mpc-toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

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

.mpc-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #666;
  transition: 0.3s;
  border-radius: 28px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.mpc-toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .mpc-toggle-slider {
  background-color: var(--accept-btn, #0073e6);
}

input:checked + .mpc-toggle-slider:before {
  transform: translateX(24px);
}

.mpc-category-desc {
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
}

/* Cookie List */
.mpc-cookie-list {
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: none;
  background: rgba(0,0,0,0.2);
}

.mpc-cookie-table {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mpc-cookie-item {
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}

.mpc-cookie-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}

.mpc-cookie-row {
  display: flex;
  margin-bottom: 10px;
  align-items: flex-start;
}

.mpc-cookie-row:last-child {
  margin-bottom: 0;
}

.mpc-cookie-label {
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  min-width: 90px;
  font-size: 13px;
  margin-right: 15px;
  flex-shrink: 0;
}

.mpc-cookie-value {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
}

/* Modal Buttons */
.mpc-modal-buttons {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.mpc-modal-buttons button {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
  min-width: 120px;
}

.mpc-save-preferences { 
  background: var(--accept-btn, #0073e6); 
  color: #fff; 
}

.mpc-accept-all { 
  background: #28a745; 
  color: #fff; 
}

.mpc-reject-all { 
  background: var(--reject-btn, #666); 
  color: #fff; 
}

.mpc-modal-buttons button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  #mpc-cookie-banner {
    bottom: 0;
    right: 0;
    left: 0;
    max-width: none;
    border-radius: 0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }
  
  .mpc-buttons {
    flex-direction: column;
  }
  
  #mpc-cookie-banner button {
    flex: none;
    width: 100%;
  }
  
  .mpc-modal-content {
    margin: 10px;
    padding: 20px;
    max-height: calc(100vh - 40px);
  }
  
  .mpc-modal-buttons {
    flex-direction: column;
  }
  
  .mpc-modal-buttons button {
    width: 100%;
    min-width: auto;
  }
  
  .mpc-category-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .mpc-toggle-container {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .mpc-cookie-row {
    flex-direction: column;
    gap: 5px;
  }
  
  .mpc-cookie-label {
    min-width: auto;
    margin-right: 0;
    font-weight: 700;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Focus States */
#mpc-cookie-banner button:focus,
.mpc-modal-buttons button:focus,
.mpc-toggle-switch input:focus + .mpc-toggle-slider,
.mpc-modal-close:focus {
  outline: 2px solid var(--accept-btn, #0073e6);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  #mpc-cookie-banner {
    border: 2px solid;
  }
  
  .mpc-category {
    border-width: 2px;
  }
  
  .mpc-toggle-slider {
    border: 1px solid;
  }
}