/* Base reset for simplicity */
  #morden-cookie-banner,
  #morden-cookie-banner button,
  #morden-cookie-banner a {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }

  /* Main Banner Container - Changed to a clean, light theme */
  #morden-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff; /* Clean White Background */
    color: #333333; /* Dark Grey Text */
    padding: 1.5rem 1rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    z-index: 9999;
    /* Slide-up animation */
    transform: translateY(100%);
    transition: transform 0.6s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
  }

  /* When the banner is active/shown */
  #morden-cookie-banner.show {
    transform: translateY(0);
  }
  
  /* Inner container for max width on large screens */
  #morden-cookie-content {
      display: flex;
      flex-direction: row; /* Default for desktop */
      align-items: center;
      max-width: 1200px;
      width: 100%;
      gap: 2rem;
  }

  /* Text & Links */
  #morden-cookie-text {
      flex-grow: 1;
      line-height: 1.6;
      font-size: 0.95rem;
  }
  #morden-cookie-banner a {
    color: #005792; /* Deep Corporate Blue (Primary Action Color) */
    text-decoration: underline;
    font-weight: 500;
  }
  #morden-cookie-banner a:hover,
  #morden-cookie-banner a:focus {
    color: #003F6B;
    text-decoration: none;
    outline: none;
  }

  /* Button Grouping */
  #morden-cookie-actions {
      display: flex;
      gap: 0.75rem;
      flex-shrink: 0; /* Prevents buttons from shrinking */
  }
  
  /* Buttons */
  #morden-cookie-banner button {
    padding: 0.75rem 1.25rem;
    border: 1px solid transparent; /* Base border for consistency */
    cursor: pointer;
    border-radius: 4px; /* Slightly sharp corners for professionalism */
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
    white-space: nowrap;
  }
  
  /* Primary Button (Accept All) */
  #accept-all-cookies-morden {
    background: #005792; /* Deep Blue Fill */
    color: white;
  }
  #accept-all-cookies-morden:hover {
    background: #003F6B;
  }
  
  /* Secondary Buttons (Reject, Manage) - Ghost/Outline style */
  #reject-cookies-morden,
  #manage-cookies-morden {
    background: transparent;
    color: #005792;
    border-color: #005792; /* Blue outline */
  }
  #reject-cookies-morden:hover,
  #manage-cookies-morden:hover {
    background: #F0F8FF; /* Very light blue hover */
    color: #003F6B;
    border-color: #003F6B;
  }
  
  /* Active/Focus state for accessibility */
  #morden-cookie-banner button:focus {
    outline: 2px solid #005792;
    outline-offset: 2px;
  }

  /* Responsive layout for smaller screens */
  @media (max-width: 768px) {
    #morden-cookie-content {
        flex-direction: column; /* Stack vertically on mobile */
        align-items: stretch;
    }
    #morden-cookie-actions {
        flex-direction: column; /* Stack buttons vertically on mobile */
        width: 100%;
    }
    #morden-cookie-banner button {
        width: 100%; /* Full width buttons on mobile */
    }
  }

  /* Preferences Modal Styles */
  .preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }

  .preferences-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
  }

  .preferences-content {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin: 1rem;
  }

  .preferences-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background: #005792;
    color: #fff;
    border-radius: 8px 8px 0 0;
  }

  .preferences-header h3 {
    margin: 0;
    font-size: 1.25rem;
  }

  .close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .close-btn:hover {
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
  }

  .preferences-body {
    padding: 1.5rem;
  }

  .preference-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
  }

  .preference-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }

  .preference-group h4 {
    color: #005792;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
  }

  .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 0.5rem;
  }

  .checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
  }

  .preference-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #eee;
  }

  .preference-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    min-width: 120px;
  }

  #save-preferences {
    background: #005792;
    color: #fff;
  }

  #save-preferences:hover {
    background: #003F6B;
  }

  #reject-all-preferences {
    background: #6c757d;
    color: #fff;
  }

  #reject-all-preferences:hover {
    background: #5a6268;
  }

  /* Responsive for Modal */
  @media (max-width: 768px) {
    .preferences-content {
      margin: 0.5rem;
      max-height: 90vh;
    }

    .preferences-header {
      padding: 1rem;
    }

    .preferences-body {
      padding: 1rem;
    }

    .preference-actions {
      flex-direction: column;
    }

    .preference-actions button {
      width: 100%;
    }
  }
